Key takeaways
- ✓A judge can be wrong in two ways, so measure it with two numbers against human labels: TPR, the share of outputs people passed that the judge passed too (it catches good ones), and TNR, the share of outputs people failed that the judge failed too (it catches bad ones). TNR is the reason you have a judge, and the hard one to measure.
- ✓Failures are rare, so a random sample holds few of them. 100 random labels gave 87 passes and 13 failures: the small judge's TNR was 9 of 13 = 69%, with a 95% confidence interval of 42–87%, overlapping the large judge's 67–99%. 100 labels can't tell the two judges apart at catching bad outputs.
- ✓Size the labels by the failures. Knowing TNR to ±5 points takes 196 failed labels: 1,307 random labels at a 15% failure rate, or 352 if you label user-flagged outputs first (70% of them fail here) plus 73 random passes. Check that the judge doesn't find flagged failures easier than the rest.
- ✓A judge's raw pass rate leans the way its mistakes lean: the strict large judge read 2.1 points low, the lenient small judge 3.6 points high. Correct it with the measured catch rates: (pass rate + TNR − 1) ÷ (TPR + TNR − 1). The small judge's 88.7% became 87.1%, against a real 85.1%: closer, but the correction is noisy too.
- ✓A corrected score has two sources of error: which outputs were judged, and how well 300 labels (about 45 of them failures) pinned down TPR and TNR. In 400 simulated studies, the raw interval held the truth 10.75% of the time, the corrected one with the catch rates treated as exact 72.25%, and the one that also resamples the labels 95.5%, at 13.6 points wide instead of 4.0.
- ✓Test each bias by changing one thing and keeping the rest: the same pair in both orders (position: the small judge picked the first answer 63.3% of the time and the same answer second 32.5%), the same failing output with filler (verbosity: +12.6 to +24.5 points more passes), the same output credited to the judge's own model family (self-preference: +5.6 to +13.8).
- ✓Cost and drift (the lab's Script 4): count the human labels in a judge's price. At 10,000 outputs the accurate large judge was cheapest ($600 against $808 and $1,205); at a million, the small ones cost about a sixth as much. And when the judge's model changes, re-check it on fresh labels: an old calibration describes a judge that no longer exists.
Our support AI writes a summary of every customer chat. There are too many for people to read, so another AI grades them: a judge. The cheap judge graded a thousand summaries and passed 88.7% of them, with a 95% confidence interval of 86.6–90.5%, about ± 2 points. The real pass rate was 85.1%, outside that range. Repeat a study like that 400 times and the interval holds the real pass rate only 43 times. This chapter is about getting an honest number out of a judge that makes mistakes: checking it against people, correcting its score, giving the corrected score an interval that covers all of its error, and testing the judge for biases.
The examples come from Lab 10 (The Judge as a Measuring Instrument) of the eval labs, scripts 01_calibrate.py (checking a judge against 100 human labels, and how many labels that takes), 02_corrected_score.py (correcting the score, and which interval holds the truth) and 03_biases.py (position, verbosity and self-preference). The math is the lab's evalkit/judge.py and the Wilson interval in evalkit/stats.py. A shorter section covers 04_judge_choice.py (what each judge really costs, and what happens when the judge changes under you), which the video cut for length. The last script, 05_live_judge.py, repeats the measurements on a real model through a paid API; it isn't run or covered here. Everything here is a simulation: 20,000 summaries, each with a known human verdict (85.06% pass), and three judges built with known mistakes. Because the lab built them, it knows the truth, which you never do with a real judge. Every number below is from the lab's scripts with their own random seeds, so rerunning them prints the same results.
A few words used throughout. A judge is an AI that reads one output and answers one question from the rubric (Chapter 7): pass or fail. A human label is the same answer from a person: slow and paid, but trusted. The pass rate is the share of outputs that pass. The three simulated judges are named by what they are: large (an expensive, accurate model), small (a cheap model that's lenient: it lets failures through) and small+ (the same small model with a better prompt). Their built-in error rates are inputs of the simulation; every number this chapter presents as a finding is measured.
A judge's error is two numbers
Before trusting a judge, check it against people. A person labels 100 random summaries, and the judge grades the same 100. A judge can be wrong in two ways, so it gets two numbers:
- TPR (true positive rate): of the summaries the person passed, the share the judge passed too. It catches good ones.
- TNR (true negative rate): of the summaries the person failed, the share the judge failed too. It catches bad ones.
Catching bad ones is the reason you have a judge, and it's the hard number to measure. Most summaries pass, so the 100 labels held 87 passes and only 13 failures. TPR is measured on the 87; TNR only on the 13.
People passed these 87: the judge's verdict on each
People failed these 13
95% confidence intervals (Wilson), all three judges
The small judge caught 9 of the 13 failures. From so few, its real catch-bad-ones rate could be anywhere from 42% to 87%. The large judge's bar starts at 67%, so the two overlap: 100 labels can't tell you which judge is better at the job you hired it for.
Each dot is one of the 100 summaries a person labeled (the lab's seed 0, so it's the exact sample Script 1 prints). Most summaries pass, so a random sample holds few failures, and TNR rests on them alone.
| Judge | TPR (95% interval) | from passes | TNR (95% interval) | from failures |
|---|---|---|---|---|
| large | 81 of 87 = 93% (86–97%) | 87 | 12 of 13 = 92% (67–99%) | 13 |
| small | 82 of 87 = 94% (87–98%) | 87 | 9 of 13 = 69% (42–87%) | 13 |
| small+ | 84 of 87 = 97% (90–99%) | 87 | 12 of 13 = 92% (67–99%) | 13 |
A 95% confidence interval is the range the real value should fall in 95 times in 100; the video calls it an error bar. These are Wilson intervals, the interval for pass rates from Chapter 1. The TPR intervals are at most 12 points wide. The TNR intervals are 32 to 45 points wide: the small judge caught 9 of 13 failures, and its real catch rate could be anywhere from about 40% to almost 90%. The large judge's interval overlaps it, so 100 labels can't even say which judge is better at catching bad summaries. Agreement on the 100 can still look fine, because the passes dominate it.
(Only the simulation knows the judges' real rates over all 20,000 summaries: TNR 0.87 for large, 0.60 for small and 0.80 for small+. They're lower than the base rates the lab's README lists, 0.90, 0.70 and 0.85, because the judges' built-in biases let extra failures through. That's why you calibrate on your own outputs, not on a vendor's numbers.)
How many labels?
So how many labels would pin TNR down? Say within ±5 points: a margin (half the interval's width) of 5. The sizing rule from Chapter 2 gives 196 failed labels at an expected TNR of 85%, and 73 passed labels for TPR at 95%. Each class needs its own count, and the rare one sets the bill:
| Margin on TPR and TNR | Passes needed | Failures needed | Random labels to get them (15% failing) |
|---|---|---|---|
| ±10 points | 19 | 49 | 327 |
| ±5 points | 73 | 196 | 1,307 |
| ±3 points | 203 | 545 | 3,634 |
Picking at random, 1,307 labels, most of them passes you don't need. A cheaper way: start with the summaries users flagged with a thumbs-down. In the simulation, 70% of flagged summaries fail (against 15% overall), so 279 flagged labels hold the 196 failures; add 73 random passes for TPR, and the same precision costs 352 labels. It's the idea of Chapter 3's stratified sampling: oversample the rare group on purpose.
One catch. Users often flag the obvious failures. If the judge finds those easier to catch, a TNR measured on flagged failures looks better than the judge really is. In the lab it doesn't (small+ caught 80% of flagged failures and 80% of all failures), but that's by construction: the simulation makes flags independent of how easy a failure is. With real data, also label a small random sample of failures and compare.
Correcting the score
Now the judge's score itself. In Script 2, each judge grades 1,000 summaries, and a person labels a separate 300 for the catch rates:
| Judge | Raw pass rate | TPR / TNR (from 300 labels) | Corrected | Raw error | Corrected error |
|---|---|---|---|---|---|
| large | 83.0% | 0.949 / 0.872 | 85.6% | −2.1 points | +0.5 |
| small | 88.7% | 0.975 / 0.707 | 87.1% | +3.6 | +2.0 |
| small+ | 85.1% | 0.937 / 0.745 | 87.4% | +0.0 | +2.4 |
The real pass rate is 85.1%. The strict large judge reads about two points low; the lenient small judge almost four points high, because every failure it lets through counts as a pass. Small+ lands right on the truth, but that's luck: on average it reads about a point low (83.8%, from its real rates), and this sample happened to hit 85.1%.
Think of a bathroom scale that reads heavy. You don't throw it away. You weigh something you know first, then correct every reading. The 300 labels are the known weight: they say how often the judge catches good summaries and bad ones. Then a formula takes the judge's mistakes out, the Rogan–Gladen correction (named after its two authors, who published it in 1978 for medical screening tests):
corrected = (pass rate + TNR − 1) ÷ (TPR + TNR − 1)
It works out how many of the judge's passes were failures it let through. For the small judge: (0.887 + 0.707 − 1) ÷ (0.975 + 0.707 − 1) = 0.594 ÷ 0.682 = 87.1%. Closer to the truth, but not on it. And small+ moved away from the truth, from 85.1% to 87.4%. The labels are a sample, so the correction is noisy too. Move the TNR slider in the scale's third step and watch the corrected score move with it.
The small (cheap) judge graded 1,000 summaries and passed 88.7% of them. Is that the real pass rate? Turn on the truth below to see (you only can in a simulation).
The analogy: a bathroom scale that reads heavy isn't thrown away; you weigh something you know and correct every reading. Here the dial is the judge's pass rate and the known weight is 300 human labels. Recorded with the lab's seed (0); the step-3 numbers are the lab's Rogan–Gladen correction on them, computed from the unrounded rates and shown to three or four decimals.
Two limits of the formula. If TPR + TNR is close to 1, the judge is barely better than a coin: the formula divides by nearly zero and the result means nothing (the lab's code refuses below 0.05; fix the judge instead). And a lenient judge magnifies every error in its TNR: the small judge's 300 labels held 58 failures and measured TNR at 0.707, while its real TNR, known only to the simulation, is 0.60. With 0.60, the same formula gives 84.7%.
The honest interval
So how far off can a corrected score be? Back to 400 studies with the small judge, each grading 1,000 summaries and calibrated on 300 fresh labels. For each study the lab builds three 95% intervals and counts how often each holds the real pass rate:
Each line is one study's 95% error bar around the judge's raw pass rate. Narrow, and centred on a number that reads high: almost every bar misses the truth.
Simulated: the real pass rate is known only because the summaries are simulated. The 300 labels held 44.6 failures on average (27–64), and TNR rests on those alone. Recorded with the lab's seeds; the lab prints these coverages rounded (11%, 72%, 96%).
| Interval | Average width | Held the truth (of 400) |
|---|---|---|
| Raw pass rate (Wilson) | 4.0 points | 43 (10.75%) |
| Corrected, TPR and TNR treated as exact | 7.1 points | 289 (72.25%) |
| Corrected, the labels' uncertainty included | 13.6 points | 382 (95.5%) |
The raw intervals are narrow and centred on a biased number, so they almost never hold the truth. Correcting fixes the centre. But an interval that treats the catch rates as exact covers only one source of error, which 1,000 summaries got graded, and holds the truth 72.25% of the time, not the 95% it promises. The missing piece: the catch rates came from 300 labels with a few dozen failures (44.6 on average, 27 to 64), so they're a second source of error.
The lab's fix is a bootstrap (the resampling trick from Chapters 1 and 5): redo the correction 1,000 times per study, each time on a redraw of the judged summaries and a redraw of the labels, resampling passes and failures separately, and keep the middle 95% of the results. With that, the interval holds the truth 95.5% of the time. It's about three times as wide as the raw one: 13.6 points instead of 4.0. That width is the honest price of grading with an imperfect judge. (For small+, whose mistakes are smaller, the three intervals were 4.6, 6.1 and 10.3 points wide and held the truth 331, 315 and 392 times of 400.)
More labels, or a better judge? Both narrow the interval. The lab's Script 2, Exercise 3 measures the corrected score's margin (median over 60 studies, 1,000 judged summaries each):
| Judge | 100 labels | 300 labels | 1,000 labels |
|---|---|---|---|
| small | ±11.2 points | ±6.2 | ±4.2 |
| small+ | ±7.6 | ±5.0 | ±3.7 |
| large | ±7.4 | ±4.5 | ±3.4 |
The lenient small judge needs about 1,000 labels to get near what the large judge gets from 300. A better prompt (small+) narrows it too.
Measuring biases
Judges also have habits, called biases. The lab built three into its simulated judges; what matters is the test, because you can run it on a real judge. Change one thing about the input, keep everything else the same, and compare the verdicts on the same items: a paired comparison of each item with itself.
Position. 600 pairs of answers a person rated equally good, each shown to the judge in both orders. A fair judge picks answer A half the time either way.
| Judge | A wins shown first | A wins shown second | First-position advantage (95%) | Verdict |
|---|---|---|---|---|
| large | 49.5% | 46.3% | +3.2 points (−2.5 to +8.8) | not detected |
| small | 63.3% | 32.5% | +30.8 (+25.3 to +36.1) | bias |
| small+ | 57.7% | 42.5% | +15.2 (+9.5 to +20.7) | bias |
The small judge picked the same answer 63.3% of the time when it came first and 32.5% when it came second. The large judge has a built-in bias too (54% against 46%, +8 points), but 600 pairs were too few to detect it: a small bias needs a test sized for it. The fix is the same either way: judge each pair in both orders and count a disagreement as a tie. Chapter 10 builds on it.
Verbosity. 800 summaries people failed, each judged as written and again with filler words added, nothing else changed. "Verdicts changed by re-running" is the judge's own randomness: the same unchanged summary judged twice.
| Judge | Passes as written | With filler | Gap (95%) | Verdicts changed by the filler | …by re-running |
|---|---|---|---|---|---|
| large | 11.2% | 23.9% | +12.6 points (+8.9 to +16.3) | 30.6% | 22.2% |
| small | 37.8% | 62.3% | +24.5 (+19.7 to +29.2) | 51.2% | 46.4% |
| small+ | 17.2% | 30.9% | +13.6 (+9.5 to +17.7) | 36.6% | 28.2% |
Every judge passed more padded failures: 13 to 25 points more. That's how you tell a bias from noise. The edit changes more verdicts than re-running does, and, more telling, it pushes them one way (towards pass), which the gap's interval confirms. Re-running changes verdicts both ways and averages out. For the noisy small judge, the two flip rates are close (51.2% against 46.4%); the direction is what gives the bias away.
Self-preference. 800 failed summaries, judged as if written by the judge's own model family and as if written by the other one. The simulation has two made-up families, "atlas" (the large and small judges) and "birch" (small+).
| Judge (its family) | Passes, other family | Own family | Gap (95%) |
|---|---|---|---|
| large (atlas) | 11.1% | 16.8% | +5.6 points (+2.2 to +9.0) |
| small (atlas) | 32.2% | 46.0% | +13.8 (+9.0 to +18.4) |
| small+ (birch) | 16.9% | 23.9% | +7.0 (+3.1 to +10.9) |
Each judge went easier on failing summaries said to come from its own family. That matters most when you compare two systems and one shares the judge's family: it gets a head start. Use a judge from a different family than the systems you compare. With real outputs you can't relabel the author, so the lab suggests rewriting the same outputs in each family's style.
Cost and drift
Script 4, which the video cut, puts the lessons together. What does each judge cost? For a corrected pass rate to ±3 points, the lab finds the labels each judge needs (at $1 a label) and adds the judge's calls:
| Judge | Per call | Labels for ±3 points | Total at 10,000 outputs | Total at 1,000,000 |
|---|---|---|---|---|
| large | $0.0100 | 500 | $600 | $10,500 |
| small | $0.0005 | 1,200 | $1,205 | $1,700 |
| small+ | $0.0008 | 800 | $808 | $1,600 |
At 10,000 outputs the labels dominate the bill, so the expensive, accurate judge is cheapest. At a million the calls dominate, and the small judges cost about a sixth as much. The cheap, lenient judge needs the most labels, because its correction magnifies the error in its TNR. There's no universally cheap judge: compare the total at your volume, for the precision you need. (The label counts come from a coarse grid of 100, 200, 300, 500, 800, 1,200… and a median over 40 simulated studies, so treat them as rough.)
The judge changes under you. The provider silently updates small+'s model, and its base TNR drops from 0.85 to 0.65. Nothing about the summaries changed:
| Estimate | Pass rate | Error against the truth |
|---|---|---|
| Raw judge pass rate after the update | 86.8% | +1.7 points |
| Corrected with the old calibration (400 labels, TNR 0.82) | 87.8% | +2.7 |
| Corrected after re-checking on 150 fresh labels (TNR 0.71) | 85.1% | +0.1 |
The dashboard shows quality going up: small+ usually reads about 83.8%, so a jump to 86.8% is about 3 points, from the judge alone. Correcting with the old catch rates makes it worse, because they describe a judge that no longer exists. A re-check on fresh labels finds the drop. But the lab's +0.1 is partly luck: the 150 labels held only 21 failures, and the re-check's own interval (labels' uncertainty included) is 77.5–90.6%. Over 2,000 simulated 150-label re-checks for the same scores, the corrected score was right on average but landed within ±2 points of the truth only 37% of the time. (The 37% was computed by the video's exporter with the lab's own functions; the lab doesn't print it.) A small re-check tells you the judge changed; to know the new number well, label more. Pin the judge's model version, re-validate on every change (model, prompt, temperature), and re-check on a schedule anyway.
What to do
- Check the judge against human labels, and count the failures, not just the labels. TNR rests on the failures alone.
- Size the labels by the failures you need for the precision you want; find failures faster with user flags, and check the flagged ones against a small random sample.
- Report the corrected score, not the raw one, with the catch rates measured on your own outputs.
- Give it an interval that resamples the labels too. One that treats TPR and TNR as exact is too narrow.
- Test each bias with a one-change experiment (order, filler, claimed author), and compare it with the judge's own run-to-run noise.
- Compare judges by total cost: calls plus the labels each needs, at your volume.
- Pin the judge's version and re-check it on fresh labels after every change, and on a schedule.
Caveats
- Everything here is simulated. The summaries, the human verdicts, the three judges, their error rates, costs and biases are inputs of the lab's model (
common.py); no real AI was graded. The tests transfer to a real judge, the numbers don't. Script 5 measures a real judge through a paid API; its results aren't recorded in the lab (it was tested only with a stand-in client), so this chapter has no real-judge numbers. - The flagged-first design is unbiased here by construction. The simulation makes flags independent of how easy a failure is to catch. Real flags favour blatant failures.
- One draw of each study. The 100 labels, the single study of 1,000 + 300 and the drift re-check are single random draws; the 400 studies show how typical they are.
- Rounded in the lab's printout. Script 2 prints the coverages as whole percentages: 11%, 72% and 96%. The exact counts are 43, 289 and 382 of 400, so the honest interval held the truth 95.5% of the time.
- The bias intervals are conservative. Script 3 uses Newcombe's interval, which is built for two separate samples (Chapter 1), on the same items judged twice. That makes the intervals somewhat too wide, so every "bias" verdict stands, and a small bias is a little harder to detect than it needs to be.
The checklist
- How many failures were in the labels behind the judge's TNR?
- What are the judge's TPR and TNR, each with its interval, measured on your outputs?
- Is the reported score raw or corrected? Which way does the judge lean?
- Does the interval include the labels' uncertainty, or does it treat the catch rates as exact?
- Is TPR + TNR well above 1? If not, fix the judge before correcting anything.
- Has the judge been tested for position, verbosity and self-preference, with one-change tests sized to find a bias you'd care about?
- What does the judge cost, labels included, at your volume?
- Which judge version produced these numbers, and when was it last re-checked?
Practice: calibrate a judge and correct its score
Write the lab's judge math: a judge's catch rates against human labels, how many labels calibration needs (random, and flagged-first), the Rogan–Gladen correction with its refusal for a coin-like judge, the raw score a judge reads on average, and how many of a set of intervals hold the truth. Wilson's interval and the Chapter 2 sizing rule are given. The tests use the lab's recorded samples: the 100 labels (82 of 87 and 9 of 13 for the small judge), the 1,307 and 352 label counts, the small judge's 88.7% → 87.1%, small+'s 83.8% average reading, and the first 60 of the 400 studies (57, 16 and 2 intervals miss).
Quiz
1.You check a judge on 100 random human labels: 87 passes, 13 failures. It agrees with the person on 91 of them. What's the main problem?
2.You want TNR within ±5 points. About 15% of outputs fail. How many labels do you need if you pick outputs at random?
3.A lenient judge (it lets too many failures through) reports an 88.7% pass rate. What does the raw number do?
4.You correct a judge's score and compute an interval that treats its TPR and TNR as exact. What happens?
5.How do you test whether a judge favours longer answers?
6.Your judge provider updates the model behind the judge. Your dashboard's pass rate goes up 3 points, and your system didn't change. What do you do?
Check your understanding
Try each question before opening its answer.
Why does a judge need two numbers, and which one is harder to measure?
A judge can pass a bad output or fail a good one. TPR is the share of outputs people passed that the judge passed too; TNR is the share of outputs people failed that the judge failed too. TNR is harder because it's measured only on the failures, which are rare: 100 random labels held 13, and the small judge's 9 of 13 had a 95% interval of 42–87%.
How many labels does a ±5-point TNR take, and how can you get there cheaper?
196 failed labels. At 15% failing, random picks need 1,307 labels to find them. Labeling user-flagged outputs first (70% fail in the lab) plus 73 random passes took 352. Check it against a small random sample of failures, because flagged failures may be the easy ones.
Why does a lenient judge's raw pass rate read high, and how do you correct it?
Every failure it lets through counts as a pass. The small judge read 88.7% against a real 85.1%. The correction uses the catch rates from human labels: (pass rate + TNR − 1) ÷ (TPR + TNR − 1) = (0.887 + 0.707 − 1) ÷ (0.975 + 0.707 − 1) = 87.1%. Like a scale that reads heavy: weigh a known weight, then correct every reading.
When can't the correction help?
When TPR + TNR is close to 1: the judge is barely better than a coin, and the formula divides by nearly zero. The lab's code refuses below 0.05. A lenient judge is correctable but magnifies every error in its TNR, so its corrected score needs many more labels for the same interval.
Why is an interval that treats TPR and TNR as exact too narrow, and what fixes it?
It covers only which outputs were judged. TPR and TNR came from a sample of labels, about 45 failures in 300, so they're a second source of error. In 400 simulated studies that interval held the truth 72.25% of the time. Redoing the correction on many redraws of the labels as well (a bootstrap) gave an interval 13.6 points wide that held it 95.5% of the time.
How do you tell a bias from the judge's own randomness?
Change one thing, such as adding filler to failing outputs, and also re-run the judge on the unchanged outputs. Noise changes verdicts both ways and averages out; a bias pushes them one way, which an interval on the pass-rate gap confirms. For the large judge, filler changed 30.6% of verdicts against 22.2% from re-running, and the gap was +12.6 points (+8.9 to +16.3).
The large judge's position bias wasn't detected. Does it have none?
No. It was built with a small one (54% against 46%), and 600 pairs were too few to tell it from noise: the measured +3.2 points had an interval of −2.5 to +8.8. A small bias needs a test sized for it. Judging each pair in both orders and counting disagreement as a tie removes position bias either way.
Your judge's model was updated and your scores went up. What do you do?
Assume the judge changed, not your system. Re-check it on fresh human labels and correct with the new catch rates, not the old ones, which made the lab's score worse (+2.7 points). A 150-label re-check spots the change but is imprecise (its interval was 77.5–90.6%), so label more before trusting the new number. Pin the judge's version from then on.
Next up: Chapter 10, pairwise comparisons: instead of grading one output at a time, ask the judge which of two answers is better, turn many such comparisons into a ranking with intervals, and keep the answer shown first from getting an unfair edge.