BEST-Route: Adaptive LLM Routing with Test-Time Optimal Compute

Dujian Ding, Ankur Mallick, Shaokun Zhang, Chi Wang, Daniel Madrigal +5 more
6/28/2025
cs.LGcs.AIcs.CL

No official code found. Best implementation: microsoft/best-route-llm (66 stars, MIT, last commit 2026-04-08).

Abstract

Large language models (LLMs) are powerful tools but are often expensive to deploy at scale. LLM query routing mitigates this by dynamically assigning queries to models of varying cost and quality to obtain a desired trade-off. Prior query routing approaches generate only one response from the selected model and a single response from a small (inexpensive) model was often not good enough to beat a response from a large (expensive) model due to which they end up overusing the large model and missing out on potential cost savings. However, it is well known that for small models, generating multiple responses and selecting the best can enhance quality while remaining cheaper than a single large-model response. We leverage this idea to propose BEST-Route, a novel routing framework that chooses a model and the number of responses to sample from it based on query difficulty and the quality thresholds. Experiments on real-world datasets demonstrate that our method reduces costs by up to 60% with less than 1% performance drop.

View on arXivView PDF

Code Implementations(1)

MIT

Efficient LLM query routing via multi-sampling. BEST-Route selects both model and number of responses based on query difficulty, cutting costs by up to 60% with <1% performance drop. From the paper:https://arxiv.org/abs/2506.22716

669Python, Jupyter NotebookMay 28, 20256 months agoMIT

Similar Papers

Cite this paper

@article{ding2025bestroute,
  title  = {BEST-Route: Adaptive LLM Routing with Test-Time Optimal Compute},
  author = {Dujian Ding and Ankur Mallick and Shaokun Zhang and Chi Wang and Daniel Madrigal and Mirian Del Carmen Hipolito Garcia and Menglin Xia and Laks V. S. Lakshmanan and Qingyun Wu and Victor Rühle},
  year   = {2025},
  eprint = {2506.22716},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.22716v1},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.22716.svg)](https://codeofpaper.com/paper/2506.22716)

Discussion