Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 5 min read

How do you build an LLM-as-judge you can trust?

An LLM-as-judge is a language model that grades the output of another AI system against a rubric. You can trust it only after you compare its grades with labels from a domain expert on real examples. Use one expert, bina

An LLM-as-judge is a language model that grades the output of another AI system against a rubric. You can trust it only after you compare its grades with labels from a domain expert on real examples. Use one expert, binary pass or fail labels, one judge per failure type, and a re-check whenever the system changes.

What is an LLM-as-judge and when does it work?

A judge model reads an output, applies your criteria, and returns a grade. The idea became common after a 2023 study of strong models as judges, which reports "over 80% agreement" with human raters (Zheng et al., 2023-06). That result comes from general chat benchmarks. It does not show how a judge will score your task.

Another research group warns that LLM-generated evaluators "simply inherit all the problems" of the models they evaluate, so they need human validation (Shankar et al., 2024-04). Anthropic's engineering team says the same for agents: judge graders "should be closely calibrated with human experts" (Anthropic, 2026-01).

Use a judge when the failure needs human judgment, such as tone or helpfulness. Use code checks for objective rules (Husain and Shankar, 2026-09). For tool options, see which LLM eval tools practitioners use and where they fall short.

What biases should you expect from a judge?

Published tests show three repeatable biases. Eugene Yan's review of the research summarizes them in the table below.

Bias What it means Reported finding
Position The judge prefers an answer because of where it appears claude-v1 was biased 70% of the time (Yan, 2024-08)
Verbosity The judge prefers longer answers Longer answers were preferred more than 90% of the time by two of the models tested (Yan, 2024-08)
Self-preference The judge prefers text its own model wrote GPT-4 favored itself with a 10% higher win rate (Yan, 2024-08)

These figures come from older models and specific test setups. Treat them as a reason to test your own judge, not as current rates. Do not assume a newer model is free of them.

How should you design the grading scale?

Pick binary labels first. Hamel Husain's guide says to use "No complex scoring scales or multiple metrics" and make a clear pass or fail decision (Husain, 2024-10). Eugene Yan also prefers binary outputs where possible (Yan, 2024-08).

For subjective traits such as tone, Yan reports that pairwise comparison tends to give "more stable results" than direct scoring (Yan, 2024-08). If you use a pairwise judge, test it with the answer order swapped. For when to use it, see when to compare two AI agent versions side by side instead of scoring one output.

Build one judge per failure type. The evals FAQ calls the most common mistake directing one judge to catch "too many different kinds of errors" at once (Husain and Shankar, 2026-09). Anthropic gives the same advice and adds that the judge should have a way out, such as an "Unknown" answer (Anthropic, 2026-01).

How do you build and calibrate a judge, step by step?

  1. Name one principal domain expert. The evals FAQ advises starting with a "benevolent dictator" and adding people only when needed (Husain and Shankar, 2026-09).
  2. Have the expert review real outputs and find failure modes. Husain starts with "around 30 examples" and continues until no new failure modes appear (Husain, 2024-10).
  3. Have the expert label each output pass or fail and write a short critique that explains the reason.
  4. Write a rubric for one failure type. Anthropic warns that "vague rubrics produce" inconsistent judgments (Anthropic, 2026-01). Put the expert's critiques in the prompt as examples.
  5. Run the judge on labeled examples it has not seen. Treat the expert labels as truth and report the true positive rate and true negative rate separately (Husain, 2024-10).
  6. Read the disagreements by hand before you change the prompt. The evals FAQ advises inspecting a few before automated tuning (Husain and Shankar, 2026-09).
  7. Repeat until the judge is good enough for your risk. Husain reports one case that took "three iterations" to pass 90% agreement with the expert (Husain, 2024-10). That is one reported case, not a target for your task.

Expect your criteria to move. Researchers who studied this call it criteria drift: people define criteria better by grading outputs, and grading changes the criteria (Shankar et al., 2024-04). Plan to revise the rubric and relabel.

Why is raw agreement a weak score?

Raw agreement can look high when the judge catches nothing. Husain notes that a judge that "always predicts Pass" can still reach 95% agreement while detecting none of the errors (Husain, 2024-10). Report both rates separately, so a weak failure detector shows up.

How many labels you need is a separate question. See how many labeled examples you need before you trust an LLM judge.

What do the main sources recommend?

Source Main advice for judges
Zheng et al., 2023-06 Strong judges can match human agreement levels on chat benchmarks, with known biases
Shankar et al., 2024-04 Validate judges with humans; expect criteria to change
Yan, 2024-08 Prefer binary outputs; use pairwise for subjective traits
Husain, 2024-10 One expert, pass or fail plus critique, report both error rates
Anthropic, 2026-01 Calibrate with experts; one judge per dimension; allow "Unknown"
Husain and Shankar, 2026-09 One judge per failure type; inspect disagreements first

FAQ

Can an LLM judge replace human review?

No. It extends expert review to more outputs. The expert labels remain the ground truth, and you re-check the judge against them.

Which model should be the judge?

The evals FAQ says to start with the most capable models available and optimize cost later (Husain and Shankar, 2026-09). Re-run the expert check when you change the judge model.

Should I use a 1 to 5 score?

Start with pass or fail. The evals FAQ says binary labels force clearer thinking and more consistent labeling, and that numeric scales are usually not necessary (Husain and Shankar, 2026-09).

How do I stop the judge from favoring long answers?

The sources report the bias but give no single fix. Test it: compare judge grades on short and long answers that the expert rated equal, and add that case to your rubric examples.

How Clarity can help

Clarity by Epistemic Me is an AI-native services firm that builds AI agents with the client's team and runs the evals that prove they work. For judges, the evals work covers error analysis, expert rubrics, golden datasets, and LLM-as-judge checked against expert labels, with regression gates. Lynn Chyi, AI Experience Architect at Dayforce, said the work improved "our human expert alignment scores by nearly 60%" (case study). Engagements start at $100K+, with scope, deliverables and duration agreed in the proposal. Clarity is an official partner of Parlance Labs. See /evals/ or /qualify/.

Sources

Originally published at heyclarity.dev.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.