Sub topic 10
Variance across runs and settings
This chapter assumes you can read Python, know what a pointwise judge prompt looks like, and understand proportions and standard deviation. It covers one question: if you run the same judge on the same data twice, how different can the answers be, and what should you do about it?
Why the same judge gives different answers
An LLM judge is a sampled model. The model produces a probability distribution over the next token, and the serving system picks from it. Two calls with identical input can return different scores. Teams often discover this late, when a pass rate moves by two points between two runs of an unchanged pipeline and nobody can say whether the product got worse.
Variance matters for judges for three reasons:
- A score is often compared against a threshold, such as "pass if score is at least 4". Items near the threshold flip between pass and fail on small perturbations.
- Pairwise verdicts on near-equal answers are close to coin flips, so a small win rate can be noise.
- Variance adds to the sampling error of your evaluation set. The confidence intervals in a later chapter do not capture it unless you design for it.
Where the variance comes from
Several separate sources contribute. Treat them separately, because each has a different fix.
| Source | What happens | Typical fix |
|---|---|---|
| Sampling temperature | Higher temperature makes the judge pick lower-probability tokens, including a different score | Use temperature 0 or a low value for judging |
| Reasoning before the score | A free-text rationale is itself sampled, and the score follows from whatever the rationale said | Keep rationales short, or average over several samples |
| Serving nondeterminism | Even at temperature 0, batching, floating-point order, and hardware differences can change outputs | Do not assume bit-exact repeatability, and measure it |
| Prompt wording | Reordering rubric lines or renaming a scale label can shift scores | Freeze the prompt and version it |
| Item difficulty | Clear-cut answers get stable scores, borderline answers do not | Report instability per item, not only overall |
| Parameter limits | Providers may ignore or restrict some settings, such as a seed | Check what your provider guarantees |
Temperature 0 reduces variance but does not remove it. Many hosted models do not promise deterministic output even with a fixed seed, and the model behind an endpoint can change when the provider updates it. That second effect is drift, covered in a later chapter.
Measuring variance before you trust a score
The most useful habit is to run the judge several times on the same inputs and look at the disagreement. Three numbers are worth tracking:
- Per-item spread. For each item, the standard deviation or range of its scores across runs.
- Flip rate. The fraction of items whose pass/fail verdict is not the same in every run.
- Run-to-run spread of the aggregate. The standard deviation of the overall pass rate across repeated full evaluations.
The flip rate tells you how many items are unstable. The aggregate spread tells you how much a headline number can move for no real reason. If the aggregate spread is larger than the improvement you are trying to detect, the judge cannot support that conclusion.
A runnable experiment
The code below simulates a judge as a true quality value plus Gaussian noise, rounded to a 1 to 5 score. Real judges are not Gaussian, but the simulation shows how aggregation changes the aggregate spread. It compares a single call per item with the median of five calls per item. The number of runs is large enough to make the spread estimate stable.
import random
from statistics import median, pstdev
TRUE_SCORES = [1.5, 2.5, 3.5, 3.9, 4.1, 4.5, 5.0, 3.0, 4.0, 2.0] * 10
def noisy_judge(true_score, rng, noise=0.7):
return min(5, max(1, round(true_score + rng.gauss(0, noise))))
def pass_rate(k, rng):
passes = 0
for t in TRUE_SCORES:
votes = [noisy_judge(t, rng) for _ in range(k)]
passes += median(votes) >= 4
return passes / len(TRUE_SCORES)
rng = random.Random(0)
for k in (1, 5):
rates = [pass_rate(k, rng) for _ in range(200)]
print(f"votes per item = {k}: spread of pass rate = {pstdev(rates):.3f}")Each of the 200 repetitions is one complete evaluation of the same 100 items. The printed value is how much the pass rate wobbles between repetitions. The five-vote median gives a smaller spread, because the median of an odd number of votes stabilizes most items. Items with a true score near 4 still flip sometimes, since their votes are split.
Use an odd number of votes with the median or majority, so that no tie needs a tiebreaker. Five votes cost five times as much as one. Spend that budget on the items that need it, for example by re-judging only items whose first two votes disagree.
Settings that change the score distribution
Variance is the spread around one expected score. Settings can also move the expected score itself, which is a bias in the measurement rather than noise. Two examples:
- Scale granularity. A 1 to 10 scale is noisier than a 1 to 5 scale, because adjacent labels are hard to tell apart. Judges also cluster on a few values, such as 8, which makes the extra resolution misleading. A small scale with defined anchors for each level is more repeatable.
- Reasoning length. Asking for long reasoning before the score can move the average score compared with asking for the score alone. Neither is always better. What matters is that you pick one setting, validate it, and keep it fixed.
Changing any of these settings creates a new judge. Scores from the old setting and the new setting are not comparable, even if the model name is the same.
Reporting and decision rules
Practical rules for using this in a pipeline:
- Run the judge at least three times on a validation sample before you adopt it, and report flip rate and aggregate spread alongside the score.
- Set temperature as low as the provider allows for the final scoring runs. Record the exact value.
- Use the median or majority of an odd number of votes on borderline items.
- When comparing two systems, judge both with the same judge, the same prompt, and in the same time window, so that serving changes affect both equally.
- Treat a difference smaller than the run-to-run spread as unresolved. Gather more items or more votes before acting.
- Store raw verdicts, not only aggregates, so you can recompute spread later.
Averaging over repeated votes reduces random noise only. It does not fix a bias. If the judge prefers longer answers, five votes will prefer them five times. Variance and bias are separate problems and need separate checks.
Exercise
A judge scores 200 items with temperature 0. You run the evaluation three times and get pass rates of 71%, 74%, and 69%. A prompt change that you hope improves your system yields 73%. Can you conclude the change helped? Name two ways to make the comparison more reliable.
Show answer
No. The three runs of the unchanged setup already span 69% to 74%, so a result of 73% sits inside the run-to-run spread and is not distinguishable from noise. To make the comparison more reliable, use a median or majority of an odd number of votes per item (for example five) to shrink the aggregate spread, and judge both versions in the same window with identical judge settings. Adding more evaluation items, or repeating the full run and comparing means, also helps. Re-judging only the unstable items is a cheaper variation.
Exercise
In the experiment above, why is an odd number of votes preferable when you use the median or majority?
Show answer
With an odd count, the median is always one of the actual votes and a majority verdict can never tie. An even count can split evenly, which forces an arbitrary tiebreaker that adds back some of the noise you were trying to remove.