Evals are nondeterministic - temperature, sampling, flaky agents. How do you get trustworthy numbers?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Accept that each eval score is a sample from a distribution, then engineer the variance down and measure what remains.
Full worked answer
Accept that each eval score is a sample from a distribution, then engineer the variance down and measure what remains.
Reduce variance where it's free:
- Grade at temperature 0 / greedy if that's how production runs and the API still lets you set it; otherwise eval at the production temperature - measuring greedy while shipping t=0.8 is measuring a different system. Note that even t=0 isn't fully deterministic on real serving stacks (batching and floating-point non-associativity flip tokens occasionally), so determinism is an approximation, not a guarantee. On many closed frontier APIs this knob is gone: as of late 2026 several providers ignore or reject custom temperature and top_p on their newest models, so sampling settings mainly belong to self-hosted serving. On those closed APIs you pin the snapshot and measure variance instead of trying to remove it.
- Pin everything pinnable: model snapshot, judge snapshot, dataset version, tool/sandbox environment (dependency versions, seeds, clocks). In agent sandboxes, flaky tests and non-reset state are variance you can actually eliminate - do it.
Measure the variance you can't eliminate:
- k repeats per case (k=3-5 for LLM calls; more for agents, whose trial-to-trial variance is enormous - single-run agent scores are anecdotes). Report mean ± a bootstrap CI over cases and runs. Per-case flip rates tell you which cases are coin flips - segment them out or fix their ambiguity.
- Judges are stochastic too: repeated judging of identical outputs flips verdicts. Include judge variance in your error bars or push the judge toward determinism (t=0 where the API allows it, structured output, a pinned snapshot) and validate that flip rates are near zero.
- For comparisons, use paired analysis (same cases, per-case deltas, McNemar/bootstrap-of-differences) - pairing cancels case-difficulty variance and is the single biggest power win available.
Choose metrics that embrace stochasticity rather than hide it:
- pass@k with the unbiased estimator (n ≥ k samples) when best-of-n reflects the product; pass^k (all k succeed) when reliability is the product metric - an agent at 80% per-trial is pass^8 ≈ 17%, and pass^k is the number that predicts user experience for repeated use.
- Report the distribution, not just the mean: a bimodal agent (great or catastrophic) and a uniformly mediocre one can share a mean and need different fixes.
Culture point: put error bars on every eval number shown in a decision context. Teams that see "78% ± 6" argue about different things - better things - than teams that see "78%."
What a good answer covers
- Accept that each eval score is a sample from a distribution, then engineer the variance down and measure…
- Grade at temperature 0 / greedy if that's how production runs and the API still lets you set it;…
- Pin everything pinnable: model snapshot, judge snapshot, dataset version, tool/sandbox environment…
- k repeats per case (k=3-5 for LLM calls; more for agents, whose trial-to-trial variance is enormous -…
- Judges are stochastic too: repeated judging of identical outputs flips verdicts
Key terms: Reduce variance where it's free · temperature 0 / greedy · k repeats per case · paired analysis · pass@k · pass^k
In the glossary: Temperature · Judge (LLM-as-judge) · Structured output · pass@k · Best-of-N · pass^k
Interviewer follow-ups to expect
Your CI budget allows 1 run per case or 3 runs on a third of the cases - which and why?
How do you handle cases that flip on identical inputs during error analysis?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep