Congestion-Aware Adaptive Routing for LLM Classification
Abstract
Organizations use large language models (LLMs) to classify jobs that differ in uncertainty and the cost of errors. Querying additional models may improve accuracy, but it also incurs fees and increases congestion at shared servers. We study congestion-aware adaptive routing (CAAR) policies that adapt model selection and stopping decisions to observed outputs while accounting for the steady-state congestion they generate. The objective is to minimize the long-run average cost of misclassification penalties, query fees, and holding costs. We can represent CAAR policies as a mixture of decision trees, and derive exact holding costs for first-come-first-served servers with exponential service times and processor-sharing servers with general service times. We formulate a convex optimization problem with unique optimal model loads. Congestion prices capture the marginal system-wide holding costs of additional queries and guide routing and stopping decisions through a Bayesian dynamic program. We characterize optimal stopping decisions and identify models whose information does not justify their cost. A column-generation algorithm computes optimal CAAR policies and provides an explicit optimality-gap bound. We also bound the additional cost of limiting cascade depth relative to full-depth CAAR. Finally, under a common query-depth limit, cascades with a predetermined model order can be arbitrarily more costly than optimal CAAR, even when the order is randomized and stopping decisions adapt to observed outputs. Numerical experiments distinguish the benefits of adaptive model selection and congestion-aware design.
Create a lesson
Related papers
Service location flexibility in dynamic vehicle routing
Shared title terminologymath.OCGérard P. Cachon, Bora Cetin, Sophie H. Yu
Learning and Dynamic Route Recommendation Under Unknown Traveler Compliance and Road Conditions
Shared title terminologymath.OCYanru Guo, Siqian Shen, Ruiwei Jiang et al.
Bayesian Optimization for Inhomogeneous Functions via Locally Adaptive Kernels
Shared title terminologymath.OCOlivier Dondjio, Toni Karvonen
MASTO: Missed-thrust Aware Stochastic Trajectory Optimization
Shared title terminologymath.OCShaurya Shrivastava, Kenshiro Oguri
Constraint-Aware Anticlustering Decomposition for Certifying Pairwise-Constrained Clustering
Shared title terminologymath.OCAnna Livia Croella, Veronica Piccialli, Antonio M. Sudoso
Linear Convergence of Adaptive Accelerated Gradient Methods: A Unified Framework
Shared title terminologymath.OCWeihe Zhang, Ming Yan