Kolkata ·  
AI engineering
evals
deep · 7 min

LLM-as-judge

A model grading another model's output, checked against human labels before you trust it.

updated 29 Sept 2026

We've been reading conversations from a support assistant for an online shop (that's error analysis), and one failure keeps coming up. A user asks about their bill, and the assistant asks for their account number and full name before checking who they are.

We want to count how often that happens, on every change. Can a code check do it? Not really. The wording changes every time, and whether it's a failure depends on what happened earlier in the conversation. Having a person read every conversation (human review) works, but it won't keep up.

So we try the obvious thing: ask another model.

Build one

A judge is just a second prompt, run as a second model call:

You are reviewing a support conversation for one failure:
asking for sensitive account details before the user's identity
is verified through the secure login flow.

<examples>
  ...three or four past conversations, each with an expert's
  critique and a verdict of pass or fail...
</examples>

<conversation>{conversation}</conversation>

First write a short critique explaining your reasoning.
Then give a verdict: pass or fail.

Run it over our eval set and we get a pass rate for that one failure. A few choices in there are on purpose.

It checks one failure. A judge for one specific thing is easier to write, test and fix than one that scores "overall quality". Found five kinds of failure? Build five small judges, and only for the ones code can't check.

The examples are real conversations graded by whoever knows the domain best, each with a written reason. They show the judge where the line is, the same way few-shot examples teach any task.

It writes the critique before the verdict. That's chain of thought applied to grading: a verdict written first can't use reasoning that comes after it.

And it says pass or fail, not 3 out of 5. People disagree on this one. Scales feel more precise, but nobody can say what separates a 3 from a 4, and nobody knows what to do with a dashboard full of 3.4s. If you do use a scale, put a pass line on it so you can act.

Which question to ask it

Our judge looks at one output alone. That fits anything you'd write as a rule: did it ask for data too early, is the answer faithful to the source. It also works on live traffic, since there's nothing to compare against.

The other common shape is pairwise: show two answers to the same input, say from the old prompt and the new one, and ask which is better. That's the way to compare versions on things with no fixed bar, like tone. But it only tells you which is better. The better of two answers can still be a failure.

And sometimes it helps to hand the judge a known-good reference answer. In the paper that named this idea in 2023, GPT-4 grading answers to 10 math questions was wrong 14 times out of 20 with a plain prompt, and 3 times when given a reference. The wrong answers it was grading had talked it out of answers it could work out alone.

A rough rule: objective things (faithful, broke a policy, followed the instruction) get graded one output at a time; subjective things like tone get compared in pairs.

Now, can we believe it?

Here's where most of the work is. A judge is a classifier we built with a prompt, so it makes a classifier's two mistakes: it misses real failures, and it flags good outputs. The only way to know how often is to compare it with a person's labels, on outputs the person graded without seeing the judge's verdict.

The method practitioners use looks a lot like training any model. Get about 100 labelled examples per failure from one domain expert, pass or fail with a critique, with enough of each. (Under about 60 and the numbers are too shaky to mean much.) Split them. A small slice, 10 to 20%, supplies the examples in the judge's prompt. About half the rest is a dev set: run the judge, read every disagreement, fix the prompt, run again. The rest is a test set you don't touch until the prompt is final. Why the last one? After enough rounds of fixing, the judge can get tuned to the dev examples even if none of them is in its prompt.

Then report two numbers, not one. Of the real failures, how many did the judge catch? Of the good outputs, how many did it pass?

See the trap on the left? When failures are rare, a judge that never flags anything still scores high on plain agreement. Which of the two rates matters more is a product call. Missing a bad medical answer costs more than a false alarm. But when failures are rare, even a few percent of false alarms can bury a reviewer in flags.

Does it take forever? Not usually. One team got their judge above 90% agreement with their expert in three rounds (on a set that was about half failures, so plain agreement was fine there).

The expert changes too

Something odd happens during those rounds. Reading the judge's critiques, the expert often notices they've been grading some edge cases inconsistently themselves. Nobody can fully write down "good" before they start grading, because grading is how they find out. So treat the first rubric as a draft, and rerun the comparison whenever something real changes, like a new model behind your feature or behind the judge.

And the process matters more than the judge you end up with. Building one makes someone look carefully at a hundred outputs, and that's where the bugs worth fixing first turn up.

How well do judges agree with people, in general?

You'll see a famous number: in 2023, GPT-4 comparing pairs of chat answers agreed with human experts 85% of the time, while experts agreed with each other 81%. But that agreement climbed from about 70% to nearly 100% as the gap between the two models grew. Judges are best on obvious differences and worst on close calls, which are often the ones we care about.

Outside chat answers, it's less rosy. Judges do fine on "did it follow the instructions?" and worst on toxicity and safety, sometimes below chance. Asking the judge to reason first doesn't reliably fix that. And on summaries, a judge can pass over 95% of the good ones while catching only 30 to 60% of the ones with factual errors. That's the always-pass problem from earlier.

There's a twist about which humans, too. Judges agreed more with non-expert labels than with expert ones. The authors' guess is that models and non-experts both lean on surface features. One more reason to check against your expert. And keep the labelling blind: when people who disagreed with GPT-4 were shown its reasoning, they changed their answer about a third of the time.

So a published number won't carry over to your task. Your own two rates will.

When not to use one

For code, run it; that beats asking a model whether it looks right. For a high-volume check in production that has to be fast, a small trained classifier can be more accurate and cheaper. Judges fit best in development, where we grade a few hundred outputs and can afford the most capable model the budget allows. Ready-made "helpfulness" judges from eval libraries weren't built around your failures, so check them the same way.

Our judge for early account questions, once it holds up on the test set, can also run on a sample of live traffic. That's online evals. Before trusting it there, though, it's worth testing it for the ways judges get swayed by things that have nothing to do with quality, like which answer came first or which one is longer. That's judge bias, and it's next.

Further reading