Automated Grading and LLM-as-Judge
You'll be able to:
You can choose between exact-match, programmatic and model-graded scoring for a given task, name the known biases of model judges (position, verbosity, self-preference, rubric drift) and calibrate a judge against human labels before trusting it.
Choosing how to grade
Grading is where most of an eval's cost lives, so the temptation to automate is strong. There are three families of scorer, and the right choice depends on the task, not on convenience.
- Exact or normalised match. The output is a number, a label, a short string or a code artefact with tests. Cheap, deterministic, no bias — as long as the parsing is right. Parsing is a bigger deal than it looks: a model that answers "The answer is 42." versus "42" versus "forty-two" is the same model, and your regex decides whether it scored.
- Programmatic checks. Unit tests, schema validation, string-containment rules, length limits, "no number in the output that is absent from the source." These are rubrics turned into code and are still deterministic.
- Model-graded. A language model reads the output (and often a reference or rubric) and emits a score or a preference. This is the only practical option for open-ended quality, and it is also the one that quietly lies to you.
Inspect's scorer documentation (in this module's materials) is a good concrete tour: it ships match, includes, pattern and answer scorers for the first two families, and model_graded_qa / model_graded_fact for the third, with the grading prompt exposed so you can see exactly what the judge is asked.
What a model judge gets wrong
The MT-Bench paper (Zheng et al.) is the canonical study. The authors had GPT-4 judge pairs of chatbot responses and compared the verdicts with human crowd preferences. Agreement with humans was high — about as high as humans agreed with each other — but the paper also catalogued the systematic biases, and later work has confirmed each one:
- Position bias. When shown two answers, judges prefer whichever comes first (or sometimes second) at a rate far above chance. Large Language Models are not Fair Evaluators (Wang et al.) showed that simply swapping the order can flip the verdict on a large share of pairs.
- Verbosity bias. Longer answers win, even when the extra length adds nothing. Length-Controlled AlpacaEval exists precisely because an earlier version of that leaderboard was rewarding wordiness.
- Self-preference. Judges rate text in their own style more highly. LLM Evaluators Recognize and Favor Their Own Generations (Panickssery et al.) found models can often recognise their own output and that recognition predicts the preference.
- Rubric drift. Ask for a 1–10 score without anchors and the judge's scale is whatever it feels like today; the same output can get a 6 and an 8 across runs.
- Surface over substance. Confident tone, headings and bullet points raise scores independently of correctness. Judges are weak at detecting a subtly wrong step inside a fluent derivation.
None of this means model judges are unusable. It means a judge is itself a model whose behaviour you have to measure before you trust it.
Calibrating a judge: a numbered procedure
- Build a gold set. Take 50–100 outputs from the eval and have humans grade them with the rubric from module 2. Measure inter-rater agreement; if humans do not agree, no judge can be "right".
- Write the judge prompt as a rubric, not a vibe. Give the criteria, the scale with anchored descriptions, and the reference answer where one exists. Ask for the reasoning first and the score last, in a fixed format you can parse.
- Run the judge on the gold set, twice. Once as-is and once with any paired items swapped. Compute agreement with the humans (kappa, or correlation for ordinal scores) and agreement with itself across the swap.
- Look at the disagreements. Sort by the size of the gap between judge and human. The top twenty will show you whether the judge is being fooled by length, by confidence, or by a rubric criterion it reads differently from you.
- Fix and re-run. Tighten the anchors, add an explicit "ignore length" instruction, or switch to pairwise comparison with both orderings averaged. Repeat until judge–human kappa is at least as high as human–human kappa.
- Keep sampling. After deployment, hand-grade a random 5% of judge decisions every batch. Judges drift when the underlying model is updated, and when the distribution of outputs changes.
A judge that agrees with humans at kappa 0.7 on your gold set is a useful instrument. A judge nobody has calibrated is a random number generator with a confident tone.
Pairwise or absolute?
Pairwise comparison ("which of A and B is better?") is easier for both humans and models and is less sensitive to scale drift, which is why Arena (formerly Chatbot Arena, then LMArena) uses it. But it only ranks; it cannot tell you whether either answer is acceptable. Absolute scoring against a rubric tells you that, at the cost of needing anchors. Most production suites use both: absolute scores with a rubric for pass/fail gates, pairwise for choosing between candidate versions.
What is unsettled: whether a judge from the same model family as the candidate should ever be used (self-preference says no; practicality says it often is), and how well calibration on one distribution transfers to another. Treat both as open and measure.
What to remember
- Use deterministic scoring whenever the task allows, and audit the parser.
- Model judges show position, length, self-preference and rubric-drift biases. Assume all four until you have measured them.
- A judge is calibrated against a human-graded gold set, not declared trustworthy.
- Run paired items in both orders and average; ask for reasoning before the score.
- Keep hand-grading a sample after deployment. Judges drift.
Check Yourself
Module Mission
30–40 minWrite a judge prompt for the 12-item eval from module 2 (or any rubric you have). Hand-grade 10 outputs, then grade the same 10 with a model judge twice — once with the candidate answer first and once with the reference first. Tabulate judge-vs-human agreement and judge-vs-judge agreement across the two orderings. Write down whether you would ship this judge, and the one change you would make to the prompt first.
Loading your work…
Curated Materials
1.8hThe deep work happens here — the lesson is your briefing.
Live on aiqbench
This lesson's subject on the rest of the site, today.