
Researchers at Ramp have published a study demonstrating how online learning techniques—specifically Thompson sampling—can optimize language model routing by automatically selecting the most cost-efficient model for each user query. This approach allows organizations to reduce computational costs while maintaining performance, addressing a key operational challenge for businesses deploying multiple LLMs.
Summaries like this, in your inbox every morning.
Sign up free →What happened
Researchers at Ramp published a study on Thompson sampling—a machine-learning technique—applied to language model (LLM) routing, which is the task of directing user queries to the most cost-efficient AI model for each task.
Why it matters
Most businesses today use a single LLM or manually pick which model to use for different tasks. Online learning can automatically learn which model is cheapest and most effective for each type of request, potentially reducing infrastructure spending without sacrificing quality.
What to watch
The full technical paper is available at builders.ramp.com/post/thompson-sampling-model-routing for developers and teams evaluating LLM deployment strategies.
Ramp researchers have published a study on applying online learning to language model routing. The core problem is straightforward: organizations that deploy multiple LLMs must decide which model to route each user query to, balancing factors such as cost, speed, and answer quality. Rather than hard-coding these decisions or requiring manual tuning, the research proposes using Thompson sampling—a probabilistic technique that learns the optimal routing policy over time. Thompson sampling works by maintaining a statistical model of the cost and quality outcome for each model on each task type, then probabilistically selecting models in a way that balances exploring new information and exploiting known-good choices. As the system processes real user queries, it observes which model choices lead to good outcomes at low cost, and refines its routing decisions. This approach is called "online learning" because the system learns from live traffic rather than from a static training dataset. The full technical details, methodology, and results are available in the research paper at builders.ramp.com/post/thompson-sampling-model-routing.
The research addresses a practical challenge in modern AI infrastructure: as organizations deploy multiple language models to balance cost, speed, and quality, the decision of which model to use for each request becomes operationally complex. Manual routing rules are inflexible and do not adapt as model pricing, performance, or user workloads change. Thompson sampling—a statistical technique from the online learning literature—offers an automated alternative that continuously learns the cost-effectiveness trade-off for each request type and adapts its routing decisions over time. This framing positions LLM routing not as a one-time configuration problem but as an ongoing learning process, potentially significant for teams operating cost-sensitive AI systems.
AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.
Free · takes 30 seconds · unsubscribe anytime
No comments yet. Be the first to share your thoughts!
Log in to join the discussion





Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.
Get Started FreeFree · takes 30 seconds · unsubscribe anytime