Practical technical guides / AI engineering: evaluation (judge validation)

A Judge That Agrees With Reviewers 94 Percent of the Time Can Still Miss Most Failures: Validate With Kappa and Per-Class Recall

A judge agreed with reviewers 94 percent of the time and caught 14 of 40 failures. Use the confusion matrix, Cohen kappa, recall with a Wilson interval and enough failures.

By Sandeep Belgavi · Published 2026-11-09

A judge agreed with reviewers 94 percent of the time and caught 14 of 40 failures. Use the confusion matrix, Cohen kappa, recall with a Wilson interval and enough failures.

The judge agreed with reviewers 94 percent of the time

Belgavi's Book Store reviews a sample of help-desk replies every week. Reviewers label each reply pass or fail; a reply fails when it breaks a policy, for example promising a refund the store does not give. Hansini wanted to replace part of that review with an LLM judge, so the team ran the judge over 500 replies that reviewers had already labelled. The judge agreed with the reviewers on 470 of them: 94 percent.

That sounds ready. It is not. Only 40 of the 500 replies were failures. The judge caught 14 of them and missed 26. It agreed so often because it agreed on the 456 passes, which any judge that says "pass" almost every time will do.

This guide shows how to validate a judge against reviewer labels before it replaces review: the confusion matrix, Cohen's kappa, recall on the failure class with an interval, and the size of calibration set needed to bound that recall. Everything is computed with the standard library in the companion code. The labels and counts are synthetic; the method is not.

Start from the confusion matrix

Treat fail as the positive class, because finding failures is the job. Four counts describe the judge against the reviewers:

Judge says failJudge says pass
Reviewer says failtrue positive (tp)false negative (fn)
Reviewer says passfalse positive (fp)true negative (tn)

From these:

  • Agreement = (tp + tn) / n.
  • Recall on failures = tp / (tp + fn): of the replies that break policy, how many the judge catches.
  • Precision on failures = tp / (tp + fp): of the replies the judge flags, how many really break policy.

Three synthetic judges over the same 500 labels (40 failures, 460 passes) show why agreement alone misleads:

JudgetpfnfptnAgreementKappaFailure recall (95% interval)Precision
always pass04004600.9200.0000.00 (0.00 to 0.09)none flagged
lenient142644560.9400.4560.35 (0.22 to 0.51)0.78
careful346144460.9600.7510.85 (0.71 to 0.93)0.71

A judge that never flags anything already scores 92 percent agreement. The lenient judge adds two points of agreement and misses most failures.

Kappa: agreement beyond what the label rates give you

Cohen's kappa compares observed agreement with the agreement expected by chance if the two raters labelled independently at their own rates:

p_o = (tp + tn) / n
p_e = P(reviewer fail) * P(judge fail) + P(reviewer pass) * P(judge pass)
kappa = (p_o - p_e) / (1 - p_e)

For the lenient judge, reviewers say fail 8 percent of the time and the judge says fail 3.6 percent of the time, so chance alone gives p_e = 0.08 x 0.036 + 0.92 x 0.964 = 0.890. Observed agreement of 0.940 is only modestly above that, and kappa is 0.456. The always-pass judge has p_o equal to p_e, so its kappa is exactly 0.

Kappa is a better single number than agreement for imbalanced labels, but it is still one number for two classes. It can be dragged around by prevalence, and two judges with the same kappa can fail in different directions. Use it as a screen, then decide on the class that matters.

Decide on recall with an interval, not a point

The question for replacing review is: of the replies that break policy, what share will the judge catch? The careful judge caught 34 of 40, a recall of 0.85. With only 40 failures, that estimate is uncertain. A Wilson score interval, which behaves well near 0 and 1 and with small counts, puts the 95 percent interval at 0.71 to 0.93.

def wilson(k, n, z=1.959963984540054):
    p = k / n
    den = 1 + z * z / n
    mid = (p + z * z / (2 * n)) / den
    half = z * math.sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / den
    return max(0.0, mid - half), min(1.0, mid + half)

If the store's rule is "the judge may replace review of a failure type only if we are confident it catches at least 80 percent", the careful judge does not qualify yet. Its point estimate is above 0.8 but the lower end of its interval is 0.71. The honest answer is "probably, but we have not shown it". The companion code encodes that rule in a decide function that requires both the recall lower bound and kappa to clear a bar, and reports which one failed.

How many failures do you need to label?

The width of the interval depends on the number of failures, not on the number of cases. To pin recall near 0.85 to within plus or minus 0.10, a normal approximation needs about z^2 x p(1 - p) / E^2 = 3.84 x 0.1275 / 0.01, or 49 failures. At 8 percent prevalence, a random sample yields that many failures in about 613 cases. For plus or minus 0.05 the numbers are 196 failures and 2,450 cases.

Labelling 2,450 random replies to find 196 failures is expensive. The usual alternative is an enriched sample: deliberately collect known failures (from past reviews, complaints, or a first-pass filter) and an equal number of passes, label both, and measure recall and false positive rate separately. The companion example labels 120 failures and 120 passes. The judge catches 102 (recall 0.85, interval 0.78 to 0.90) and wrongly flags 4 passes (a false positive rate of 3.3 percent).

There is one trap. Precision measured in the enriched sample is 102 / 106 = 0.96, but that is because half the sample is failures. At the real prevalence of 8 percent, precision is recall x 0.08 / (recall x 0.08 + FPR x 0.92) = 0.69. Recall and false positive rate transfer from an enriched sample; precision does not, and must be recomputed at the prevalence you expect in production.

What a validation run looks like in practice

  1. Freeze the reviewer labels and the judge version. Record the judge model identifier, its prompt and rubric, and the date. A judge change is a new validation.
  2. Choose the decision class. Usually the failure class, possibly split by failure type: a judge can be good at catching refund promises and poor at catching tone.
  3. Collect enough failures of each type. Use the sample-size arithmetic above to decide how many, and enrich if you must.
  4. Compute the confusion matrix, kappa, recall with interval and false positive rate. Report all of them; do not lead with agreement.
  5. Read the disagreements. Every false negative and a sample of false positives. Some will be reviewer errors; fix the labels and say so, but do not relabel only the cases that make the judge look better.
  6. Decide per failure type. Replace review where the lower bound of recall clears your bar; keep humans where it does not. Keep a random audit sample even where the judge is trusted, so drift shows up.

Failure modes

  • Agreement as the headline. With rare failures, agreement is dominated by easy passes. Never report it without recall on the failure class.
  • Calibration set drawn from the judge. If the cases to label were chosen because the judge flagged them, recall cannot be measured: missed failures never enter the set.
  • Reviewer disagreement ignored. If two reviewers agree on failures only 80 percent of the time, a judge cannot be shown to do better than that against either one. Measure reviewer-to-reviewer kappa on a subset first.
  • Stale validation. The judge model, the rubric and the replies all change. Re-run validation when any of them does, and keep the audit sample running.
  • Thresholded scores treated as labels. If the judge outputs a score, recall and false positive rate depend on the threshold. Validate at the threshold you will deploy, or report the curve.

When a judge is unnecessary

If the policy can be checked mechanically, for example "never include a card number" or "always link the returns page", a deterministic check is cheaper and has no recall question at all. Use a judge for the parts that need reading, and validate it for exactly those parts.

Verification

The companion tests pin the arithmetic: kappa of 0.4 for a small hand-computed matrix, a Wilson upper bound of about 0.088 for 0 of 40, 49 failures for plus or minus 0.10 at a recall of 0.85, and an enriched-sample precision above 0.95 that falls below 0.70 at 8 percent prevalence. Run them before trusting your own numbers, then run your judge on your own frozen labels.

Primary references and authorship

Original explanation and synthetic examples by Sandeep Belgavi. Companion code: Sandeep-BA/agent-decision-lab/examples/python/judge_validation_kappa. Views are my own and do not represent any employer, past or present.