Everyone building an AI product gets the same advice: you can't review every output by hand, so use LLM-as-a-judge to evaluate at scale. The advice is right. What's missing is the warning that should come with it: the judge is itself an AI product, and it can be just as wrong as the product it's grading.
In practice, teams set up their judge in one of two ways.
Path A. The template. Open your eval tool's library, pick a "correctness" or "helpfulness" or "hallucination" judge, point it at your outputs, and trust whatever number lands on the dashboard.
Path B. The imagined rubric. Paste outputs into a model with "evaluate the quality of these answers", without ever having defined what quality means for your product. Some teams dress this up a little: a sentiment check, or a judge scoring every answer on five criteria rolled into one composite metric. The criteria come from what they imagine the AI might get wrong, not from what it actually gets wrong.
Both paths share the same flaw: nobody ever checked whether the judge agrees with a human expert.
Thesis
A judge you haven't validated against human labels isn't a judge. It's an expensive random number generator.
We measured what that costs on a real AI product: an inbound lead-qualification agent for B2B software companies. It reads a company's product context, researches each inbound lead, and assigns a priority tier. We built a judge for its most damaging error and tested it against 7 off-the-shelf judge templates from three vendors, each on 10 models, using 34 real answers a human expert had labeled. Every generic judge landed at 52–58% agreement with the expert on average across the 10 models. Half of those 34 answers were correct, so a coin flip would score 50%. Only the judge built from the expert's annotations beat that line, and it took visible, measurable iteration to get there.
We'll use this agent as the practical example for every step of this guide, so nothing stays abstract.
This guide is the exact process for building one you can trust: the steps, the real judge prompt, the real dataset, and the real numbers at every stage.
The framework: six steps from real outputs to a judge you can trust
•Annotate 30–50 real AI outputs. An expert reads them and writes down where the AI failed and how.
•Run error analysis. Cluster annotations into mutually exclusive error categories; find the persistent, judgment-requiring failures.
•Scope the judge to one error. One judge, one failure mode.
•Build a validation dataset. Real outputs, hand-labeled pass/fail, with both correct and incorrect answers.
•Write the judge prompt from your annotations, then run it across 10+ models.
•Measure agreement, false positives, false negatives against your human labels, plus the judge's consistency with itself.
Step 1. Annotate real AI outputs (30 to 50 of them)
Before any judge exists, a human expert has to read actual answers from your AI product. Not skim, read, and leave specific written feedback on each one: where the AI failed, and how. The person doing this needs to know both the product and the domain, because they're the standard the judge will later be measured against.
Written reasons matter more than scores here. "Fail" tells you nothing six weeks later. "The agent disqualified a perfect-fit lead because it ignored the qualifying signals in the company research" is an annotation you can build on.
Where the outputs come from depends on where you are:
•Your AI is in production → start from production traces and real conversations. This is the highest-signal data you will ever get.
•Your AI is still an idea → run experiments on synthetic inputs, generate a handful of answers, and annotate those. Simulated inputs, real annotation discipline.
Thirty to fifty is the working range: enough for failure patterns to repeat, small enough that a domain expert will actually do it.
In the example: every human label carried a written justification, not just pass/fail. That single habit paid off twice: first for building the judge, and later for auditing whether the judge's reasoning matched the human's (the audit in the iteration loop below).
Step 2. Run error analysis and find the high-leverage failure patterns
With 30–50 annotations in hand, cluster them into mutually exclusive error categories, groupings that generalize how your AI fails. "Wrong priority assigned." "Fabricated company details." "Ignored the user's stated constraint."
These categories are your improvement backlog. You'll eliminate many of them by fixing the prompt, the context, or the orchestration. The judge candidates are the categories that pass two filters at once:
•Persistent. The error survives multiple improvement iterations. You reduce it; you never fully eliminate it.
•Judgment-requiring. No rule-based check can detect it. Deciding whether it happened takes weighing evidence, not matching a pattern.
And the anti-pattern worth naming plainly: never build an LLM judge for anything code can check. Valid JSON, output structure, required fields, format compliance, design-system adherence, those are deterministic checks. They're free, instant, and right every time. An LLM judge for rule-checkable things means paying coin-flip risk for something a regex does for free.
In the example: wrong-tier assignment passed both filters. It persisted across agent iterations, and "did this lead deserve Tier 1?" takes real judgment (ICP match, buyer persona, company research, qualifying signals).
Step 3. Scope the judge to one error
The judge's entire job is to look for the one failure you've seen repeatedly in real outputs. That's it.
This is where the contrast with the two default paths becomes concrete. The template judges someone else's generic dimension: "helpfulness" as some vendor defined it, for no product in particular. The imagined rubric judges everything at once, which in practice means nothing gets judged well. A purpose-built judge asks one question your error analysis proved matters.
In the example: we tested the middle ground too, and it isolates exactly what scoping buys you. We took a vendor's generic judge scaffold and changed only the question ("assess whether the agent correctly classifies the lead's priority"). Just pointing the judge at the right thing lifted agreement from ~52% to ~56% on average. Encoding the full domain rules (Step 5) took it to 67–69%. Asking the right question is worth about 4 points. Encoding what your annotations taught you is worth the rest.
Step 4. Build a validation dataset with human golden labels
Now build the dataset your judge will be tested against: real outputs from your product, manually marked pass or fail for this one failure mode only. An output can be flawed in other ways and still be a "pass" here, you're labeling one error, not overall quality.
Two rules make this dataset honest:
•Include both correct and incorrect answers. You're measuring two things: whether the judge catches real errors, and whether it recognizes a good answer when it sees one. A set with only failures can't show you false alarms, and a set with only good answers can't show you missed errors. The split doesn't need to be 50/50, as long as each side has enough cases to measure.
•Include the traps you found during annotation: the edge cases where your AI failed in sneaky ways. If the judge can't catch those, it can't do the job.
In the example: 34 real outputs from the lead-qualification agent, hand-labeled: 17 correct and 17 with a wrong tier. The traps were in there: an inbound "lead" who was actually an internal employee at the seller's own domain (the agent had confidently marked the contact Tier 1), and a contact from an existing customer, which the product context says must always be top priority.
Step 5. Write the judge prompt from your annotations, then run it across many models
The prompt has a skeleton: Role, Scoring, Rules, What-counts-as-wrong, Severity, Output format, and we show the real one in full in the next section. What makes it work isn't the structure. Every rule and every failure pattern in it comes from your Step 1 annotations, in the annotator's own words. You're not writing an eval prompt; you're transcribing what your expert already knows into instructions a model can follow.
Then comes the step almost everyone skips: a judge is a prompt × model pair. The same prompt behaves like a different judge on a different model. So run yours across 10+ models (different vendors, different generations, frontier and mini) and let the measurements pick, not habit, price, or benchmark reputation.
In the example: we ran every judge across 10 models: gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-4.1, gemini-3.5-flash, gemini-3-flash-preview, DeepSeek-V3.2, claude-opus-4-8, claude-sonnet-5, and claude-haiku-4-5. Same prompt, very different judges. On gpt-4.1 the judge leaned toward passing: it caught only 47% of real errors while passing 94% of good answers. On gpt-5.4-nano it went the other way, catching 88% of errors but flagging 47% of good answers. On gpt-5.4-mini it fell to 50% agreement. Price didn't line up with quality either: one of the two best pairings, on gemini-3-flash, cost about $0.002 per verdict, while the most expensive model in the lineup (DeepSeek V3.2, about $0.03) scored 6 points lower. That's what happened for this judge on this data. Your judge needs its own run. Which model should you run your LLM judge on? goes deeper on this step.
Step 6. Measure three metrics against the human labels
Run the judge on your validation dataset and score it like the AI product it is:
•Agreement rate. The share of cases where the judge matches the human label.
•False positive rate. The share of good answers the judge wrongly flags. This is the "trigger-happy" failure. It burns trust fast: after the third phantom bug, your team stops reading the judge's output.
•False negative rate. The share of real errors the judge misses. This is the "rubber stamp" failure, and it's worse, because it's silent. Everything looks green while real errors sail through.
You need all three. Agreement alone hides which personality your judge has: a rubber stamp and a trigger-happy judge can post the same agreement number for opposite reasons.
Agreement also depends on the mix in your dataset. If 80% of your answers are correct, a judge that passes everything scores 80% while catching nothing. The false negative rate shows that straight away, which is why you track the three numbers together.
There's a fourth check worth adding: the judge's agreement with itself. Run the same judge on the same cases more than once and count how many verdicts change. In the example, the same judge prompt changed none of its 34 verdicts on one model and 10 of 34 on another. A judge that can't agree with itself can't agree with you. Do LLM judges give the same verdict twice? shows how to test it.
In the example: this is where the generic judges' personalities showed up. The helpfulness-style templates rubber-stamped, missing 77–89% of real errors on average. The correctness and hallucination templates were trigger-happy, false-flagging 53–69% of good answers on average. Both families averaged 52–58% agreement and the pattern held identically across all three template vendors. The problem is the generic prompt itself, not any one vendor's version of it.
The real judge, in full
Six steps produce a real artifact. This is the actual judge from the example (the one that beat the coin-flip line) shown as its working skeleton. Steal the structure.
The product it judges: an inbound lead-qualification agent. It receives a B2B company's product context (product description, ICP, buyer personas, qualifying and disqualifying signals, existing customers) plus an inbound lead's contact details, researches the person and the company, and assigns a priority tier, from Tier 1 (immediate outreach) down to Tier 4 (disqualify). Error analysis had surfaced its most damaging recurring error: assigning the wrong priority tier. So the judge checks exactly that, and nothing else.
You are an evaluation judge for a B2B lead-qualification AI agent.
Your task is to assess ONE thing: whether the agent assigned the
correct priority tier to the inbound lead.
[Describes the agent, its inputs, and the four tiers.]
# Scoring
- Score 1 (PASS): the agent assigned the correct priority tier.
- Score 0 (FAIL): the tier is wrong — higher OR lower than the
lead deserves.
# Rules for a correct tier
1. Target industry match — company's industry correctly matched
against the ICP
2. Company size — correctly identified and matched against the ICP
3. Buyer persona — the person correctly identified and matched
against the buyer personas
4. Pain points from the lead's message — extracted and matched to
what the product solves
5. Pain points from company research — inferred needs matched to
the product
6. Qualifying signals — signals from research matched against the
context file
7. Existing customer → always Tier 1
8. Internal contact (seller's own domain or company) → always
Tier 4, and the agent must name it as internal
# What counts as a wrong assignment
- A strong-match lead marked lower than Tier 1
- A contact who isn't the buyer persona at a company that IS the
target ICP, disqualified
- An unresearched lead assigned a random tier
[...more patterns, each from an annotated real failure]
# Severity
The bigger error is assigning a LOWER priority to a high-value
lead than a higher priority to a weak one — a missed Tier 1 costs
more than a wasted meeting.
# Output format
{"score": 0 or 1, "justification": "..."}
Every rule and every "what counts as wrong" pattern in this prompt came from annotating real agent outputs. None of it was invented at a whiteboard. Rule 8 exists because a real internal employee got marked Tier 1. The severity asymmetry exists because the annotator kept writing the same note: missing a great lead hurts more than taking a mediocre meeting. That sequence: annotation first, prompt second, is the entire difference between this judge and a template.
The iteration loop: where the judge earns your trust
No judge is good out of the box. Not one of the 80 judge × model combinations we tested started trustworthy, including ours. The first version of the purpose-built judge scored 65%. What separates a judge you can trust from a template isn't the first run; it's what you do after it.
Read the justifications where the judge disagreed with the human, and annotate the judge
For every case where the judge's score disagreed with the human label, read the judge's written justification and write down why its reasoning is wrong. This is the same error-analysis discipline from Step 1, now pointed at the judge. The judge is an AI product; treat it like one.
This is also where you catch the trust-killer that agreement scores hide: right score, wrong reason. A judge can land the correct verdict while reasoning about something irrelevant and a score that's right by accident will be wrong on the cases that matter.
The numbers from the example are sharpest here. Of the errors the generic judges "caught," their justifications cited the reason the human graded only 0–31% of the time. They flagged a stray future-looking date, or stamped "hallucination" on messy research, while the actual tier mistake went unmentioned. The purpose-built judge cited the human's reason in ~100% of its catches. On score alone the judges sat ~10 points apart; on reasoning, they weren't doing the same job. And you can only run this audit because your golden labels carry written reasons, which is why Step 1 insisted on them.
Some judges went further and invented errors. Judges on many models read "~15–50 employees" in an agent's output and flagged it as a fabricated claim of "1,550 employees": 46 judge outputs did this in the first run and 41 in the second, on input the judges received correctly. The hallucination judges were the worst offenders.
Turn the judge's failures into sharper instructions
Each annotated judge failure becomes a clarification, a rule, or an example, written in the actual case's own terms:
•"An internal employee is always Tier 4, it's not a lead at all."
•"A competitor is Tier 4."
•"A fictitious contact (a bot, not a real person) is Tier 4."
•"A contact from an existing customer is always Tier 1."
•"The bigger error is deprioritizing a high-value lead, not over-prioritizing a weak one."
Then re-run, re-measure the three metrics, and repeat. The loop is measurable, and that's what makes it work. In the example: generic template 52% → right question 56% → full annotated rubric 67–69% (all three averages across 10 models) → best model pairing 76.5%, with each version's gains traceable to the specific rules added. One operational lesson from the loop: re-check self-consistency after every prompt change, because consistency depends on the prompt and the model together.
When to start trusting it
The bar: ~90% agreement on your validation set. Then extend the test to fresh cases the judge has never seen and confirm the number holds, a judge can overfit its validation set exactly the way a model overfits training data. Only after it validates on a wide enough, unseen-case-tested dataset does it earn access to production data. And even then, keep spot-checking its disagreements and feeding them back into the loop.
For honesty's sake: the example's purpose-built judge reached 68.8% average agreement and 76.5% on its best model pairing across repeated runs, climbing with every iteration, and not done. That gap is the work. Knowing your judge's real number, and watching it move, is the entire difference between measuring quality and hallucinating it.
The three mistakes that produce judges you can't trust
Mistake 1. Using a generic judge template
Seven templates, three vendors, one result: 52–58% agreement with the human expert on average. Each one failed in its own hidden way, rubber stamp or trigger-happy, and when they did land a right score, it was for the wrong reason in 69–100% of their catches. Langfuse vs PostHog vs openevals breaks this down template by template.
The imagined-rubric prompt ("evaluate the quality of these answers," with quality never defined) is the same mistake without even the template's structure.
Mistake 2. Skipping validation against human labels
Without golden labels, your judge's agreement rate, false positive rate, and false negative rate are unknowable. You're trusting a number that has never itself been measured.
The dashboards look identical either way. A rubber-stamp judge shows green across the board while real errors ship. A trigger-happy judge keeps your team firefighting phantom bugs until they tune the judge out. Both feel like signal from the inside.
Mistake 3. Picking your judge model up front
A judge is a prompt × model pair, and the model changes the judge's personality as much as the prompt does. In the example, the same prompt missed 71% of errors on one model (gemini-3.5-flash) and false-flagged 71% of good answers on another (gpt-5.4-mini), where it fell to a coin flip.
Consistency depends on the pairing too: the same judge prompt changed none of its 34 verdicts on one model and 10 of 34 on another between identical runs.
Neither price nor brand predicted any of this. The only way to pick a judge model is to measure agreement across candidates on your own validation set, which costs cents, not engineering weeks.
FAQ
How accurate are LLM judges out of the box?
In our example, off-the-shelf judge templates from three vendors agreed with the human expert 52–58% of the time on average, close to the 50% a coin flip would score on that dataset. A purpose-built judge started at ~65% on average and reached 68.8% on average, 76.5% on its best model, through iteration.
How many test cases do I need to validate an LLM judge?
30–50 real outputs from your product, human-labeled, with both correct and incorrect answers. You need both to measure the two things that matter: how many real errors the judge catches, and how many good answers it passes. The split doesn't have to be even.
What metrics should I use to evaluate an LLM judge?
Agreement rate against human labels, false positive rate (good answers wrongly flagged), and false negative rate (real errors missed). All three, because agreement alone can't tell a rubber stamp from a trigger-happy judge. Add a self-consistency check: the same judge on the same cases, run twice.
Which model is best for LLM-as-a-judge?
There's no universal answer, because a judge is a prompt × model pair. In our example the same prompt ranged from 50% to 76.5% agreement depending on the model, and cost didn't line up with quality. Run your prompt across 10–15 models on your own data and let measured agreement decide.
What temperature should an LLM judge use?
A low temperature can help, but it doesn't guarantee a consistent judge. In our example, one model running at temperature 0 still changed 4 of its 34 verdicts between two identical runs. Measure your judge's self-consistency rather than assuming it.
When should I use a code metric instead of an LLM judge?
Whenever the check is rule-based: valid JSON, output structure, required fields, format compliance. Code checks are deterministic, free, and right every time. Reserve LLM judges for failures that need judgment.
Can I trust a judge with a high agreement score?
Only if it's right for the right reasons. In our example, generic judges cited the human's actual reason in just 0–31% of their catches, versus ~100% for the purpose-built judge: nearly identical scores, completely different jobs. Audit the justifications, not just the scores.
Is one LLM judge enough for my whole AI product?
It depends on your AI's failure taxonomy. If you have a single judgement based failure check, then one judge for it is enough, while the other attributes of quality can be checked deterministically. One judge per failure mode. A judge scoped to everything measures nothing: that's the imagined-rubric mistake with extra steps.
Where this leaves you
The process, in one paragraph: annotate 30–50 real outputs with written reasons → run error analysis and find the persistent, judgment-requiring failure → build one judge for that one error → assemble a golden dataset from your labeled outputs, with both correct and incorrect answers → write the prompt from your annotations and run it across 10–15 models → measure agreement, false positives, false negatives, and self-consistency → iterate on the justifications until you clear ~90% → confirm on unseen cases → then, and only then, point it at production.
Every step of this loop works on any stack: a spreadsheet and API keys will get you there. It's also, not by coincidence, exactly what Lovelaice productizes: annotation and error analysis, judge validation datasets built from your reviewed answers, agreement/FP/FN computed automatically against your labels, and one prompt run across 400+ models side by side without managing a single API key. The example in this guide ran on it.
If you'd like help setting up or validating your LLM judge, talk to us.
Frequently asked questions
What is LLM-as-a-judge?
LLM-as-a-judge is an evaluation method in which a large language model checks the output of another AI system against defined criteria and returns a score with a justification. It lets teams evaluate AI outputs at scale, provided the judge has been validated against human labels.
How accurate are LLM judges out of the box?
In our benchmark, off-the-shelf judge templates from three vendors agreed with human expert labels 52 to 58% of the time on a balanced dataset, statistically indistinguishable from a coin flip. A purpose-built judge started at about 65% and reached 68 to 76% through iteration. In a second project, a purpose-built judge reached 93%.
How many test cases do I need to validate an LLM judge?
30 to 50 real outputs from your product, human-labeled and balanced roughly 50/50 between pass and fail. The balance keeps the metrics honest: a judge that passes or fails everything scores exactly 50% and exposes itself immediately.
What metrics should I use to evaluate an LLM judge?
Agreement rate against human labels, false positive rate (good answers wrongly flagged) and false negative rate (real errors missed). Use all three, because agreement alone cannot distinguish a rubber stamp from a trigger-happy judge. Add a self-consistency check by running the same judge on the same cases twice.
Should an LLM judge use a 1 to 5 scale or a binary score?
A binary score. With a scale, nobody can tell whether a judge's 4 and a human's 3 count as agreement. With 0 or 1, the judge either matches the human or it does not, so agreement becomes measurable and the judge can be improved.
Which model is best for LLM-as-a-judge?
There is no universal answer, because a judge is a prompt and model pair. In our benchmark the same prompt ranged from about 50% to about 76% agreement depending on the model, cost did not predict quality, and small mini models collapsed on long rubrics. Run your prompt across 10 to 15 models and let measured agreement decide.
What temperature should an LLM judge use?
Temperature 0, and aggregate several runs if you can. Even at temperature 0, some models flipped up to 17% of their verdicts between identical runs while the steadiest stayed under 1%, so measure your judge's self-consistency instead of assuming it.
When should I use a code metric instead of an LLM judge?
Whenever the check is rule-based: valid JSON, output structure, required fields, format compliance. Code checks are deterministic, free and always right. Reserve LLM judges for failures that need judgment.
Can I trust a judge with a high agreement score?
Only if it is right for the right reasons. In our benchmark, generic judges cited the human's actual reason in just 0 to 31% of their catches, compared with about 100% for the purpose-built judge. Audit the justifications as well as the scores.
Is one LLM judge enough for my whole AI product?
That depends on your failure taxonomy. If you have one failure that needs judgment, one judge for it is enough, and other quality attributes can be checked deterministically. Build one judge per failure mode. A judge scoped to everything measures nothing.
Enjoyed reading? Add us as a preferred source in Google to support us.
Define what good looks like for your AI feature, measure it on real data, and improve it with your domain experts in the loop, no code required. Teams have gone from 52% to 88% accuracy in under three weeks.