Sub topic 11
Checking a Judge Against Human Labels
This chapter assumes you have read the earlier chapters on claim-level faithfulness scoring and LLM judges. It also assumes you can read Python and know precision and recall from classification.
Why a judge needs checking
An LLM judge returns a verdict that looks authoritative, whether or not it is right. If the judge approves unsupported claims, your faithfulness score will be too high, and you will not notice. Before you trust the score, compare the judge with people on the same items.
The procedure
- Sample claims from real system outputs. Include some that you expect to be unsupported, because most claims are fine and a random sample may contain few failures.
- Have a person label each claim as supported or unsupported, using only the retrieved context. Two labelers are better than one.
- Run the judge on the same claims with the same context.
- Compare the verdicts and report agreement statistics.
- Read the disagreements and change the judge prompt or model. Then rerun the comparison.
Computing the statistics
Accuracy alone misleads when most claims are supported. Cohen's kappa corrects for the agreement you would get by chance. You should also measure how well the judge catches unsupported claims, because those are the failures you care about.
def judge_agreement(human, judge):
"""human, judge: lists of bools, True = claim is supported."""
n = len(human)
tp = sum(h and j for h, j in zip(human, judge))
tn = sum(not h and not j for h, j in zip(human, judge))
fp = sum(not h and j for h, j in zip(human, judge)) # judge missed a bad claim
fn = sum(h and not j for h, j in zip(human, judge)) # judge flagged a good claim
po = (tp + tn) / n
p_h = (tp + fn) / n
p_j = (tp + fp) / n
pe = p_h * p_j + (1 - p_h) * (1 - p_j)
kappa = (po - pe) / (1 - pe) if pe < 1 else None
bad = tn + fp # claims humans marked unsupported
return {
"accuracy": round(po, 3),
"kappa": None if kappa is None else round(kappa, 3),
"unsupported_recall": round(tn / bad, 3) if bad else None,
"unsupported_precision": round(tn / (tn + fn), 3) if (tn + fn) else None,
}
human = [True] * 8 + [False] * 4
judge = [True] * 8 + [True, True, False, True]
print(judge_agreement(human, judge))
# {'accuracy': 0.75, 'kappa': 0.308, 'unsupported_recall': 0.25, 'unsupported_precision': 1.0}Accuracy of 0.75 looks acceptable. Kappa of 0.308 is weak, and the judge catches only one of the four unsupported claims. This judge would overstate faithfulness.
Reading the numbers
| Statistic | What it tells you |
|---|---|
| Accuracy | Share of verdicts that match the humans. Inflated when one class dominates. |
| Cohen's kappa | Agreement beyond chance. Values near 0 mean the judge adds little over guessing. |
| Unsupported recall | Share of bad claims the judge catches. Low values mean scores are too optimistic. |
| Unsupported precision | Share of the judge's flags that are real. Low values waste review time. |
There is no universal kappa cutoff. Compare against how well two humans agree with each other. A judge cannot be expected to beat that.
Common errors
- Too few labels. With 12 claims, one disagreement moves the numbers a lot. Use the bootstrap from the statistical reliability chapter to get an interval.
- Labeling without the context. Humans must judge support from the retrieved passages, not from what they know to be true. Otherwise you measure correctness, not faithfulness.
- Ignoring where the judge fails. A judge that is good on short claims may fail on long or numeric ones. Break results down by claim type.
- Validating once. Revalidate after you change the judge model, the prompt, or the generator, because the outputs it sees will change.
Exercise
A judge scores 95% accuracy on 100 claims, of which 95 are supported according to the human labels. A colleague says the judge is excellent. What would you check next, and what result would show the judge is useless?
Show answer
Check kappa and unsupported recall. A judge that always answers "supported" scores 95% accuracy here, but its kappa is 0 and its unsupported recall is 0, because it catches none of the 5 bad claims. Accuracy alone cannot tell this judge apart from a good one.