Share
X Facebook WhatsApp Email

LLM-as-judge: how AI grades AI in an eval pipeline

responsibleai

Published

A deep dive into using an LLM as an automated grader — when it works, how to calibrate it, and where it quietly breaks.

LLM-as-judge is the workhorse of modern eval pipelines: a model reads an output and scores it against a rubric. Done well, it scales expert judgment. Done poorly, it hides failures behind confident numbers.

What the judge actually does

The judge receives three inputs — the original task, the system's output, and a rubric — and returns a structured score. That score might be a pass/fail, a 1–5 rating per criterion, or a preference between two candidate answers.

Where it shines

  • Rubric grading at scale. Thousands of outputs judged in minutes, consistently applying the same criteria.
  • Pairwise comparison. Asking "which answer is better?" is more reliable than asking for an absolute score.
  • Coverage of soft qualities. Tone, helpfulness, and completeness resist code checks but respond well to a well-written rubric.

Where it quietly breaks

  • Position bias. Judges favor the first answer in a pair unless you randomize order.
  • Verbosity bias. Longer answers often score higher regardless of quality.
  • Self-preference. A judge from the same model family tends to rate its cousin's outputs generously.
  • Rubric drift. A vague rubric produces vague grades; the judge invents its own criteria.

How to calibrate

  1. Have humans grade a sample of 50–100 outputs first.
  2. Run the judge on the same sample and measure agreement.
  3. Tighten the rubric — add examples of a 1, a 3, and a 5 — until agreement crosses your threshold.
  4. Re-check monthly. Model updates change judge behavior.

Judge prompt hygiene

Version it. Log the exact prompt, model, and temperature for every grading run. Treat the judge like production code, not a scratch prompt.

When to fall back to humans

High-stakes domains — clinical, legal, financial — should keep humans on the final grading loop for a sampled slice, even when the judge agrees. It's how you catch the failure mode the judge shares with the system under test.

Silverberry embeds calibrated LLM-as-judge pipelines through our Responsible AI-by-Design Framework and AI Consulting Services.