Papers
Ensemble Routing for Prompt-Adaptive Cost-Aware LLM Inference
Services that expose large language models to users must serve very different requests while balancing answer quality against per-query cost, because candidate models differ widely in both capability…

- arXiv
- 2611.10193 · Preprint · not peer-reviewed
- Published
- 2026-11-06
- Authors
- Saul Urso, Emanuele Carlini, Patrizio Dazzi, Matteo Mordacchini
In plain words
Services that expose large language models to users must serve very different requests while balancing answer quality against per-query cost, because candidate models differ widely in both capability and price. Existing routers pick exactly one model per prompt, and existing ensemble methods combine models but usually fix how many models they use and cannot retune their cost–quality balance after training.
AI summary
Overview
Research area: Large language model serving and inference economics — specifically LLM routing (choosing which model handles a given prompt) and multi-model ensembling, in the context of Web-scale LLM services.
Technical level: Intermediate. The paper assumes familiarity with basic classification machinery (logistic regression, k-means-style clustering, embeddings) and with standard evaluation concepts, but the core ideas are explained clearly enough for a reader with general machine-learning background.
Scope: The paper introduces and evaluates PISA (a single-model, cost-aware prompt router) and PISA-E (its ensemble-routing extension), testing both across four LLM routing benchmarks under in-distribution and out-of-distribution conditions.
What This Paper Is About
Services that expose large language models to users must serve very different requests while balancing answer quality against per-query cost, because candidate models differ widely in both capability and price. Existing routers pick exactly one model per prompt, and existing ensemble methods combine models but usually fix how many models they use and cannot retune their cost–quality balance after training. The paper's goal is ensemble routing: deciding, for each individual prompt and for a user-specified cost–quality preference, both which models to call and how many, without training separate predictors for every possible model combination.
Key Contributions
-
PISA, a prompt-adaptive cost-aware single-model router. It embeds a prompt, computes soft memberships over X-means cluster centroids, and feeds that membership vector to one logistic predictor per candidate model, producing a per-model success probability; these probabilities are combined with normalized model cost into a utility that a single trade-off parameter α controls.
-
PISA-E, an ensemble-routing extension. It reuses the same individual capability estimates to build a tractable ensemble-success surrogate (the probability that a strict majority of the selected models is correct, computed with a Poisson-binomial dynamic program) and compares candidate subsets of different sizes against a normalized ensemble cost — no ensemble-specific training required.
-
Inference-time tunability and efficient candidate search. The cost–quality preference α can be changed at inference time without retraining or re-tuning hyperparameters; candidate ensembles are built as odd-cardinality prefixes of a per-prompt utility ranking (the paper argues even cardinalities cannot beat the odd subset obtained by dropping one model under the surrogate), avoiding combinatorial search.
-
A capability-weighted response resolver. Selected models are queried in parallel and their outputs combined via self-weighted BERTScore, where each response's weight derives from its model's estimated capability.
-
Evaluation across four benchmarks under ID and OOD conditions, including comparisons against fixed-cardinality ensembles to isolate the benefit of adaptive ensemble size.
Main Findings
-
PISA leads on single-model routing hypervolume. PISA achieves the highest macro-average normalized hypervolume among the evaluated single-model routers in both settings: 37.41 under ID and 22.85 under OOD, versus 35.78 and 21.33 for EmbedLLM-MF, the strongest competing router. PISA ranks first in six of the eight benchmark–setting combinations.
-
PISA-E leads ensemble task performance when quality is prioritized (α = 1). It reaches 75.27% macro-average task performance on ID benchmarks and 63.24% on OOD benchmarks, exceeding the strongest competing ensemble approaches by 2.09 and 2.87 percentage points, respectively. The authors note that some competitors win on individual benchmarks but none matches PISA-E on the macro average.
-
Better quality at lower cost at mid-range operating points. On ID benchmarks at α = 0.75, PISA-E reaches 73.78% at 84 × 10⁻⁴ USD/query, compared with SelectLLM's 73.18% at 132 × 10⁻⁴ USD/query — a 0.60 percentage-point gain with roughly 36% lower cost. On OOD at α = 0.85, it reaches 60.85% at 292 × 10⁻⁴ USD/query versus DFPE's 60.37% at 387 × 10⁻⁴ USD/query — 0.48 percentage points better at about 25% lower cost.
-
One fitted model spans a wide cost range. Lowering α from 1.0 to 0.3 on ID benchmarks reduces average inference cost by a factor of 21.5 while performance falls from 75.27% to 70.75%; on OOD the corresponding cost reduction is approximately 106-fold, with performance falling from 63.24% to 50.54%.
-
Ensemble size adapts to the prompt, not just to α. At α = 0.3, PISA-E uses a single model for 84.33% of ID queries and 82.41% of OOD queries; average cardinality rises to 6.42 (ID) and 7.39 (OOD) at α = 1.0. Even at α = 1, a single model is still chosen for 21.56% of ID queries and 9.31% of OOD queries, so cardinality remains prompt-dependent even when cost is not penalized.
-
Adaptive cardinality outperforms every fixed size in hypervolume. Under the p70 cost reference, PISA-E attains a full macro-average HV of 32.82, compared with 31.78 for fixed k = 1, 31.16 for k = 3, 30.31 for k = 5, 28.90 for k = 7, 26.18 for k = 9, and 19.18 for k = 11. Fixed-cardinality variants do win individual benchmark–setting cells (e.g., fixed k = 1 on RouterBench ID at 46.99 and SPROUT ID at 38.65; fixed k = 7 on Track-2 OOD at 23.25), but not the macro average.
-
Oracle headroom remains. An oracle single-model selector using ground-truth scores reaches 91.78% ID and 87.29% OOD macro-average performance, far above all evaluated deployable methods, indicating substantial room for improvement in capability estimation and ensembling.
Methodology in Plain English
The authors treat routing as a prediction problem: before calling any model, guess how likely each model is to answer this particular prompt correctly, then weigh that guess against the model's price.
For the guess, they embed the prompt with Qwen3-Embedding-8B, cluster the training embeddings with X-means (which picks the number of clusters itself), and describe each new prompt by how strongly it belongs to each cluster rather than assigning it to one. Each candidate model then gets its own logistic-regression head that maps this soft membership vector to a probability of being correct; regularization strength is chosen per model by 5-fold cross-validation over ten logarithmically spaced values between 10⁻⁴ and 10⁴. Cost is simply each model's average observed training cost, divided by the most expensive model's average so it lands in [0, 1].
A single parameter α ∈ [0, 1] blends the two: α·(predicted quality) + (1−α)·(1 − normalized cost). Setting α = 1 means "quality only"; α = 0 means "cheapest wins." For single-model routing, the highest-scoring model is called.
For ensembles, exhaustively modelling every possible subset is infeasible, so PISA-E instead borrows the individual probability estimates. It assumes each selected model independently succeeds with its predicted probability and computes the chance that a strict majority of the chosen models is right. Odd sizes only are considered, because for the majority criterion an even-sized ensemble can never beat the odd-sized ensemble obtained by dropping one member — and the smaller one is also cheaper. Models are ranked per prompt by utility (using cost normalized against the most expensive allowed subset), and candidate ensembles are the odd-length prefixes of that ranking, up to eleven models. The best prefix is queried in parallel, and the final answer is the response whose BERTScore similarity to the other responses is highest, weighted by each model's predicted capability.
The experiments span four benchmarks (LLMRouterBench Track-2, RouterBench, FusionBench, SPROUT), five random seeds, both in-distribution evaluation and out-of-distribution evaluation where routers train only on ID task groups and are tested on held-out task groups. Baselines for routing are EmbedLLM, Avengers-Pro, K-NN, and an MLP; ensemble baselines are DFPE, LLM-TOPLA, SelectLLM, PairRanker (pretrained and fine-tuned), and BERTScore-based MBR.
Why This Matters
Research impact. The paper reframes ensembling as a routing decision rather than a fixed architectural choice, and shows that per-model capability estimates can be recycled to reason about combinations without combinatorial training. The strict-majority surrogate and the odd-cardinality argument give a lightweight, analyzable alternative to learned ensemble quality predictors, and the reuse of one fitted router across many α values separates "train once" from "decide at serving time" — a distinction that matters for any deployment-facing routing research.
Real-world applications:
- Web search and answer engines that must serve millions of heterogeneous queries per day under a fixed budget, where cheap models suffice for easy queries and expensive ones are reserved for hard ones.
- Enterprise LLM gateways and API brokers that pass traffic to a pool of vendor models and need a per-tenant dial for "cheap vs. best."
- Agentic and tool-using pipelines where intermediate reasoning steps vary in difficulty and ensembling only the hard steps avoids multiplying cost.
- Regulated or high-stakes question answering (medical, legal, financial intake) where a majority-vote ensemble offers a quality floor, but only when the query warrants it.
Industry relevance. The headline operating points — higher macro-average task performance at roughly 36% (ID) and 25% (OOD) lower cost than the strongest ensemble baselines — speak directly to inference-cost line items. The ability to slide α at request time, without retraining, maps onto a product knob rather than an engineering project.
Future Directions
- Closing the gap to the oracle. Oracle performance (91.78% ID, 87.29% OOD) is far above every evaluated method, so better capability estimation — richer prompt representations, calibrated uncertainty, or learned rather than averaged cost models — is the obvious next lever.
- Beyond the greedy prefix search. The paper restricts candidates to odd-length prefixes of a utility ranking and does not guarantee the globally optimal subset; the authors point to an appendix comparison with exhaustive surrogate optimization, leaving faster near-exact subset search as open work.
- Modeling dependence among models. The strict-majority surrogate assumes conditional independence of model correctness given the prompt, which is a simplification for models that share training data or failure modes; relaxing it is a natural extension.
- Prompt-dependent cost and richer resolvers. Cost is currently a per-model training average rather than a function of prompt length or output length, and the resolver is one of several possible aggregation strategies; both are places where the framework could tighten its cost–quality accounting.
- Stress-testing adaptivity. Since fixed-cardinality variants still win individual benchmark cells (e.g., fixed k = 1 on RouterBench and SPROUT ID), understanding when adaptivity pays off — and whether the surrogate's ranking is reliable in those regimes — is worth systematic study.
Target Audience
Researchers and practitioners working on LLM serving infrastructure, model routing, and inference-cost optimization; engineers building multi-model gateways or agent systems who need a principled way to trade quality for cost per request; and graduate students studying ensemble methods or mixture-of-models selection who want a compact, reproducible framing of routing as subset selection. Readers primarily interested in training-time model improvement, rather than serving-time model selection, will find it less directly applicable.
Authors’ abstract
Large language models (LLMs) increasingly support Web-based services that must balance response quality and inference cost across heterogeneous requests. Conventional routing selects one model per prompt, while fixed ensembles cannot adapt their composition and cost to individual requests. We introduce PISA, a prompt-adaptive, cost-aware single-model router, and PISA-E, its extension to ensemble routing. At the core of both methods, PISA combines soft cluster memberships…
The full abstract on arXivRelated papers
- AscendGYM: A Cost-Aware Kernel Optimization Benchmark for Real-World Workloads on Ascend NPUs 2026-11-13 · cs.AI · Key terms of the title in common
- The SIMPLE Law for Energy Cost of LLM Inference 2026-11-02 · cs.AI · Key terms of the title in common
- AcrossVAM2.0: Conflict-Aware Point Supervision for Parameter-Efficient Video Diffusion Adaptation 2026-10-10 · cs.AI · Key terms of the title in common
- Persistent Memory in Multi-Agent LLM Inference: What It Costs, What It Buys, and When You Can Tell 2026-10-06 · cs.AI · Key terms of the title in common
- Risk-Aware Adaptive Evaluation: Finding High-Impact Failures Under Limited Budgets 2026-09-30 · cs.AI · Key terms of the title in common