One model for everything, or a different model per step?

L3 · SeniorTrade-off~10 minLLM foundations

Your agent uses the largest frontier model for every call. It's accurate but slow and expensive. A teammate proposes a small model for most steps and the big one "when needed". How would you decide which steps get which model, and how would you know it worked?

Answer it out loud or on paper first. Then open the short answer.

Short answer

Decide per step with data. Split the agent's calls by job (routing, tool selection, extraction, planning, final writing), build a small eval set for each, and run candidate models on it with cost and latency. Cheap models are often fine for classification, extraction and formatting; planning, recovering from errors and long multi-step tool use are where large models usually earn their price. Then route statically by step type before trying dynamic routing, and keep an end-to-end eval to catch interactions. A step that fails 3% more often can cost more in retries and escalations than it saves.

Full answer

Break the agent into jobs

JobTypical difficultyOften OK with a small model?
Intent routing, classificationLowUsually
Extraction into a schemaLow–mediumOften, with validation
Choosing a tool and argumentsMediumDepends on tool count and ambiguity
Planning multi-step workHighRarely
Recovering after an error or surpriseHighRarely
Final answer writingMediumOften

Measure per job

For each job, 30–100 labelled cases from real traffic. Run each candidate several times. Record success rate, cost per call and latency (p50 and p95). Plot cost vs success; pick the cheapest model on the acceptable frontier.

Count the hidden costs

  • Retries: a model that fails validation 5% of the time adds calls.
  • Downstream damage: a wrong tool choice early wastes every later step.
  • Escalation: a fallback to the big model after failure costs both calls.
  • Operational: two providers or models means two sets of limits, outages and prompt variants.

Routing styles

StyleHowRisk
Static by stepEach node uses a fixed modelSimple; may overpay on easy instances
CascadeTry small, escalate on low confidence or validation failureConfidence signals are unreliable; double cost on hard cases
Learned routerClassifier predicts difficultyNeeds data; another component to maintain

Start static. Move to cascades only where a verifier gives a reliable failure signal (schema validation, tests passing).

Follow-ups

  1. L3. The small model scores 2 points lower on your end-to-end eval but costs a fifth. Ship it?

    Expected answer

    Depends on what the 2 points are. Read the failures: if they're harmless formatting issues, maybe; if they're wrong refunds, no. Weight failures by impact, not count.

  2. L3. How do you keep this decision current?

    Expected answer

    Re-run the per-step evals when models or prompts change; track production success and cost per step; treat model choice as config with a regression suite.

  3. L4. How would you present this to leadership?

    Expected answer

    Cost per successful task, not cost per token, with quality and latency side by side and the main risks.

Wrong answers interviewers hear
  • "Use the best model everywhere; quality is all that matters." Latency and cost are product requirements, and many steps don't need it.
  • "Use the cheapest model and fix problems with prompting." Some failures (planning, recovery) don't prompt away.
  • "Pick based on public leaderboards." Benchmarks rarely match your tools, data and failure costs; measure on your tasks.

Taught in

Improve this answer