LLM-as-a-Judge: Designing Trustworthy Model-Based Evaluation
Treat the judge like a fallible human rater. Before trusting its scores, you must check repeatability (same input → same score), position invariance (swapping candidate order should not swap the winner), and criterion validity (agreement with expert labels). A judge that merely sounds confident is not a measurement device.
1. Define the measurement target
Choose the construct before the prompt: factual correctness, helpfulness, harmlessness or style. Write a rubric that distinguishes them. If the rubric says 'quality', the judge will invent its own.
2. Pointwise versus pairwise
Pointwise scores drift between prompts because each call anchors on a different context. Pairwise comparisons are usually more reliable for ranking. Use if you convert scores to a ranking model, but verify the conversion on human labels.
3. Position-swap debiasing
Run both orders: and . Accept a preference only if both orders agree. The swap agreement rate is a direct bias diagnostic; a low invalidates the judge regardless of raw accuracy.
4. Agreement with humans
Let be observed agreement and chance agreement. Then . For more than two raters use Krippendorff's . Report the confidence interval with a bootstrap over examples, not over individual tokens.
5. Calibration
Ask for a confidence alongside the label. Bin predictions by confidence and compare mean confidence to empirical accuracy. Apply temperature scaling on the judge's logits if it is overconfident: with .
6. Statistical comparison
Compare judge-based rankings to human rankings with a paired bootstrap: resample examples, recompute the metric, and report the distribution of the difference. Never report a single accuracy number without uncertainty.