When to reach for it
- Request volume is high with mixed difficulty.
- Cost is a first-order constraint.
- A cheaper model handles a meaningful share of traffic without quality loss.
Route by difficulty. Pay for what the task needs.
A router scores each request's complexity and dispatches it to the cheapest model that still meets the quality bar, under explicit token / time / cost budgets, using prompt caching and model cascades.
A router scores request complexity and dispatches to the cheapest model that meets the quality bar; a failed quality check cascades up to a stronger model.
| Request type | Share | Model | USD per day |
|---|---|---|---|
| Order status, password reset | 60% | Small | 1.20 |
| Returns with a policy lookup | 30% | Medium | 4.50 |
| Contract disputes | 10% | Large | 9.00 |
MODELS = ["small", "medium", "large"] # cheapest first
def answer(request, budget_usd=0.10):
# 0, 1 or 2: a rule or one cheap call
start = classify_complexity(request)
spent = 0.0
for name in MODELS[start:]:
reply, cost = call(name, request)
spent += cost
if passes_check(reply) or spent >= budget_usd:
return reply # good enough, or the budget is used up
return reply # the cascade ended at the largest modelWhen to reach for it
When it backfires
Asking the LLM 'how confident are you, 1–10?' to decide routing is hallucination-prone and unstable; the router itself becomes the weakest link.
Countermeasure
Score complexity with a deterministic / statistical classifier (length, task type, historical difficulty) and validate routes against a quality signal rather than self-reported confidence.
Once most traffic is routed to the cheap model, regressions there go unnoticed — nobody is watching the cheap path.
Countermeasure
Sample and evaluate cheap-path outputs continuously (golden tests / LLM-as-judge) and fall back to the strong model when the quality bar is missed.
A complexity rubric tuned for one model pair silently misroutes once a new, cheaper model matches the old expensive one — or a price change inverts the cost math.
Countermeasure
Pin the rubric to a fixed evaluation set and re-benchmark whenever the model fleet or pricing changes; treat the rubric as versioned configuration, not a constant.
Keep going
Search patterns, frameworks, and pages.