Sub topic 6
Why judges are not neutral graders
This chapter assumes you have prompted an LLM before, can read Python, know what an evaluation set is, and understand proportions and averages. It gives an overview of judge bias. Later chapters cover each bias in depth.
A judge is a model, not a measuring instrument
A ruler returns the same length for any object it measures. An LLM judge does not behave this way. It is a language model that reads text and predicts a verdict. Its prediction can depend on features of the input that have nothing to do with quality.
Your rubric asks one question, such as "is this answer faithful to the context?". The judge may also respond to other signals:
- Where an answer appears in the prompt.
- How long the answer is.
- How polished the answer sounds.
- Whether the answer resembles text the judge itself would write.
When a score moves because of one of these signals, the score no longer measures what you think it measures. This is a bias: an error that pushes scores in a consistent direction, not a random one.
Random error and systematic error
Two kinds of error affect a judge, and they need different fixes.
| Kind | Example | Effect on a metric | Typical remedy |
|---|---|---|---|
| Random (variance) | The same answer gets a 4 on one run and a 3 on the next | Adds noise. Averages over many items still converge | More items, repeated runs |
| Systematic (bias) | Longer answers always score higher | Shifts the metric in one direction | Change the setup, then re-measure |
Averaging does not remove a systematic error. If the judge favors long answers, a larger evaluation set gives you a more precise estimate of a wrong number.
The main biases
Three documented biases get their own chapters.
- Position bias. In a pairwise comparison, the judge prefers the answer in a particular slot, often the first.
- Verbosity and style bias. The judge prefers longer or more confident answers, even when the extra text adds nothing.
- Self-preference bias. The judge rates outputs from its own model family higher than equally good outputs from another family.
Making a bias visible
You can test for a bias directly. Take a set of answers, make a copy of each with the same content but one irrelevant change, and compare the judge's scores. The sketch below pads each answer with filler and measures the average score change. The score_fn argument stands for your own function that calls the judge and returns an integer score.
def padding_effect(score_fn, items):
"""items: list of (question, context, answer) tuples.
Returns the mean score change after adding filler text."""
filler = " To be thorough, it is worth restating this point clearly."
deltas = []
for question, context, answer in items:
base = score_fn(question, context, answer)
padded = score_fn(question, context, answer + filler * 3)
deltas.append(padded - base)
return sum(deltas) / len(deltas)A mean change near zero suggests the judge ignores padding. A clearly positive value shows a verbosity bias in your setup. The same pattern works for other biases: change one irrelevant feature, hold everything else fixed, and look at the shift.
What to do with this
- Assume each bias is present until you test for it.
- Write rubrics that name what to ignore, for example "Ignore length and writing style."
- Run controlled tests like the one above before you trust a score.
- Compare the judge against human labels, which a later chapter covers.
Exercise
A team's judge gives higher scores to longer answers. They respond by tripling the size of their evaluation set. Why does this not fix the problem?
Show answer
Length preference is a systematic error, not random noise. More items make the average more precise, but it stays shifted in the same direction. The team needs to change the setup, for example by telling the judge to ignore length, then re-measure with a padding test.
Exercise
In the padding test, why should the padded copy keep the same content as the original?
Show answer
The test isolates one feature. If the padded answer also changed meaning, a score difference could come from the change in quality instead of from the judge's length bias.