By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
You cannot write a regex for 'is this claim supported by the context'. But another LLM can read both and give you a judgement — especially if you give it a rubric and force it to explain before it scores. That is LLM-as-a-judge, and it is the engine behind every modern evaluation framework.
One criterion per call. A judge asked to score faithfulness, relevance and tone at once will blend them. Ask three questions, get three numbers.
A rubric with anchors. Define what 1.0, 0.7, 0.4 and 0.0 look like. Without anchors the model invents its own scale every run.
Reason first, score second. Ask for the analysis before the number. Models that commit to a score first then rationalise it are far less reliable.
Structured output. {"reason": "...", "score": 0.0} as JSON. Free-text scores are unparseable at scale.
A reference example or two. Two worked examples at the top of the prompt improve agreement dramatically.
A cheap model, unless proven otherwise. Test whether the small model agrees with your human labels before paying for the frontier one.
You are evaluating whether an answer is supported by the context.
RUBRIC
1.0 Every factual claim in the answer appears in the context.
0.7 Most claims are supported; one minor detail is not.
0.4 About half the claims are supported.
0.0 The answer contradicts the context or invents policy.
RULES
- Ignore tone, length and style. Judge ONLY factual support.
- A claim that is true in the real world but absent from the context
counts as UNSUPPORTED.
- A claim that contradicts the context is worse than a missing claim.
EXAMPLE
Context: 'Sale items may be returned within 14 days for store credit.'
Answer : 'You can return sale items within 14 days for store credit.'
=> {"reason": "Both claims appear verbatim in the context.", "score": 1.0}
NOW EVALUATE
Context: {{context}}
Answer : {{answer}}
Return JSON only: {"reason": "...", "score": <number>}| Bias | What happens | Mitigation |
|---|---|---|
| Verbosity bias | Longer answers score higher even when padded | Explicitly penalise padding in the rubric; cap length |
| Position bias | In A/B comparisons the first or second answer wins unfairly | Swap order and average the two runs |
| Self-preference | A model prefers answers from its own family | Use a different judge model than the generator |
| Sycophancy | Fluent confident wrong answers score well | Force claim-by-claim reasoning; give the reference |
| Score compression | Everything lands between 0.7 and 0.9 | Use anchored rubrics and few-shot extremes |
| Rubric drift | The judge's interpretation changes between runs | Version the judge prompt; pin the judge model |
You do not need a statistics lecture. You need two numbers on your 30-answer calibration set: how often the judge agreed with you, and how far off the scores were on average. Track both. When you change the judge prompt, re-run the calibration set and make sure both stayed stable — otherwise every historical score is now meaningless.
human = [1.0, 0.7, 0.0, 1.0, 0.4, 0.9]
judge = [1.0, 0.8, 0.2, 1.0, 0.6, 0.9]
agreement = sum(abs(h - j) <= 0.2 for h, j in zip(human, judge)) / len(human)
mean_gap = sum(abs(h - j) for h, j in zip(human, judge)) / len(human)
print(round(agreement, 2), round(mean_gap, 2)) # 0.83 0.12Key takeaways
A judge is an LLM scoring against a rubric; it is the only practical way to score meaning.
One criterion per call, anchored rubric, reason before score, JSON out.
Judges have known biases: verbosity, position, self-preference and sycophancy.
Calibrate against 30 human labels before trusting any judge score.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.