How do you build an LLM-as-judge you can trust? Cover prompt design, known biases and validation.
Answer
Model answer, written in a candidate's voice
In short
- Make the judge narrow and auditable: one task, explicit criteria, binary or pairwise verdicts over 1-10 scales, rubric and reference answers, reasoning before verdict
- Control known biases: swap order and average, penalise verbosity, use a different model family than the generator, ignore tone and format, test for self-preference
- Validate against held-out human labels: agreement statistics, precision/recall/F1 on the failure class, calibration, and re-run after any judge model or prompt change
- Invest in annotation quality: written guidelines, inter-annotator agreement, adjudication, and a clear definition of the failure class
- Keep cost and risk controlled: sample and cache, use cheaper judges for triage, humans review high-stakes or low-confidence cases
In full
I would treat the judge as a narrow measurement instrument, not a general opinion: define one task, write explicit criteria and a rubric, prefer binary or pairwise comparisons over 1-10 scales, include reference answers or examples, and require the model to reason before giving a verdict. I would then design the prompt to reduce known biases: randomise or swap answer order and average the results, separate correctness from length and style, avoid letting confident tone or formatting drive the score, and use a judge from a different model family than the generator so self-preference is less likely. Trust comes from validation, not vibes: I would build a held-out human-labelled set, measure agreement such as Cohen’s kappa or Krippendorff’s alpha plus accuracy, and report precision, recall, and F1 for the failure class rather than only overall agreement, then re-validate whenever the judge model, prompt, rubric, or reference answers change. Annotation quality matters as much as the model, so I would write clear guidelines, measure inter-annotator agreement, adjudicate disagreements, and keep the failure definition stable. Finally, I would control cost by sampling, caching, and using cheaper judges for triage, while keeping humans in the loop for high-stakes decisions, low-confidence cases, and any disagreement between judge and human labels.
What a strong answer covers
- Narrow, explicit criteria; binary or pairwise judgements over 1–10 scales; rubric and reference answers; reasoning before verdict
- Biases: position (swap and average), verbosity, self-preference (different model family), confident tone, format
- Validation against human labels with agreement statistics and precision/recall on the failure class, on held-out data; re-validate when judge model or prompt changes
- Annotation quality: guidelines, inter-annotator agreement, adjudication
- Cost controls; humans stay in the loop for high-stakes decisions
Common mistakes
- Trusting raw judge scores without human agreement data
- the same model generating and judging without checking self-preference