A Unified Approach to Routing and Cascading for LLMs
cs.CL
Submitted: 2024-10-14
Updated: 2026-10-12
Code: https://github.com/eth-sri/cascade-routing
License: http://creativecommons.org/licenses/by/4.0/
The gist: The availability of a wide range of large language models (LLMs) embedded in various agentic systems has significantly increased the potential of model selection strategies to improve the
Terminology
Abstract
The availability of a wide range of large language models (LLMs) embedded in various agentic systems has significantly increased the potential of model selection strategies to improve the cost-performance tradeoff. Existing strategies involve either routing, where a single model is chosen per query, or cascading, which sequentially runs increasingly larger models until a satisfactory answer is found. However, current approaches face three key limitations: they (1) lack formal proofs of optimality, (2) fail to identify the conditions under which these strategies are most effective to improve the cost-performance tradeoff, and (3) are unable to combine both paradigms for further improvements. To address these issues, we first derive a novel optimal strategy for cascading and prove the optimality of an existing routing strategy. Further, we propose cascade routing, a unified framework that integrates routing and cascading into a theoretically optimal strategy. Through our analysis, we identify good quality estimators as the critical factor for the success of model selection paradigms. Finally, in our experiments, we show that cascade routing consistently outperforms the individual approaches by a large margin and we analyze quality estimators to determine when routing and/or cascading are useful paradigms for model selection.
Sources
- Program Synthesis with Large Language Models
- FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance
- Learning to Route LLMs with Confidence Tokens
- Learning How Hard to Think: Input-Adaptive Allocation of LM Computation
- Tryage: Real-time, intelligent Routing of User Prompts to Large Language Models
- RouterBench: A Benchmark for Multi-LLM Routing System
- Qwen2.5-Coder Technical Report
- LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code
- Mistral 7B
- BabyBear: Cheap inference triage for expensive language models
- OptLLM: Optimal Assignment of Queries to Large Language Models
- AutoMix: Automatically Mixing Language Models
- MetaLLM: A High-performant and Cost-efficient Dynamic Framework for Wrapping LLMs
- MixEval: Deriving Wisdom of the Crowd from LLM Benchmark Mixtures
- RouteLLM: Learning to Route LLMs with Preference Data
- GPT-4 Technical Report
- Optimising Calls to Large Language Models with Uncertainty-Based Two-Tier Selection
- Large Language Model Routing with Benchmark Datasets
- MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmark
- Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvement
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering