diffox
Blog

What is LLM-as-a-judge, and when can you trust the judge?

LLM-as-a-judge means having one language model grade another model’s answers. Here is how we audited our own judge model.

ShareXLinkedIn

Summary. LLM-as-a-judge is a way of having another language model, the judge model, grade a model’s output. While building diffox, we use it to match code review findings against known bugs that people marked in advance. This post covers the method’s known biases, and how in August 2026 we audited our own judge on 891 pairs (each pair is a review finding and a known bug).

  • Ask the judge “are these the same?”, not “is this good?” A one-word answer to “do these two texts describe the same bug?” can be checked; a score for “is this output good?” cannot.
  • Overall agreement is misleading. Our two judges agreed on 98.8% of 945 shared pairs; on the positive pairs, which decide the result, they agreed 93.5% of the time.
  • The cheap judge turned out generous, but it barely moved the score. The strong judge rejected 24 of the 400 pairs the cheap judge had called a match (6.0%). When we scored one configuration with three different judges, the largest difference was 0.033, below the measurement’s noise floor (0.09).
  • The real noise is in the runs, not in the judge. Changing the judge moved the score by at most 0.033; the same system’s run-to-run standard deviation is 0.094.

What is LLM-as-a-judge?

891pairs we audited
93.5%agreement of two judges on positive pairs
6.0%the cheap judge’s generosity
0.033largest F1 shift when the judge changed

A language model’s output often can’t be compared with a single right answer: two comments that describe the same bug can use completely different words. LLM-as-a-judge fills that gap: you hand the evaluation to another model and give it an instruction (a rubric). In this post we call that model the judge model, or simply the judge.

The method was popularised by a 2023 paper by Zheng and colleagues. They showed that strong judge models agree with human preferences over 80% of the time, the same level at which humans agree with each other. Today most benchmarks rely on a judge model. So does ReviewBench, which GitHub published for code review: it has a language model grade findings with a single rubric, and writes that it had senior engineers relabel its judgments and measured 96.6% agreement.

A judge model isn’t the first choice. Anthropic’s evaluation documentation gives the order plainly: grade with code first, because that is the fastest and most reliable way; then use a judge model for judgments that can’t be written as a rule; and test the judge’s reliability before you scale it up.

Three grading methods: their speed, their reliability and when to use each
MethodStrengthWeaknessWhen
Grading with codeFastest, most reliable, scales without limitCan’t make a judgment that a rule can’t expressWhen an exact match or a text search can check the answer
Human gradingMost flexible, highest qualitySlow and expensiveOn a small sample, to audit the judge
Judge modelFast, flexible, scalableHas biases; test it firstWhen judgment is needed and no rule can check the answer

Source: Anthropic’s evaluation documentation, 18 October 2026.

Judge models have known biases

The same paper also lists the limits of judge models: position bias, verbosity bias, self-enhancement bias and limited reasoning. When you set up a judge, take a precaution against each one.

The four limits of a judge model. When you set up a judge, there is a precaution for each one. Position bias: Leans towards the answer shown first. Verbosity bias: Rates a longer answer as better. Self-enhancement bias: Gives its own output a higher score. Limited reasoning: Errs on a question it can’t answer itself.
Four known limits of judge models. Source: Zheng and colleagues, 2023.

Self-enhancement bias is the easiest to prevent: the model that evaluates should be different from the model that produced the output. Anthropic’s example code notes this as good practice. Position bias shows up in questions that compare two answers; swap the order of the answers and ask twice, and its effect becomes visible. The most effective guard against verbosity bias is to ask the judge not for a score but for an answer that rests on a single fact.

Ask the judge whether two things match, not whether one is good

The question decides most of how reliable a judge is. “Is this review comment good? Score it from 1 to 10” has no right answer; two judges, or even two runs of the same judge, give different scores. Anthropic’s advice points the same way: have the judge say only “correct” or “incorrect”, or pick a level from 1 to 5, because purely qualitative evaluations are hard to assess quickly and at scale.

Not “is it good?” but “is it the same?”. A question that scores. “Good comment? Score it 1–10.”. No right answer; two runs give two different scores. A question that compares. “Do both describe the same bug?”. The answer is yes or no; a second judge can check it.
The same evaluation as two different questions.

Our judge’s question is a comparison. It is given a review comment and a known bug in the same pull request, and asked one thing. The core of the rubric looks like this:

You are given a review comment and a known bug in the same pull request.

Do they describe the SAME defect: the same code, failing for the same reason?
- A comment about the same file but a different problem is NOT a match.
- A comment that names the symptom while the known bug names its cause IS a match.
- If the comment is too vague to tell, answer no.

Answer with one word: yes or no.

The three lines in the rubric settle in advance the cases where a judge most often hesitates: the same file but a different problem, a symptom against a cause, a vague comment. When those lines aren’t written, two judges split on exactly these cases.

Why overall agreement between two judges is misleading

The first step in testing a judge is to ask a second judge about the same pairs. We used two different models as judges with the same rubric, and they agreed on 98.8% of 945 shared pairs. On its own, that number is reassuring, and it is misleading.

Most pairs are an obvious “no”: the comment is about one file, the known bug about a completely different one. Two judges agree on those anyway. What decides the result is the pairs where at least one judge said “yes”, and there they agreed 93.5% of the time. When you report how reliable a judge is, name the denominator: all pairs, or the positive pairs.

How we audited a cheap judge with a strong one, group by group

We run our day-to-day measurements with a cheap judge. To answer “what if this judge gets it wrong?”, we didn’t need to replace the judge outright, which would have meant a full matrix of 4,185 pairs. Instead, we asked a stronger model, at a high effort setting, about just 891 pairs, and we chose the pairs not at random but from the groups that would answer the question.

The share of verdicts the strong judge overturned. The bars are proportional to the percentage. Both said “yes” (91 pairs): 0 / 91 overturned; Both said “no” (400 pairs): 1 / 400 overturned; “Yes” counted in the score (400 pairs): 24 / 400 overturned.
Pairs where the strong judge overturned the cheap judge’s verdict, by group. August 2026; for the yeses counted in the score, the 95% confidence interval is 4.1%–8.8%.
  • 91 pairs where both judges said “yes”: the strong judge overturned none of them. A match both judges agreed on stayed a match with a more expensive judge too.
  • 400 pairs where both judges said “no”: only 1 was overturned (upper bound 1.4%). The judge does not miss matches.
  • 400 of the “yes” pairs counted in the score: 24 were rejected, which is 6.0%. The cheap judge is generous in counting matches.

The result is two separate statements, and they shouldn’t be mixed up. Absolute scores are about 0.02–0.03 optimistic. Changing the judge didn’t move a configuration’s score by more than 0.033, which is below the measurement’s noise floor (0.09). But we measured this on a single configuration, so we don’t claim that the ranking of two configurations will hold in every case. Whether a judge’s flaw matters depends on what you do with the judge.

Rerunning moves the score more than changing the judge

When we rescored the same configuration with three different judges, the largest shift in F1 was 0.033. When we reran the same configuration, on the same pull requests and with the same judge, the run-to-run standard deviation came out at 0.094. Once, with nothing changed, we saw a difference of 0.058 between two runs.

So the real uncertainty in the measurement comes not from the judge but from the system’s own randomness. The rule that follows is simple: if two configurations differ by less than about 0.09, a single run can’t show the difference, and buying a better judge won’t change that.

A finding the judge can’t match isn’t necessarily wrong

In most benchmarks, a judge model compares a finding with a reference: the bugs marked in advance. A finding that isn’t in the reference counts as a “false alarm”. But that only tells you one thing: whoever prepared the reference didn’t write that point down. The finding may still be right.

That is why ReviewBench publishes two families of metrics: one uses only the existing labels, the other also evaluates findings that have no match in the golden set. Make the same distinction in your own measurements. “Doesn’t match the reference” and “wrong” are two different labels, and to say the second, you have to look at the finding itself.

Store every verdict, and test rule changes without a judge

A judge call costs money, and there is no point asking the same question about the same pair twice. Store every verdict together with the pair and the judge’s identity: the model, the effort setting, the version of the rubric. When one of them changes, don’t show the old verdicts and the new ones in the same table; two numbers measured with two different judges can’t be compared.

Not every change needs a judge, either. When you change a threshold or a filter, you can replay the old and the new rule over results you have already stored, and look only where they disagree. That is how we measured a gate change: across 1,405 stored findings, the old and new rules disagreed in only 6 places, and reading those six by eye was enough. A new run would have been neither free nor this exact.

Six habits for working with a judge. The aim is to measure the system, not the judge. Ask a question that compares: One question, yes or no. Write the edge cases into the rubric: That is exactly where judges split. Look at agreement on positive pairs: Easy examples inflate overall agreement. Audit a sample with a strong judge: Split it into groups; give a confidence interval. Don’t trust a single run: Runs differ more than judges do. Store every verdict with its identity: Don’t mix two judges in one table.
Six habits we keep when we work with a judge.

These lessons came from diffox’s own measurements: we don’t decide whether a change works on the strength of a single run and a judge nobody has audited. In the product itself, the quote a finding rests on is checked by code, not by a judge model (see the architecture post).

Frequently asked questions

What is LLM-as-a-judge?

It is a way of having another language model grade an AI output, given an instruction (a rubric). It is used where the answer can’t be compared with a single right text, for example to decide whether two comments describe the same bug.

Is LLM-as-a-judge reliable?

It depends on the question. A 2023 study showed that strong judge models agree with human preferences over 80% of the time. On comparison questions (“are these two the same?”) judges are consistent; on open-ended questions where they give a score, they are not. Before you trust a judge, test it on a small sample against a second judge or against human labels.

How do you write a rubric for LLM-as-a-judge?

Boil it down to a single question and constrain the answer: “yes” or “no”, or a level from 1 to 5. Write into the rubric the edge cases where the judge would hesitate: which case counts as a match, which doesn’t, and what to answer when it is unclear. Anthropic’s documentation also recommends having the judge reason before it answers.

What are the metrics for LLM-as-a-judge, and which should you look at?

For the judge itself: its agreement rate with human labels or with a second judge, especially its agreement on positive examples; and the rate at which a strong judge overturns its verdicts, with a confidence interval. Overall agreement looks higher than it really is because of the easy negative examples.

Can the judge model be the same as the model being evaluated?

Better not. A judge model giving its own output a higher score is a known bias. Anthropic’s example code notes it as good practice for the model that evaluates to be different from the model that produced the output.

What is the difference between LLM-as-a-judge and agent-as-a-judge?

LLM-as-a-judge evaluates only the final output. Agent-as-a-judge is an extension proposed in a 2024 paper: an agent that can use tools does the evaluation, and it also gives feedback on the intermediate steps of the work. It was designed for evaluating multi-step agent systems.

Does diffox use a judge model in its reviews?

During development, yes: to match findings against bugs marked in advance and measure whether a change works. When a pull request is being reviewed, though, the quote a finding rests on is checked by code, not by a judge model: is the quote really in the file, and does it belong to the changed lines?