In this article
Before you start
This page assumes you can read a short prompt and a pass-or-fail table; the LLM evaluation page covers the wider field.
Why interviewers ask this
A team that ships a language-model feature needs a quality number every week, and human review cannot keep up, so interviewers ask about LLM-as-a-judge to see whether you treat the judge as a measuring instrument with known error or as an oracle. Candidates report the topic in applied machine learning and AI engineering loops at AI labs and large tech companies, usually as "how would you evaluate the outputs of an LLM?"
A weak answer says "ask GPT-4 to score it from 1 to 10." A strong answer names the rubric, the known biases and the human check. A Staff-level answer adds the statistics: the judge's raw pass rate is biased, so you correct it with measured error rates and report an interval, not a single number.
LLM-as-a-judge from first principles
- LLM-as-a-judge
- LLM-as-a-judge is an evaluation method in which a prompted language model reads an input and one or more candidate outputs and returns a score, a pass or fail, or a preference according to a written rubric, so that output quality can be measured at scale without a person reading every output.
- Position bias
- Position bias is a judge's tendency to favor an answer because of where it appears in the prompt, usually the first slot, rather than because of its quality. It is detected by swapping the order of two answers and checking whether the verdict changes.
- Self-preference bias
- Self-preference bias is a judge's tendency to score text written by its own model higher than equally good text from other models or from humans. It makes a model a poor sole judge of its own outputs.
In plain words
Picture a teaching assistant who grades a thousand essays with a one-page marking guide. The guide is the rubric, the written list of criteria and scale the judge applies. The assistant is the judge. The course lead who re-grades fifty essays to check the assistant is the human calibration.
The analogy breaks in two places. A human assistant does not change a grade when two essays swap places in the pile, and a language model sometimes does. A human also rarely prefers essays written in their own style, while a model may.
In one precise sentence, LLM-as-a-judge turns a quality question into a prompt, reads the verdict as data, and treats the judge's error as something to measure and subtract, not ignore.
Step 1: Write the rubric and choose a judging format
A judge needs a rubric and a format before it needs a prompt. Zheng et al. (2023) describe three formats: pairwise comparison, where the judge picks the better of two answers; single-answer grading, where it scores one answer; and reference-guided grading, where it also sees a correct answer.
Start with one criterion per call, such as "is every claim supported by the provided text", and a pass-or-fail scale. Two labels are enough to calibrate in Step 4, and a scale from 1 to 10 is hard to anchor.
Input: the task and the quality you care about. Output: a written rubric and a format. You now have the instrument's definition; Step 2 turns it into a prompt.
Step 2: Prompt the judge to reason first, then return a fixed verdict
A judge prompt holds four things: the rubric, the input, the candidate answer and a required output format. Ask for a short explanation before the verdict. Zheng et al. (2023) report GPT-4 judge failures on math questions of 14 of 20 with the default prompt, 6 of 20 with chain-of-thought and 3 of 20 with a reference answer.
Hide which model wrote each answer to avoid label bias. That does not stop self-preference: Panickssery et al. (2024) found that judges recognize their own unlabeled text and that the preference tracks that recognition, so use a judge from a different model family. Demand a fixed format such as verdict: pass so code can parse it; Zheng et al. count unparseable output as an error.
Input: the rubric and one answer. Output: a parseable verdict.
Step 3: Judge both answer orders and ignore padding
Position bias makes a single-order pairwise judgment unreliable, so each pair is judged in both answer orders. Zheng et al. (2023) measured GPT-4 giving the same verdict after a swap in 65.0% of pairs with the default prompt, favoring the first slot in 30.0% and the second in 5.0%. They suggest calling a pair a tie when the two orders disagree; on 1,000 pairs at that rate that is about 350 ties.1
Length is a second trap. In their "repetitive list" test, which added redundant items to an answer without improving it, Claude-v1 and GPT-3.5 failed on 91.3% of 23 answers and GPT-4 on 8.7%. Say in the rubric that padding earns nothing.
Input: a pair of answers. Output: a verdict that survives the swap, or a tie.
Step 4: How to correctly report LLM-as-a-judge evaluations
A judge's raw pass rate is a biased estimate of the model's true accuracy, so people must label a small calibration set and the raw rate must be corrected. Lee et al. (2025) describe the judge by its sensitivity, the share of truly correct answers it passes, and its specificity, the share of truly incorrect answers it rejects.
Let p be the share the judge passes on the test set, and q₁ and q₀ the sensitivity and specificity measured on the calibration set. Solving the expected pass rate for the true accuracy gives the correction known in epidemiology as the Rogan–Gladen estimator (Rogan and Gladen, 1978):
Lee et al. build a bias-corrected estimator and a confidence interval on these same two quantities; the interval must carry the calibration set's uncertainty too. A small set of human labels corrects the raw pass rate. Input: judge verdicts and human labels. Output: a corrected score with an interval.
Step-by-step description
- Write one criterion and pick a judging format.
- The judge reasons, then returns a fixed verdict.
- Each pair is judged in both answer orders.
- Human labels correct the raw pass rate.
- Each pair is judged in both answer orders.
- A small set of human labels corrects the raw pass rate.
Knowing it is half the job. Saying it is the other half.
Interview Clozo is an AI interview copilot for real interview rounds: it hears the question and puts a strong answer on your screen, and you say it in your own words. See the features or how it works.
Start Free Trial →Worked example
What does a calibrated judge score look like?
A judge that passes 62% of a test set can belong to a model whose true accuracy is 60%. Suppose, illustratively, that people label 200 outputs: 100 pass and 100 fail. The judge passes 90 of the good ones and rejects 80 of the bad ones, so its sensitivity is 0.90 and its specificity is 0.80. Raw agreement with the humans is 0.85. Cohen's kappa, which is agreement beyond what chance alone gives, is 0.70, because chance agreement is 0.50 with these label shares.1
The judge then grades a test set of 1,000 outputs and passes 620, a raw pass rate of 0.62. The correction is (0.62 + 0.80 − 1) divided by (0.90 + 0.80 − 1), which is 0.42 divided by 0.70, or 0.60. The raw rate overstates the model by two points.1
| Quantity | Value (illustrative inputs, computed outputs) |
|---|---|
| Calibration set | 100 human-pass and 100 human-fail outputs |
| Judge sensitivity | 0.90 |
| Judge specificity | 0.80 |
| Raw agreement with humans | 0.85 |
| Cohen's kappa | 0.70 |
| Test set | 1,000 outputs, 620 passed by the judge |
| Raw pass rate | 0.62 |
| Corrected accuracy | 0.60 |
| 95% interval on the raw rate, test set only | 0.590 to 0.650 |
| 95% interval on the corrected accuracy | 0.520 to 0.680 |
Why is the corrected interval wider than the raw one?
The corrected interval is wider because it is honest about two sources of noise. The naive interval uses only the 1,000 test outputs and has a half-width of 0.030. The corrected one also carries the uncertainty of measuring sensitivity and specificity from only 200 labels, and its half-width is 0.080 (illustrative inputs).1
The 0.080 half-width is an illustrative delta-method approximation we computed.1 The paper by Lee et al. gives its own construction and a way to allocate calibration labels. In this example the two calibration terms add more variance than the test-set term does, so more human labels help more than a bigger test set.
How wrong is the raw score for weak and strong models?
The size of the judge's error depends on how good the model is. With the same judge, a model whose true accuracy is 0.30 (illustrative) gets a raw pass rate of 0.41, a model at 0.60 gets 0.62, and a model at 0.90 gets 0.83. The judge flatters weak models and under-reports strong ones.
A naive 95% interval on 1,000 outputs then contains the true accuracy about 74% of the time at 0.60 and essentially never at 0.30 or 0.90.1
Text description of the diagram
- At true accuracy 0.30 the judge reports a pass rate of 0.41.
- At true accuracy 0.90 the judge reports a pass rate of 0.83.
Trade-offs and edge cases
When is a judge the wrong tool?
LLM-as-a-judge trades some accuracy for speed and scale, and it is the wrong tool when code can check the answer; the LLM evaluation page covers the wider options. If the output is a number, a Structured Query Language (SQL) result or code with unit tests, run the check; a judge adds noise and cost; a fixed set of cases with expected results, as in golden sets and regression testing for LLM apps, is the place for such checks.
The judge earns its place on open-ended output such as summaries, chat replies and grounded answers, where no exact answer exists, both before release and on live traffic. A reference-based metric such as BERTScore (Zhang et al., 2019) compares an answer with a reference text token by token and needs that reference; a judge can grade without one.
Which judging format costs the least?
Single-answer grading costs the least, and pairwise judging costs the most once orders are swapped.
| Judging format | What the judge sees | Judge calls | Typical use |
|---|---|---|---|
| Pairwise comparison | Two answers | 2 per pair | Ranking two model versions side by side |
| Single-answer grading | One answer | 1 per answer | Scoring each output against a rubric |
| Reference-guided grading | One answer and a correct answer | 1 per answer | Math, code and factual tasks |
Comparing 5 models on 80 prompts pairwise, in both orders, takes 10 model pairs × 80 prompts × 2 orders = 1,600 judge calls. Grading each answer once in single-answer mode takes 400.1
Which biases should you expect, and what fixes each?
Four weaknesses recur, and each has a cheap countermeasure. A judge can favor the first answer, so judge both orders. It can reward long, padded text, so the rubric must say length earns nothing. It can favor its own outputs: Panickssery et al. (2024) found that language-model judges recognize and favor their own generations, so use a different judge model. It can accept wrong math, so give it a reference answer.
Practice on swapped verdicts differs: a tie when the orders disagree, as Zheng et al. suggest, or the average of the two scores. The tie is stricter; the average keeps more data but hides the instability.
Text description of the diagram
- A judge can favor the first answer, so each pair is judged in both orders.
- A judge can favor its own outputs, so a different judge model is used.
When does the correction break?
The correction in Step 4 breaks when the judge is close to chance, when the estimate leaves the 0 to 1 range, and when the calibration set does not match the test set. The denominator is q₁ + q₀ − 1, which is 0.70 here; as the judge nears chance that sum approaches 1, the denominator approaches 0 and the estimate and its interval blow up. Even at 0.70 the correction multiplies the raw noise by 1.43.1
The estimate can also fall outside the range: a raw pass rate of 0.95 with this judge gives 1.07, which is clipped to 1.1 Finally, the formula assumes the measured sensitivity and specificity carry over to the test set. Lee et al. (2025) show their estimator stays unbiased when the share of passing outputs differs between the calibration and test sets, but a change in the judge's own error rates is not covered. So draw the calibration set from the same task and the same kind of model outputs, and re-measure it when the model under test changes, not only when the judge does.
What other edge cases break a judge?
A judge breaks when the text it grades attacks it, when a loop optimizes it, or when it changes under you. The judge reads the answer it grades, so an answer that contains instructions can try to steer the verdict; the page on AI agent security explains how prompt injection works.
A judge-rewriter loop, where a second model rewrites an answer until the judge passes it, optimizes the judge's score and not quality, so keep a human-labeled set the loop never sees. Changing the judge model or the prompt changes its sensitivity and specificity, so recalibrate after every change. The survey by Gu et al. (2024) treats the reliability of judges, biases included, as a central open problem of the field, and Lee et al. (2025) give a statistical way to correct and report it.
How to answer it in an interview
How would you evaluate the outputs of an LLM at scale, and how far would you trust a model as the judge?
I would use LLM-as-a-judge: prompt a strong model with a pass-or-fail rubric to grade outputs. I would ask for reasoning before the verdict, use a different model family from the one being graded, and judge both answer orders for any pair. The judge is noisy, so I would label a few hundred outputs by hand, measure its sensitivity and specificity, correct the raw pass rate with them and report an interval. What breaks the number is bias: position, length and self-preference, so I recalibrate whenever the judge or the prompt changes.
The spoken structure: say what it is, then the prompt design, then the biases, then the calibration, then what you would re-check.
Common mistakes
- "The judge passes 62%, so the model is 62% accurate." (wrong) The raw rate includes the judge's own errors. (right) "The judge passes 62%; correcting with its measured sensitivity and specificity, accuracy is about 60%, with an interval" (illustrative numbers).
- "I ask the model to rate it from 1 to 10." (wrong) Scales without anchors drift between prompts and runs. (right) "One criterion, pass or fail, with a written definition."
- "The same model grades its own outputs." (wrong) That invites self-preference bias. (right) "I use a different judge model, because hiding the source does not remove self-preference, and I check agreement on labeled outputs."
- "I compared answer A with answer B once." (wrong) A single order mixes quality with position bias. (right) "I judge both orders and count disagreement as a tie."
- "We validated the judge once, so it is fine." (wrong) A new judge model or prompt has new error rates. (right) "I recheck against fresh human labels after every change."
Follow-up questions
How reliable is LLM-as-a-judge?
LLM-as-a-judge works on open-ended chat within limits: in the original study GPT-4 matched human voters better than 80% of the time, the level humans reach with each other. How well it works on your task is not given by that number, so measure it on your own labeled outputs and report the corrected score as in Step 4.
When should you not use LLM-as-a-judge?
Do not use it when code or an exact reference can decide: a unit test, an exact-match check or a query result. Use it where the answer is open-ended and a rubric can describe quality.
How is LLM-as-a-judge different from a reward model?
A reward model is a network trained to output a scalar score for a response, typically to steer training, while a judge is a general model prompted with a rubric at evaluation time; both are built on the transformer architecture. Both are imperfect proxies for human preference, so both need human checks. The LLM evaluation guide places each in the full workflow.
How do you evaluate a RAG system with LLM-as-a-judge, and does Ragas use it?
Retrieval-augmented generation (RAG) is a design in which a model answers from passages it retrieves first. A judge can grade whether the answer is supported by those passages, one criterion per call, then you calibrate as in Step 4. Ragas does use the idea: Es et al. (2023) describe a reference-free framework whose metrics, such as faithfulness, are scored by a language model, and the Ragas page shows how that toolkit organizes them.
How do you improve an LLM judge?
Improve it in the order of the steps above: tighten the rubric to one criterion with a written definition, ask for reasoning before a fixed verdict, judge both answer orders, and use a reference answer for checkable tasks. Then measure sensitivity and specificity on human labels and recheck after every change to the judge or prompt, as in Step 4. The same steps are how you build a judge from scratch.
Can a model judge its own outputs?
It can, but it tends to favor them, and Panickssery et al. (2024) found the preference grows with the model's ability to recognize its own text. Prefer a different model family, because hiding the source is only a supplement, and measure agreement with people.
- LLM-as-a-judge prompts one model to grade another's outputs against a written rubric, at a scale people cannot match.
- Use a pass-or-fail rubric, a reason-then-verdict prompt and a parseable format.
- Judge both answer orders and use a different judge model to limit position and self-preference bias.
- A judge's raw pass rate is biased; correct it with sensitivity and specificity from human labels and report an interval.
- Recalibrate whenever the judge model or prompt changes.
Sources
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (arXiv 2306.05685) — arXiv (Zheng et al.); accessed 2026-10-26, 9 Jun 2023
- How to Correctly Report LLM-as-a-Judge Evaluations (arXiv 2511.21140) — arXiv (Lee, Zeng et al.); accessed 2026-10-26, 26 Nov 2025
- LLM Evaluators Recognize and Favor Their Own Generations (arXiv 2404.13076) — arXiv (Panickssery, Bowman, Feng); accessed 2026-10-26, 15 Apr 2024
- A Survey on LLM-as-a-Judge (arXiv 2411.15594) — arXiv (Gu et al.); accessed 2026-10-26, 23 Nov 2024
- BERTScore: Evaluating Text Generation with BERT (arXiv 1904.09675) — arXiv (Zhang et al.); accessed 2026-10-26, 21 Apr 2019
- Estimation of prevalence from the results of a screening test — American Journal of Epidemiology 107(1):71-76 (Rogan and Gladen), 1 Jan 1978
- Ragas: Automated Evaluation of Retrieval Augmented Generation (arXiv 2309.15217) — arXiv (Es et al.); accessed 2026-10-26, 26 Sep 2023