How it works · 33 of 37 Advanced

What is model routing in AI apps?

The right size for each question

Model routing: Send easy requests to a small, cheap model and hard ones to a big one.

Loading the animation…

Say it like this A router sends each request to the cheapest model that can handle it, so easy questions don't pay big-model prices.

Under the hood — for builders
How much it saves
In RouteLLM's test, a trained router kept 95% of GPT-4's quality while sending only about one question in seven to it.
The price gap
The gap a router exploits is huge: RouteLLM priced GPT-4 at about 100 times the small model per token.
How a router decides
It is a small model itself, trained on which answer people preferred, that scores how hard each question is before anything else runs.
Router cost
Running the router is tiny: RouteLLM measured $3–39 per million requests, under 0.4% of GPT-4's cost.
Another way: cascades
FrugalGPT tries cheap models first and escalates only when unsure: GPT-4's quality for up to 98% less.
Works on other models
RouteLLM's routers kept working on new pairs (Claude 3 Opus/Sonnet, Llama 3.1 70B/8B) without retraining.
Watch out
A router trained on chat questions may misjudge your domain; check its picks on your own traffic.
Sources
Ong et al., RouteLLM: Learning to Route LLMs with Preference Data, arXiv 2406.18665 · Chen, Zaharia & Zou, FrugalGPT, arXiv 2305.05176.

What happens in the model routing animation, step by step?

  1. Two models wait down the line: a small one, and a big one that costs about 100 times more per word.
  2. Send every question to the big model and you pay top price even for “What's 15% of 80?”.
  3. Your turn: drag each card onto the Small or Big track (or tap it). Which ones really need the big model?
  4. Now the router does it: the points flip for each question, easy ones to the small model, hard ones to the big.
  5. Same answers where it matters, at 40% of the bill. In a published test, routing kept 95% of GPT-4's quality for 3.66× less.

What everyday example explains model routing?

Railway points sending each train down the right track.

Why should a team care about model routing?

Standard in cost-conscious deployments.