LLM-as-a-Judge: Using Models to Evaluate Models Without Fooling Yourself
How do you grade a summary, a chatbot reply, or a RAG answer when there is no single correct string? Increasingly, you ask another model to judge. It scales beautifully — and it is full of biases that will quietly lie to you unless you design around them.
Evaluating open-ended LLM output is hard because there is rarely one right answer. A summary, a support reply, a RAG response — each can be good in many wordings, so exact-match scoring is useless and human grading is slow and expensive. The popular answer is to use a strong model as the grader: LLM-as-a-judge.
It scales evaluation from dozens of human-graded examples to thousands of automatically scored ones, and it is now standard in eval pipelines everywhere. But a judge model carries a set of predictable biases, and if you do not design around them, it will hand you confident scores that do not mean what you think — the fastest way to ship a regression while your dashboard says green.
How judging actually works
You give a capable model the output to grade, a rubric, and optionally a reference answer, and ask it to score. There are a few standard shapes, and which you pick changes how reliable the result is.
- Pointwise scoring. Rate one output against a rubric, say 1 to 5. Simple, but absolute scores drift and are hard to calibrate.
- Pairwise comparison. Show the judge two outputs and ask which is better. More reliable, because relative judgments are easier than absolute ones.
- Reference-based. Compare the output to a known good answer — useful when you have gold references to anchor the grade.
- Reasoning first. Whichever shape, have the judge explain its verdict before giving the score; the justification measurably improves the judgment.
The biases that will fool you
A judge model is not a neutral instrument. It has tendencies that systematically distort scores, and every one of them is a way to fool yourself into trusting a bad result. The good news is that each has a known countermeasure.
The big ones: position bias (it favors whichever answer comes first — so randomize order, or run both orders and average), verbosity bias (it rates longer answers higher regardless of quality), and self-preference (a model tends to favor outputs from its own family — so judge with a different model than the one under test). On top of those, judges are inconsistent run to run and sensitive to exactly how the rubric is worded.
A judge, in code
The mechanics are simple — a rubric, reasoning before the score, and a parse step. The rigor is in everything around it:
# LLM-as-a-judge: score with a rubric, ask for reasoning first, then a number.
RUBRIC = "Rate the answer 1-5 for factual accuracy against the context. Give a one-sentence justification first, then the score."
def judge(context, question, answer, judge_model):
prompt = f"{RUBRIC} Context: {context} Question: {question} Answer: {answer}"
out = judge_model.complete(prompt) # reasoning-before-score improves reliability
return parse_score(out) # pull the 1-5 out of the judge's reply
# Use a judge from a different model family than the one being tested, randomize
# answer order for pairwise, and calibrate against human labels on a sample.Notice that the code is the easy 20%. The other 80% — different judge family, randomized positions, a clear rubric, calibration against humans — is what makes the number trustworthy.
An LLM judge is a fast, cheap, biased grader. Treat its score as a measurement with known error bars — calibrate it against humans — not as ground truth handed down from a neutral oracle.
Using it without lying to yourself
- Calibrate against humans. Grade a sample by hand and check the judge agrees; if it does not track human preference, fix the rubric before trusting any numbers.
- Prefer pairwise. Asking which of two is better is more stable than asking for an absolute score, especially for subtle quality differences.
- Randomize and de-bias. Shuffle answer order to kill position bias, and watch for the judge rewarding length over substance.
- Use a different, strong judge. Do not let a model grade its own family, and use a capable judge — a weak one grades unreliably.
- Keep humans in the loop for high stakes. LLM judging is for scale and triage; final, consequential decisions still deserve a human spot-check.
The bottom line
LLM-as-a-judge is how you make open-ended evaluation tractable: it turns ungradeable, free-form output into scores you can track across thousands of examples. Used carelessly, it produces confident nonsense; used with a clear rubric, pairwise comparisons, randomized positions, a separate judge model, and human calibration, it is a genuinely useful instrument.
The mindset is everything. A judge model is not an oracle — it is a fast grader with measurable biases. Design your evaluation to expose and correct those biases, and an LLM judge becomes one of the most leveraged tools you have for shipping models with confidence.
Enjoyed this?
Get the next deep dive in your inbox. No spam — just the stories worth reading.
Subscribe to the newsletter