Evaluation & metrics

What is LLM-as-a-judge and when should you use it?

Short answer

LLM-as-a-judge is a technique where you use a strong language model to score another model's output against a written rubric. It is useful when the correct answer is open-ended and cannot be checked with a simple string match, like whether a summary is faithful or a response is helpful. It scales far better than human grading, but the judge itself has biases, so you calibrate it against human labels before trusting it.

Why it exists

Many agent outputs have no single right answer. Was the reply helpful, was the tone appropriate, did the summary stay faithful to the source. You cannot assert these with equality checks, and human grading does not scale to thousands of runs. An LLM judge fills that gap by applying a consistent rubric at scale.

How to use it well

  • Write a specific rubric. Vague prompts like "is this good" give noisy scores. Define concrete criteria and a scale.
  • Calibrate against humans. Label a sample by hand and confirm the judge agrees before you rely on it.
  • Watch for known biases. Judges tend to prefer longer answers and their own style, and position can sway pairwise comparisons.
  • Use pairwise comparison when you can, since "which of these two is better" is more reliable than an absolute score.

Tooling

Most eval frameworks support LLM judges out of the box, including Ragas and OpenAI Evals. They give you rubric templates, pairwise modes, and ways to track judge agreement over time.