Judge calls add up fast
A 500-case eval with a strong judge model can run $20-100 per execution. Run it on every PR and you are paying $1000-5000/month for evaluation. Manageable, but worth optimizing.
Six cost-cutting techniques
- Cache by hash — same input + same prompt + same judge model = same answer. Cache the result. Re-runs of unchanged cases cost zero.
- Cheap-judge first, expensive-judge second — use a cheap model for an initial verdict; only escalate to the expensive judge when the cheap one says fail or is uncertain.
- Sample, do not exhaust — for online evals on production traffic, judge 1-5% of calls, not all of them.
- Batch when possible — judge multiple cases per request when API supports it (Anthropic's batch API, OpenAI's batch endpoint).
- Prefer structured-output mode — eliminates retry loops on malformed JSON, saving 5-15% in failed-call costs.
- Model down for trivial axes — format-compliance and length checks don't need a frontier model. Use Haiku / GPT-mini / a small open model for those.
Principle: Match judge model strength to question difficulty. Frontier models for nuanced quality, small models for plumbing checks. Wasting Opus on regex-equivalent questions is just spending money.
Track cost per eval run
Most LLM frameworks expose token usage. Log it. The metric "cost per eval run" should appear on your eval dashboard. If a refactor doubles eval cost, someone should notice immediately, not on the next billing report.