LLM-as-a-Judge
LLM-as-a-judge is an evaluation method in which a language model scores or compares the outputs of another AI system against a written rubric, standing in for human reviewers at scale.
Also known as: Model-graded evaluation, AI judge
How it works
You give a judge model the input, the output to grade, optional reference material and a rubric, for example "Score 1 to 5 for whether the answer is supported by the provided documents". The judge returns a score and usually a short reason. Variants include:
- Single scoring: rate one answer against criteria.
- Pairwise comparison: pick the better of two answers.
- Reference-based: compare against a known correct answer.
The method was studied by Zheng and colleagues in the 2023 paper Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena, which found strong judge models agreed with human preferences at rates close to human-to-human agreement, while also documenting biases.
Why it matters
Human review is accurate but slow and costly. A judge model can grade thousands of outputs in minutes, which makes regular evaluation practical. Its weaknesses are well known and must be managed:
- Position bias: favoring the first or second answer shown.
- Verbosity bias: favoring longer answers.
- Self-preference: favoring outputs from its own model family.
Good practice is to write narrow, binary or low-scale criteria, swap answer order in pairwise tests, use a different model family as judge where possible, and check the judge against a human-labeled sample before trusting it. Re-check that agreement when you change the judge model. See AI evaluation and observability.
LLM-as-a-Judge in depth
Building a judge you can trust
A judge is a small piece of software with its own prompt, model and test data, and it deserves the same care as the system it grades. The steps we follow:
- Write one criterion per judge prompt, such as "Is every claim supported by the passages?", rather than one prompt that scores five things at once.
- Prefer a pass or fail verdict, or a short scale with each level defined in words, over open-ended scores.
- Ask for a brief reason before the verdict, and return both as structured output so results can be counted.
- Have people label a sample of outputs, often a few hundred, and measure how often the judge agrees with them.
- Fix the judge prompt where it disagrees, then measure again on a fresh sample.
Agreement can be reported as simple accuracy against the human labels, or with a chance-corrected statistic such as Cohen's kappa. Track it per criterion, because a judge can be reliable on one and weak on another.
Example: grading a support assistant
Example: a team runs a RAG assistant over its product manuals. Each night, a sample of real conversations is graded by three judges: groundedness (are claims backed by the retrieved passages), answer relevance (does it address the question), and tone and policy (no promises about refunds, correct escalation). Results feed a dashboard next to cost and latency. When a prompt or model change is proposed, the same judges run on a fixed test set in CI, and the change is blocked if groundedness drops below the agreed threshold. A person reviews every case where judges disagree with each other.
Tools and where judges fit
Open-source evaluation frameworks such as Ragas, DeepEval, promptfoo and OpenAI Evals include ready-made judge metrics, and tracing platforms such as Langfuse and Arize Phoenix can run judges on production traces. Ready-made metrics are a quick start, but their prompts encode someone else's definition of quality, so read them and adapt them to your rubric. Judges work best alongside simpler deterministic checks: schema validation, regular expressions for forbidden content, exact-match on extracted fields, and code tests. Use the judge only where meaning has to be assessed.
Common mistakes
- Trusting the judge without a human-labeled baseline.
- Using the same model to generate and to judge, which invites self-preference.
- Scoring on a 1 to 10 scale with no definitions, which produces noisy, clustered scores.
- Never re-checking agreement after the judge model or the product changes.
- Treating judge scores as precise measurements rather than signals that point people to cases worth reading.
Related practices
LLM-as-a-judge is one method inside broader AI evaluation and LLMOps work. It supports red teaming by scoring large batches of adversarial outputs, and helps detect hallucination and grounding failures at scale. Gepton sets up judges, labeled baselines and dashboards in AI evaluation and observability.
Questions about LLM-as-a-Judge
Something else? Send us your question and an engineer replies with next steps.
How many human labels do I need to validate an LLM judge?
Enough to see agreement per criterion with reasonable confidence, which in practice often means a few hundred labeled examples drawn from real traffic, including hard and borderline cases. Fewer can work for an early check on a narrow criterion. More matters when the judge gates releases or when classes are rare. Have at least two people label part of the sample so you know how much humans agree with each other, which is the practical ceiling for the judge.
Can an LLM judge evaluate answers in Hindi or Hinglish?
Yes, if the judge model handles those languages well, but it should be validated separately on them. A judge calibrated only on English examples may be harsher or more lenient on Hindi, romanized Hindi or mixed-language answers. Include these cases in the human-labeled sample, check agreement by language, and consider writing the rubric with examples in each language your users write in.