LLM JUDGES // FIELD MAP
← Front Door ← the map
MEASURING THE JUDGE · UNIT 05 OF 09validity · confusion matrix · Youden's J · ROC

Judge versus truth: the confusion matrix, Youden's J and ROC

Unit 04 asked whether judges agree with each other. This unit asks whether a judge agrees with the truth, and borrows the whole toolkit from diagnostic medicine, which has been asking that question about X-ray readers since 1947.
TL;DR — Run the judge on items whose true label is known and count four cells: right YES, missed YES, false YES, right NO. Every metric is a ratio of those cells. Accuracy hides the trade-off (always saying NO scores 0.70 here). Youden's J (0.65 here) ignores how common YES is, which makes it portable and blind to what users see: at 5% prevalence the same judge's YES is right only 22% of the time. A scoring judge has a whole ROC curve (area 0.868); choose its threshold by what each error costs, not by J. And say where the “truth” came from.

Agreement between judges is reliability: the instrument is steady. Validity asks the harder question: does it point at the right thing? The only way to answer is to line the judge's verdicts up against something better than the judge and count where they match. Everything on this page is a way of reading that count.

What the judge is compared against

For an LLM judge the comparison set is a gold set: a few hundred outputs, each labelled pass or fail by people trained on the policy and checked against each other (unit 04). It gets called the truth, but it is a reference, not an oracle: its labels are only as good as the labellers' agreement. That is why Igor's evals recipe grades the grader only after making sure humans can apply the policy consistently. A judge cannot be shown to be more valid than the reference it is scored against.

The five domains have very different references, and the arithmetic below treats them all the same, so the honesty has to come from the words. In the casebook each domain uses the same 200 items and the same four counts; what changes is how far those counts deserve the name validity.

Truth in hiring: late, and hires only

The reference is how each hire performs a year later, itself usually a manager's rating. Candidates the interviewer rejected never generate an outcome, so the “no hire” column of the table cannot be filled from real data. Statisticians call this selection bias, and in diagnostic testing verification bias: the judge's own verdict decides who gets checked. The casebook pretends every candidate was hired and followed up. Real hiring can measure only how many of its hires turned out well, which is precision, and never how many good people it turned away.

Truth in reviews: a committee, not a fact

The reference is the calibration committee's final rating. There is no outside measurement of whether an employee “really” exceeded expectations, so the table compares one manager to a group of managers. That is a useful check, because a group is steadier than one person, but strictly it is reliability against a privileged rater. If the whole committee shares a blind spot, the table cannot see it.

Truth in wine: a senior panel

The reference is a panel of senior judges who taste the same flight and agree on which wines deserve a medal. Nothing outside the glass confirms them; a lab can confirm a fault such as cork taint, not quality. So the table measures how often one judge matches the panel, and calls that validity only by convention. Hodgson's replicate-pour work (Hodgson 2008) is a reminder that the panel's members are noisy instruments too.

Truth in medicine: biopsy and follow-up

The reference is biopsy for the patients who were recalled and a clean year of follow-up for those who were cleared. That is the strongest reference outside umpiring, and medicine invented these statistics because it had one. It still has the verification problem: if only recalled patients were biopsied, missed cancers would stay invisible. Screening audits use follow-up of the cleared patients, catching cancers that surface later, precisely so the “clear” column can be scored (Begg and Greenes 1983 treat the correction formally).

Truth behind the plate: measured

The reference is the tracking system's measured pitch location against the rulebook zone. Every taken pitch gets checked, so there is no verification bias, and the reference's own error is small next to the umpire's. This is the one domain where the table below is close to a true validity measurement.

LLM evaluation has its own version of this trap, and teams fall into it often. If humans only review the outputs the judge flagged as failing, they learn how often a flag is right and nothing about the bad outputs the judge waved through. To measure misses, a random sample of the judge's passes has to go to humans too. The gold set exists so that every cell gets counted.

Four cells

Rows are the reference, columns are the judge. Green cells are agreements, red cells are the two kinds of mistake. The bottom row is the part real hiring never sees: rejected candidates get no outcome.The “truth” rows here are the calibration committee's ratings.The “truth” rows here are the senior panel's verdicts.The “truth” rows come from biopsy and a year of follow-up.The “truth” rows come from the tracking camera. Worked in the appendix.

Run the judge on the 200 gold items. Sixty truly pass the policy (YES) and 140 truly fail. The judge says pass on 69. Cross the two and every item lands in one of four cells, the confusion matrix:

In the casebook those same four numbers are 48 good candidates hired, 12 good ones turned away, 21 weak ones hired and 119 weak ones turned away48 strong employees rated exceeds, 12 strong ones rated meets, 21 solid-but-not-exceptional ones rated exceeds and 119 rated meets correctly48 medal-worthy wines given a medal, 12 denied one, 21 ordinary wines given a medal and 119 correctly passed over48 cancers recalled, 12 cancers cleared, 21 healthy patients recalled and 119 healthy patients cleared48 true strikes called strike, 12 called ball, 21 true balls called strike and 119 called ball. Whether “positive” means good news depends on the domain: in medicine a positive is the alarming finding, in an LLM gate it is the output passing. Keep the definition of YES fixed for a whole analysis and write it at the top of the table, because swapping it silently swaps every metric below.

Every number on this page, and most numbers in any LLM-judge paper that reports agreement with humans on a yes/no label, is a ratio of these four cells. The work is choosing which ratio answers the question being asked.

Two vocabularies for the same cells

Two fields named these ratios independently. Medicine reads the matrix by rows: given the truth, how often is the test right? Jacob Yerushalmy introduced sensitivity and specificity in a 1947 study of chest X-ray readers (Yerushalmy 1947; attribution per Wikipedia). Information retrieval reads it from the judge's side: of the documents returned, how many were relevant, and of the relevant ones, how many were returned? That gave precision and recall, and later the F-score that combines them (F-score). ML took the retrieval names.

RatioMedicine saysIR / ML saysCasebook
TP / (TP + FN), across the YES rowsensitivityrecall, true positive rate48/60 = 0.80
TN / (TN + FP), across the NO rowspecificitytrue negative rate119/140 = 0.85
FP / (FP + TN)1 − specificityfalse positive rate, fall-out21/140 = 0.15
TP / (TP + FP), down the YES columnpositive predictive valueprecision48/69 = 0.696
TN / (TN + FN), down the NO columnnegative predictive value(rarely named)119/131 = 0.908
(TP + TN) / allaccuracyaccuracy167/200 = 0.835
harmonic mean of precision and recall(rarely used)F10.744

The split has a reason. A doctor judging a test cares how it behaves on sick and on healthy people separately: those are properties of the test. A search engineer cares what lands on the results page, and cannot even count the true negatives (every irrelevant page on the web), which is why F1 ignores that cell. For an LLM judge both matter: row rates describe the judge, column rates describe what someone using its verdicts experiences.

Reading the hiring table both ways

Sensitivity is the share of good candidates the interviewer recognises (0.80). Precision is the share of hires that work out (0.696), and it is the only number a real company can observe, since only hires get an outcome. A recruiter quoting “70% of our hires succeed” has told you precision and nothing about how many good people walked out the door.

Reading the review table both ways

Sensitivity is the share of committee-rated strong performers this manager also rated exceeds (0.80). Precision is how often this manager's “exceeds” survives the committee (0.696). Calibration meetings mostly see the second number, because inflated ratings are what get argued over; the strong performers a manager under-rated rarely come up.

Reading the wine table both ways

Sensitivity is the share of panel-medal wines this judge also scored as medal-worthy (0.80). Precision is how often this judge's medal agrees with the panel's (0.696). A competition that only reviews disputed medals measures precision and never the medal wines a judge marked down.

Reading the screening table both ways

Sensitivity is the share of cancers the radiologist recalls (0.80), specificity the share of healthy patients cleared (0.85). Those describe the reader. Positive predictive value is what a recalled patient wants to know: given that I was called back, how likely is it to be cancer? Here 0.696; in a real screening population, far lower, for the reason in the base-rate section below.

Reading the umpiring table both ways

Sensitivity is the share of true strikes called strike (0.80), specificity the share of true balls called ball (0.85). Precision is the share of called strikes that were really strikes (0.696). Umpire studies usually report the two row rates, or a single error rate, because both kinds of miss cost a team.

Accuracy's trap. The casebook judge is right on 167 of 200 items, an accuracy of 0.835. That sounds good until you compare a judge that reads nothing and says NO every time: it gets all 140 truly-NO items right and scores 0.70. A judge that always says YES scores 0.30. Accuracy mixes the two rows in proportion to how common each label is, so on a mostly-NO set it mostly measures the NO row. When anyone reports a single accuracy for a judge, first ask what always giving the majority answer would score on the same set.

Youden's J: one number that ignores prevalence

W. J. Youden, writing in the journal Cancer in 1950, wanted one figure for rating a diagnostic test (Youden 1950). Youden's J is the sum of the two row rates, less one:

J = sensitivity + specificity − 1 = 0.80 + 0.85 − 1 = 0.65

Written the other way, J is the true positive rate minus the false positive rate, 0.80 − 0.15: how much more often the judge says YES to truly-YES items than to truly-NO items. C. S. Peirce had published the same formula in Science in 1884 as a score for weather forecasts (Peirce 1884); meteorologists still call it the Peirce skill score (Youden's J statistic).

J uses only row rates, each computed inside one truth group, so it does not change when the mix of YES and NO items changes. That is a feature: J measured on a balanced gold set carries over to production traffic, which accuracy and precision do not. It is also a bug, twice. People using the verdicts experience precision, which depends heavily on prevalence (next section). And J counts a missed YES and a false YES as equally bad per row, a cost nobody chose on purpose (last section).

The appendix works J and its interval (math.html#youden). 48/60 and 119/140 are small samples: the 95% interval on sensitivity alone runs from about 0.68 to 0.88 (math.html#ci), so two judges whose J differs by 0.05 on a set this size cannot be told apart.

The base rate decides what a YES means

Each bar is scaled to 100% of its own row: the top bar of a panel is the whole population, the bottom bar is only the items the judge said YES to. The half item is an expected count (950 × 0.15). Worked in math.html#base-rate.

Take the same judge, with the same 0.80 sensitivity and 0.85 specificity, and point it at items where only 5% are truly YES. On 1,000 items it catches 40 of the 50 YES items. It also says YES to 15% of the 950 NO items, 142.5 of them. Its YES pile holds 182.5 items and only 40 are right: precision 0.219. The judge did not change. Its YES went from right seven times in ten to right about one time in five, because there are now nineteen NO items for every YES item to make mistakes on.

Try thisKeep the judge fixed and lower the prevalence: J never moves, but the YES pile fills with wrong calls and the always-NO judge overtakes on accuracy.

This is the screening-test lesson: a test that looks excellent on a balanced set becomes mostly false alarms when the condition is rare. Accuracy moves the other way: at 5% prevalence the casebook judge scores 0.8475 and the always-NO judge 0.95.

Base rates in hiring

A role that attracts hundreds of applicants for a handful of truly strong fits is a low-prevalence population. An interviewer with the casebook's 0.80 and 0.85, applied to everyone who applies rather than to a pre-screened shortlist, would produce a “hire” pile that is mostly weak candidates. Funnels exist partly to raise the base rate before the expensive judge sees anyone.

Base rates in reviews

If truly exceptional work is rare in a cycle, a manager with the casebook's 0.80 and 0.85 still rates a sizeable share of solid performers as exceeds, and most of the “exceeds” ratings that reach the committee are those. That is one reason rating distributions get pushed down in calibration: the committee is correcting for a judge whose false positive rate meets a low base rate.

Base rates in wine

A competition flight of mostly ordinary wines is a low-prevalence population for “truly medal-worthy”. A judge with the casebook's error rates gives most of the medals in that flight to wines the senior panel would pass over. Medal counts look generous partly because false medals scale with the number of ordinary entries.

Base rates in screening

This is the home of the lesson. Cancer is found in a small fraction of screening mammograms, so even a reader with good sensitivity and specificity recalls many more healthy patients than sick ones, and most recalled patients turn out to be fine. The recall letter has to say so, and the radiologist's specificity matters as much as sensitivity because it multiplies a very large number of healthy patients.

Base rates behind the plate

Umpiring is the one domain where prevalence does not swing much: a sizeable share of taken pitches are strikes, so the 5% scenario has no natural home here. The lesson still shows up in slices. Among pitches well off the plate, true strikes are rare, so the few strikes an umpire calls there are mostly mistakes.

For LLM judges the base rate moves all the time. A safety judge checked on a gold set built to be half violations meets production traffic where violations are rare, and its flags become mostly false alarms. A quality judge gets less trustworthy at “fail” as the model it grades improves. Report the row rates (they travel) and recompute precision for the prevalence the judge will face (it does not).

Scores, thresholds and the ROC curve

The two piles overlap; no cut separates them cleanly. Every cut trades one red cell for the other. The 1–5 is the interviewer's overall scorecard rating.The 1–5 is the manager's rating before it is collapsed to exceeds or meets.The 1–5 is the judge's score sheet collapsed into five bands.The 1–5 is like a BI-RADS-style suspicion level.Umpires give no score; the closest analogue is how wide the zone is drawn.

Most LLM judges are asked for a score, 1 to 5 or 1 to 10, and the pass/fail verdict comes from cutting it: 4 or above passes. That threshold is a choice, and each choice gives its own confusion matrix. The casebook judge's scores split like this:

Score12345
Truly YES (60)2462028
Truly NO (140)503831147

Cut at ≥4 and the YES pile is 20 + 28 = 48 true positives and 14 + 7 = 21 false positives: exactly the matrix above. Cut at ≥5 and the judge is strict (TPR 0.467, FPR 0.05); at ≥3, lenient (TPR 0.90, FPR 0.371). Plot every cut as a point, false positive rate across and true positive rate up, join them, and you have the receiver operating characteristic (ROC) curve, named after Second World War radar operators telling aircraft from noise (ROC history) and later argued for as a common yardstick for diagnostic systems (Swets 1988).

Each point is one cut of the 1–5 score. The dashed diagonal is a judge that ignores the item. J at any point is the vertical gap from the point down to the diagonal; it is largest at ≥4. Worked in math.html#roc.

The diagonal is a judge that knows nothing: whatever share of NO items it says YES to, it says YES to the same share of YES items. A point's height above the diagonal is its true positive rate minus its false positive rate, which is Youden's J, so J is the vertical gap between the curve and the chance line. Across the five cuts J is 0.417, 0.65, 0.529, 0.324 and 0, peaking at ≥4. Choosing the cut with the largest J is the textbook rule, and a reasonable default when nothing is known about costs.

Try thisSlide the threshold and watch the point walk along the curve; J is the orange gap to the diagonal. Then switch to smooth scores and pull the two piles apart or together.

The area under the curve. The shaded area is the AUC, 0.868 here: pick one truly-YES and one truly-NO item at random, and it is the chance the YES item scores higher, counting ties as half (Hanley and McNeil 1982). On the casebook the YES item scores strictly higher 81.3% of the time and ties 10.9%; 0.813 + 0.109/2 = 0.868. Five-point scales tie a lot, one quiet reason coarse judge scales rank worse. 0.5 is a judge that cannot rank; 1.0 is perfect (math.html#auc).

AUC sums up the judge across every threshold, which makes it good for comparing two judge prompts before deciding how to use either. It is not what gets deployed: a judge in production runs at one cut, and two judges with the same AUC can behave very differently there (one strong at the strict end, one at the lenient end).

The threshold in hiring

A debrief that hires anyone with an average of 3 or more is the lenient end of the curve; one that requires a 4 from every interviewer is the strict end. Raising the bar during a hiring freeze moves the company down the curve to the left: fewer bad hires, more good people turned away. The interviewer's skill (the curve) has not changed; only the operating point has.

The threshold in reviews

Where the line between a 3 and a 4 sits is a threshold on the manager's underlying judgement. An organisation that tells managers “exceeds should be rare” is moving every manager to a stricter point on their own curve, trading false “exceeds” for missed strong performers.

The threshold in wine

Medal cut-offs on a score sheet are thresholds. A competition that lowers the bronze line moves its judges to the right on the curve: more true medal wines rewarded, and many more ordinary wines rewarded with them.

The threshold in screening

Radiology is where ROC analysis became standard, because readers' confidence levels give natural cut points. A reader who recalls every “probably benign” finding sits far to the right on the curve; a reader who recalls only “suspicious” findings sits further left. Two radiologists can have the same curve and different recall rates purely because they chose different points.

The threshold behind the plate

An umpire has no score to cut, but a zone drawn wide is a lenient threshold (more true strikes called, more balls called strikes too) and a zone drawn tight is a strict one. Pitch tracking lets analysts see each umpire's operating point directly, which is how research such as Parsons et al. 2011 could measure calls shifting by context.

Choosing the threshold by cost, not by J

A single pass rate hides the question I care about: which mistakes, and what do they cost?Igor Dvorkin, AI testing: confusion matrix, precision and recall

Choosing the cut with the largest J hides a cost assumption. The expected cost of a cut is (cost of a miss) × (misses) + (cost of a false YES) × (false YESes). Working through the algebra, the J-maximising cut is the cheapest only when the cost of a miss times the share of YES items equals the cost of a false YES times the share of NO items. On the casebook set (60 YES, 140 NO) J quietly assumes a miss costs 140/60, about 2.3 times, a false YES. Nobody chose that ratio. The table puts three explicit cost ratios on the same five cuts (the costs are illustrative; the counts are the casebook's):

CutMisses (FN)False YES (FP)Equal costsMiss 20× worseFalse YES 5× worse
≥53273964767
≥4122133261117
≥365258172266
≥229092130452
≥10140140140700

Same judge, same curve, three different best cuts. With equal costs the cheapest cut is ≥4, which here is also J's choice. When a miss is twenty times worse, it drops to ≥2 and the judge accepts 90 false YESes to avoid 10 more misses. When a false YES is five times worse, it climbs to ≥5. The cost ratio, not the judge, decides where to sit, and the ratio has to come from whoever owns the consequences.

Try thisDrag from “false YES” to “missed YES” and watch the cheapest cut walk from strict to lenient while J keeps pointing at ≥4.

For an LLM judge used as a gate, first decide which error is expensive. A safety or policy gate where YES means “passes” should usually fear the false YES, the bad output let through, and run strict. A judge that filters training data may fear either error, depending on how scarce good data is. A judge that only ranks candidates for a human to review can run lenient, because a person catches the false YESes. Igor's confusion-matrix section does the same on a made-up triage classifier: price each kind of mistake, then pick the metric per class.

What each mistake costs in hiring

The usual folk wisdom says a bad hire costs far more than a missed good one: months of lost output, a team dragged down, a painful exit. Companies that believe it run the interviewer strict, the “false YES 5× worse” column. A company that cannot fill roles at all may reasonably run looser. Either way, the choice is a cost judgement that should be made out loud.

What each mistake costs in reviews

A false “exceeds” spends a limited reward budget on the wrong person and dilutes the rating's meaning. A missed strong performer may leave. Which is worse depends on how scarce the budget is and how replaceable the person is, which is why calibration committees argue about the cut line, not about each manager's eye.

What each mistake costs in wine

A false medal inflates the competition's medals and erodes what a sticker on a bottle means; a missed medal costs one producer a sale. Competitions with a reputation to protect run strict; competitions that make money from entry fees have a reason to drift lenient. The threshold reflects the incentive, not only the palate.

What each mistake costs in screening

A missed cancer can cost a life. A false recall costs anxiety, an extra appointment and sometimes a biopsy. Screening programmes therefore accept many false recalls for each cancer caught, the “miss 20× worse” column, while auditing recall rates so the lenient cut does not drift into recalling everyone.

What each mistake costs behind the plate

Umpiring is the domain with roughly symmetric costs: a strike called a ball hurts the pitcher as much as a ball called a strike hurts the batter, and the rulebook takes no side. That is why the right target for an umpire is close to the J cut, minimising total errors, and why a zone that drifts in one direction is called bias rather than policy.

What you can say now

Sources

Next: How judges go wrong I: what they are shown · Back to the map.