Design a routing tier that sends only the hard queries to a frontier model
Describe a model-routing design that serves most traffic cheaply but escalates the queries that genuinely need a frontier model. What decides escalation, and what's the main risk?
Serve a cheap default model for most traffic and escalate only hard or low-confidence queries to a frontier model — capturing most savings while protecting tail quality.
Imagine a clinic where a nurse sees every patient first. Most people have a simple cold the nurse can handle, so they never wait for the expensive specialist. Only the tricky cases get sent upstairs to the doctor. Model routing works the same way. A small, cheap model answers the easy questions, and only the hard or doubtful ones get sent to the big, costly model. The catch is the nurse at the front — if they misjudge who needs the specialist, the wrong people get the wrong care.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Spend 6-8 minutes mapping the escalation-signal options to their cost-accuracy tradeoffs and the two error modes, so you can design and defend a router for any workload in an interview.
| Escalation signal | Cost to compute | Main weakness |
|---|---|---|
| Difficulty classifier | Very low | Needs labeled training data |
| Small-model confidence | Free | Noisy unless calibrated |
| Length / task heuristics | Free | Weakly correlated with real difficulty |
| Verify and retry | Two calls on escalation | Highest latency and cost on the tail |
Real products, models, and research that use this idea.
- A small, cheap default (Gemini 3.1 Flash or GPT-5.5-mini) with escalation to a frontier model (Claude Opus 4.7 or GPT-5.5) for hard reasoning queries is the canonical 2026 tiered setup.
- OpenRouter and Martian-style routing layers pick a model per request from a pool based on a learned difficulty score.
- RouteLLM (LMSYS) trains a router on preference data to send only the queries that need a strong model to the frontier tier.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you decide between a difficulty classifier and verify and retry for the escalation signal?
QYour router escalates 60% of traffic and the savings have vanished. How do you diagnose and fix it?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Designing the router without a labeled set to tune the escalation threshold, so it either over-escalates and loses the savings or under-escalates and tanks tail quality.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.