AI5 min read10 interview questionsNew · November
LLM as a judge: grading AI answers with AI
How one model can score another model's answers, and where that goes wrong.
In one sentenceLLM-as-a-judge means asking a language model to grade an output against a clear rubric, so you can test AI quality at scale.
Think of it like thisIt is like a teacher marking essays with a checklist: fast and consistent, but you still spot-check a few papers yourself.
The big picture
Tap any step to see where to use it, how to use it and an example result.
Why it exists
Human review is slow and expensive, and simple string matching cannot judge a free-form answer. A judge model gives a score in seconds, so you can test every change to a prompt or model before release.
Two common styles
Single-answer scoring rates one answer on a scale or pass/fail. Pairwise comparison shows two answers and asks which is better, which is often more reliable than absolute scores.
Known biases
Judges can prefer the first answer shown, prefer longer answers, and favour text that sounds like their own style. They can also be confidently wrong.
- Position bias: swap the order and judge twice.
- Length bias: tell the judge not to reward length.
- Self-preference: use a different model as judge when you can.
Make it trustworthy
Use a specific rubric with examples, ask for a short reason before the score, request structured output, and compare the judge with human labels on a sample. Retest whenever the judge prompt changes.
Common mistakes
- Using a vague rubric such as "is this good?".
- Trusting the judge without comparing it to human ratings.
- Letting the same model grade its own answers and calling it independent.
- Using it for facts it cannot verify, such as the latest prices.
Quick recap
- A judge model grades outputs against a rubric.
- Pairwise comparison is often steadier than a score.
- Judges have biases: position, length and self-preference.
- Always calibrate against human-labelled examples.
Try it yourself
Write a three-line rubric for answers to "How do I reset my password?". Judge two sample answers yourself, then ask an AI assistant to judge them and compare the results.
Top 10 interview questions
Ordered from basic to advanced. Try answering out loud first, then open the answer.
What is LLM-as-a-judge?Basic
Using a language model to evaluate another model's output, usually by scoring it against a rubric or choosing the better of two answers.
Why not just use human reviewers?Basic
People are the gold standard but slow and costly. A judge model can check thousands of outputs after every change, and humans then review a sample to keep it honest.
What is a rubric?Basic
A written list of what a good answer must contain, with clear levels or pass/fail rules, so the judge scores consistently.
What kinds of tasks are hard for a judge model?Basic
Anything it cannot verify itself: up-to-date facts, private data, deep maths or domain expertise. Provide the reference answer or source when you can.
Pairwise comparison versus direct scoring: which is better?Intermediate
Pairwise is usually more reliable because ranking two answers is easier than assigning an absolute number. Direct scoring is simpler to track over time and cheaper.
What is position bias and how do you handle it?Intermediate
Judges often favour whichever answer appears first. Run each comparison twice with the order swapped and count it only when both runs agree, or treat disagreement as a tie.
Why ask the judge to explain before scoring?Intermediate
A short reasoning step tends to improve accuracy and makes the verdict easier to audit. Request structured output so the score can be read by code.
How do you know the judge itself is good?Intermediate
Label a sample by hand, compare agreement with the judge, and look at the cases where they disagree. Rework the rubric until agreement is acceptable.
What is reference-based versus reference-free judging?Advanced
Reference-based judging compares the answer with a known correct answer, which is more accurate. Reference-free judging uses only the rubric, which is needed for open tasks but is less reliable.
How would you use a judge in a release process?Advanced
Keep a fixed test set, run it on every prompt or model change in the pipeline, set a minimum score and block the release if quality drops. Log the results and re-check the judge against humans regularly.
Guides are simplified on purpose. Tool names and details change, so check the official documentation before relying on a detail.