# AI Model Cascades A model cascade sends every request to a cheap model first, decides whether that answer is good enough, and escalates to a more expensive model only when it isn't. Most inputs are easy, so most of them never reach the expensive tier. You get close to the big model's quality at a fraction of its cost. It sounds like [[Model routing]], and the two are cousins, but there's one difference I find important. A router decides *before* anyone answers ("this looks hard, send it to the big model"). A cascade decides *after* the cheap model answered ("this answer looks wrong, try again higher up"). A router predicts difficulty; a cascade checks work. The quality of a cascade depends entirely on how good that check is. ## The general idea The classic cascade is the Viola-Jones face detector (2001). Scanning an image means evaluating a huge number of sub-windows, and almost none contain a face. So the first stage is a tiny classifier (two features) tuned to almost never miss a face while throwing away a large share of the windows. Each following stage is more expensive and only sees what survived. That's what made real-time face detection possible on 2001 hardware. LLMs brought the idea back: - **FrugalGPT** (Chen, Zaharia, Zou, Stanford, 2023) chains LLM APIs from cheap to expensive, with a learned scorer that decides whether to accept each answer or move up. The paper reports matching GPT-4's performance with up to 98% cost reduction, or improving on GPT-4's accuracy by 4% at the same cost - **RouteLLM** (LMSYS, 2024) is the router side of the same coin: classifiers trained on Chatbot Arena preferences pick a strong or weak model per query. Over 85% cost reduction on MT Bench (45% on MMLU, 35% on GSM8K) against GPT-4 alone, while keeping 95% of GPT-4's quality - **[[AI Speculative Decoding]]** is a cascade at the token level: a small draft model proposes tokens, the big model verifies them, and you only pay the big model's full price where the draft was wrong - **[[GitHub Copilot Fusion]]** (GitHub, GA October 2026) puts a cascade in a mainstream product. Its Cascade workflow has an efficient model draft the answer and a judge accept it or escalate to a stronger model. It sits next to a plain router (one model, picked up front) and a critique loop (several reviewers, one revision), and Fusion picks among the three per prompt The weak point of every LLM cascade is the scorer. How do you know the cheap answer is wrong? Asking another LLM "is this answer good?" adds latency and cost, and a vague "is this good?" gives mushy answers. Model-written confidence ("I'm fairly sure") isn't a probability you can threshold. ## How Jev makes it cheap [[Jev]] is a good fit for the scorer role for three reasons: it's fast (~100 ms), it's cheap enough that the check doesn't eat the savings ($0.042 per million input tokens, output free), and it returns probabilities you can threshold. TypeSafe also pitches it for the router role (a Choice over which model to call), which is [[Model routing]] done with a decision model. ## Worked example: the SDE cascade The structured-data extraction (SDE) cookbook builds a three-step cascade: 1. **Extract** with `gpt-5.4-mini` ($0.75 / $4.50 per million tokens) 2. **Verify** each field with a battery of Noul questions in one Jev call 3. **Escalate** to `gpt-5.5` with high reasoning effort (~7x the mini's price) only if a verifier fires The walkthrough uses an NYU events-calendar page where the scrape captured only navigation and boilerplate. There's no registration date and no description on the page. The mini model returns a *schema-valid fabrication*: `description: "Registration opens for the fall semester"`, which is the example value from the schema's own field description, parroted back. JSON Schema validation passes. [[LLM Structured Outputs]] wouldn't catch this either, because the structure is fine; the content is invented. The Jev verifier asks narrow per-field questions, each framed so that TRUE means "something is wrong". Probability of a problem: | Verifier head | P(wrong) | |---|---| | hallucinated | 0.95 | | off_target | 0.85 | | unreasonable | 0.58 | | whole-record "should this record be escalated?" | 0.56 | | incomplete | 0.16 | | format | 0.10 | | type mismatch | 0.02 | Two heads fire above 0.7, so the record escalates. The reasoning model returns an honest empty `""`. Notice the whole-record judge: 0.56, basically a shrug. The per-field heads localize the problem; the "is the whole thing good?" question doesn't. Over 100 prompts (TypeSafe's internal results, shown as a chart), sweeping the escalation threshold from 0 to 1 traces a Pareto frontier that sits up and to the left of every single model. `gpt-5.5` alone scored about 0.81 quality at about $0.10 per extraction; the cascade gets most of that quality for a fraction of the cost. ## Worked example: a decision model that asks Opus for help Hightouch tested a cascade on identity resolution in November 2026. The job: look at an identity (a group of customer records that the matching step put together) and say whether it's really one person or an over-merge, i.e. records from several people glued into one. A human reviewer gets through about 50 identities per hour, so they wanted a model to do the grading. The data is synthetic: 1,000 identities generated with pseudopeople (a tool from the University of Washington's IHME), half single people with noisy records, half over-merges. A second, harder set keeps only the tricky cases: typos on key fields, twins, a junior and a senior with the same name. Every model got the same prompt with a list of common data errors (typos, nicknames, swapped month and day, people who move and age). That list helped every model more than anything else. Each model alone, on the easy set: | Model | Accuracy | Time per identity | Cost per 1,000 | |---|---|---|---| | [[Claude Opus 5.5]] | 99.0% | 2.2 s | $3.86 | | [[GPT-6 Sol]] | 98.3% | 2.1 s | $2.50 | | Gemini 3.1 Pro | 98.3% | 4.2 s | $4.48 | | [[GPT-6 Luna]] (Decisions API, 70% cutoff) | 97.3% | 0.17 s | $0.10 | | [[Jev]] (60% cutoff) | 95.7% | 0.15 s | $0.05 | On the harder set, both decision models fell to about 89% (Jev 89.1%, Luna 88.8%). Opus held 95.1%. Then the cascade. The decision model answers first, and every identity whose confidence lands in an uncertain band goes to Opus for a second opinion: | Setup | Band sent to Opus | Easy set | Harder set | |---|---|---|---| | Jev, then Opus | 30-90% | 98.8%, $0.88 per 1,000 (22% escalated) | 95.3%, $2.94 per 1,000, 1.56 s | | Luna, then Opus | 10-90% | 98.5%, $0.33 per 1,000 (6% escalated) | 91.6%, $1.15 per 1,000 | | Opus alone | | 99.0%, $3.86 per 1,000 | 95.1%, $5.39 per 1,000, 2.6 s | On the hard set, Jev plus Opus matches Opus alone for about half the price. The "4x lower cost" in the Hacker News title comes from the easy set ($0.88 vs $3.86). Calibration made the difference (see [[AI Model Calibration]]). Jev's mistakes cluster around 50% confidence, so they fall inside the band and reach Opus. Luna was the more accurate model alone, but on the hard set it became "spectacularly over-confident": its wrong answers sat above the band and were never escalated. Jev also sent more cases to Opus on the harder data without any change to the prompt or the harness, so the spend followed the difficulty by itself. Notice there's no separate verifier here. The scorer is the cheap model's own confidence, which only works because Jev's probabilities are usable. It's [[Confidence-Gated Routing]] with a stronger model as the fallback. Anthropic's advisor tool packages a related idea inside one API: the executor model consults a stronger advisor model when it decides it needs help. What the Hacker News thread added: - **One task, synthetic data.** The article only covers over-merging, the size of the harder set isn't given, and the costs come from Hightouch's own setup. The author agreed that other tasks may behave differently ("YMMV") - **A calibration claim needs a number.** One commenter argued that "Jev is more calibrated than Luna" needs an expected calibration error, not a look at where the mistakes fall - **Let it abstain.** Names and dates are ambiguous without context. Some identities are undecidable, and the model should be able to answer UNDECIDED instead of forcing a call - **Escalate on stakes too.** How does a weak model know it needs help? One answer: it doesn't have to. The system decides which calls are too important to leave to the cheap tier, whatever its confidence - **The price gap can close.** One team saw "the cost differences disappeared almost immediately" for their tasks once [[Claude Haiku 5.5]] arrived. A cascade only saves what separates the tiers, so recheck the numbers when a new small model ships - **Field reports.** Another team said a low threshold (around 10%) cut their work by about 70% "with 0% quality loss (in our benchmarks)" - **Privacy.** Identity resolution links records to real people. Cheaper, better matching also makes profiling easier, and several commenters called it a privacy problem. Others replied that ad tech already does this ## What makes a good verifier The cookbook's appendix is the most reusable part, and it applies to any cascade: - **Narrow and grounded.** One checkable fact about one field against the source ("is this value absent from the source?"), not "is this extraction good?" - **Bad = TRUE.** Phrase every question so the escalate case is the yes case, with explicit criteria for what true and false mean - **Per field, then aggregate with max.** One confident red flag should escalate. Averaging would drown it ("averaged into silence") - **Independent of the extractor.** A different model catches blind spots the extractor shares with itself - **Cheap.** If the check costs as much as the big model, there are no savings left - **Separating.** High on real errors, low on correct fields, so one threshold splits accept from escalate cleanly ## Gotchas - **The Pareto chart is internal and unreplicated.** TypeSafe says the costs weren't recalculated at the current Jev rate. Treat it as a demonstration, not a benchmark - **Stochastic cheap models.** The mini model invented a different description on nearly every run, even at temperature 0. The cookbook hard-codes one fabrication for reproducibility. Your cascade has to hold up against that variability - **The verifier can only flag what it's asked about.** A missing head means a missed error class. Spend time on the battery - **Latency adds up on escalation.** The escalated items pay cheap model + verifier + expensive model. Fine for batch, worth measuring for interactive paths - **Calibration drifts.** The threshold you tuned last month may not hold on next month's data. Re-check the frontier periodically ## My take Cascades are one of the few AI cost-cutting techniques I trust, because they don't pretend the cheap model is as good as the expensive one. They just stop paying for the expensive one when it isn't needed. The [[Pareto Principle]] is at work: most inputs are easy, and a small share of hard cases deserves the big model. What the TypeSafe cookbook adds is a concrete answer to the hardest part, the scorer. Break verification into narrow, per-field, bad-equals-true questions, OR them together with max, and you get a check that's cheap and points at the exact field that's wrong. I'd use the same design with any verifier, decision model or not. And I'd combine it with [[Confidence-Gated Routing]] at the end of the chain: when even the big model is unsure, a human should see it. The Hightouch test taught me something I didn't expect: when you pick the first tier, compare calibration, not accuracy. The more accurate cheap model (Luna) made the worse cascade, because its confident mistakes never reached Opus. ## References - [SDE cascade cookbook (TypeSafe docs)](https://docs.typesafe.ai/cookbooks/sde_cascade) - [Use-case map (TypeSafe docs)](https://docs.typesafe.ai/concepts/use-case-map) - [Chen, Zaharia, Zou, FrugalGPT (2023)](https://arxiv.org/abs/2305.05176) - [Ong et al., RouteLLM (2024)](https://arxiv.org/abs/2406.18665) - [RouteLLM announcement (LMSYS blog, 2024)](https://www.lmsys.org/blog/2024-07-01-routellm/) - [Viola-Jones object detection framework (Wikipedia)](https://en.wikipedia.org/wiki/Viola%E2%80%93Jones_object_detection_framework) - [LLM judges for identity resolution (Hightouch blog, November 2026)](https://hightouch.com/blog/llm-judges-identity-resolution) - [Hacker News, "A Jev that can ask Opus for help gives Opus accuracy at 4x lower cost"](https://news.ycombinator.com/item?id=50397429) ## Related - [[Model routing]] - [[GitHub Copilot Fusion]] - [[Confidence-Gated Routing]] - [[AI Model Calibration]] - [[AI Speculative Decoding]] - [[AI Cost Management]] - [[AI Hallucination]] - [[LLM Structured Outputs]] - [[Atomic Question Decomposition]] - [[Pareto Principle]] - [[Jev]] - [[Decision Models (DMs)]] - [[Cloudflare Clairic]]