By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
A single faithfulness evaluation is not one LLM call; it is at least two — one to answer, one to judge — and often more. Multiply by a 200-case dataset, ten commits a day, and a team of six, and your 'free' test suite has a monthly invoice. Budgeting is part of test strategy, not an afterthought.
cases = 60 # golden questions
runs_per_case = 1
calls_per_case = 2 # 1 answer + 1 judge
tokens_per_call = 1200 # prompt + completion, both calls
price_per_million= 3.00 # example blended price in USD
per_run = cases * runs_per_case * calls_per_case * tokens_per_call
cost = per_run / 1_000_000 * price_per_million
print(f'{per_run:,} tokens per run = ${cost:.2f}')
# 144,000 tokens per run = $0.43
# 10 commits/day x 22 days = $95/month for one suiteForty-three cents sounds harmless until you add a 500-case regression suite, three model variants, and a nightly run. The point is not to be stingy; it is to be deliberate about which tests earn their cost.
Tier your suites. A fast smoke suite (15 cases) on every commit; the full 200-case suite nightly and before release.
Use a cheap judge where a cheap judge is enough. A small model scores 'is this refusal correct?' nearly as well as a frontier model, at a tenth of the price.
Cache aggressively. The same document chunks and the same system prompt get re-sent constantly. Prompt caching can cut input cost by more than half.
Mock the model for logic tests. Prompt assembly, JSON parsing, threshold maths and guardrails need no model at all. These should be plain unit tests that run in milliseconds.
Sample smartly, not randomly. 40 well-chosen cases beat 400 random ones. Stratify by intent, then by difficulty, then by known failure mode.
AI latency has three parts, and only one of them is your provider's fault:
| Part | Typical range | What makes it worse |
|---|---|---|
| Retrieval | 20–200 ms | Large top-k, no index tuning, cross-region vector DB |
| Time to first token | 300 ms – 2 s | Big prompts, long context, cold start |
| Generation | 0.5–10 s | Long answers, high max_tokens, reasoning models |
Users judge AI by time to first token, not total time. A streaming answer that starts in 400 ms feels fast even if it finishes in six seconds. Test both: first-token latency for perceived speed, total latency for timeout budgets.
Key takeaways
Every eval is at least two model calls; budget in tokens, not in test counts.
Tier suites: smoke on every commit, full suite nightly and pre-release.
Caching, cheap judges, mocks and stratified sampling cut cost far more than cutting cases.
Test time-to-first-token and total latency separately, and log cost per request.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.