Skip to content

Building LLM Evaluations with Three Types of Graders and a Regression Set

Criteria for measuring systems with variable LLM outputs through code-based graders, model judgments, human evaluation, and regression tests.

7 min read
Filed underAI & ML

Knowledge maturity: growing

On this page10

Suppose you change one line in a prompt and the answer looks better in a demonstration. A single demonstration cannot establish whether the change is an improvement: the same input can produce different outputs across runs. This article explains how evaluations, or evals, turn judgments about an LLM system's quality into repeatable measurements.

The components of an evaluation

Anthropic's article on agent evaluations distinguishes the following components.

Component Meaning
Task One test with an input and success criteria
Trial One attempt at a task; run several because outputs vary
Grader Logic that assigns a score to one aspect of an output; a task can have several graders
Transcript The complete record of outputs, tool calls, and intermediate results during a trial
Outcome The final state of the environment after the trial

The distinction between an outcome and a transcript matters. An agent saying “I made the reservation” is part of the transcript; whether a reservation actually exists is the outcome. Grade primarily on outcomes, while also evaluating process-related requirements where appropriate, such as safety and suitable tool use. Avoid requiring one particular path so that a correct solution reached through another path is not penalized.

Three types of graders

Graders fall into three categories according to who makes the judgment. A task can combine all three.

Code-based graders: the foundation

Deterministic evaluation uses rules that return the same judgment given the same grading input, environment, and rule set. Examples include exact-match and inclusion checks, JSON parsing and schema validation, running tests on generated code, inspecting database or file state after a task, and checking whether a particular tool was called.

Even when grading rules are fixed, interpreting a score change requires controlling the inputs, execution environment, and grader configuration as well as the system being evaluated. Code-based checks are fast, inexpensive, and reproducible, making them a useful foundation for an evaluation set. Their weakness is brittleness when an output has valid variations. Overly strict rules often judge equivalent answers differently—for example, judging “Seoul” and “It is Seoul” differently as the capital of South Korea. Normalize responses where appropriate, while checking that normalization does not conceal errors.

Even for open-ended tasks, required facts and prohibited actions can become deterministic checks.

Model-based graders: open-ended tasks

An LLM-as-a-judge evaluation uses another model call to grade an output against a rubric. Zheng et al. reported that strong judges agreed with human preferences more than 80% of the time, at a level similar to agreement between humans. That figure comes from the paper's experimental conditions; agreement on your own tasks needs separate measurement.

The paper also describes three biases and limitations in reasoning. Among the responses below, reversing the comparison order and supplying reference answers are proposals from the paper; the others are commonly used practical approaches.

Bias or limitation Response
Position bias: judgments change with the order of compared answers Judge in both orders and accept only consistent judgments
Verbosity bias: longer answers receive more favorable judgments Include concision in the rubric or control answer length
Self-enhancement bias: a judge may favor answers it generated itself (the paper could not determine whether this occurs, given limited data) Use a different model from the one being evaluated
Reasoning limitations: errors when judging mathematics or code correctness Supply a reference answer or use deterministic checks instead

Anthropic's evaluation article recommends splitting a rubric into separate criteria, using a separate judge call for each criterion, and allowing an “unable to judge” result when information is insufficient. In Anthropic's multi-agent research case study, a rubric covering factual accuracy, citation accuracy, completeness, source quality, and tool efficiency produced both a score from 0.0 to 1.0 and a pass/fail judgment. Judges are also nondeterministic, so some evaluations use agreement among several judges. In that research case study, however, a single call with one prompt best matched human judgment.

Human graders: calibration and discovery

Human evaluation provides the most trustworthy reference, but it is slow and expensive. Rather than reviewing every output, focus it on two jobs.

The first is calibrating model judges. Compare a judge with a small sample of human judgments, calculate agreement, and automate only criteria where agreement is sufficient. Revise rubrics for criteria with low agreement. If several humans disagree on the same outputs, the criteria themselves may be unclear.

The second is finding failures that automated graders miss. Anthropic reported that human evaluators testing its multi-agent research feature discovered a tendency to prefer search-optimized content farms over authoritative sources. Humans can also be affected by fatigue, order effects, and long, confident answers (the author's opinion), so write down the criteria and provide examples of judgments.

Measuring nondeterminism

The same evaluation article distinguishes two metrics. Pass@k is the probability of at least one success in k attempts; pass^k is the probability that all k attempts succeed. For independent trials under the same conditions, each with a 75% success probability, the probability that all three succeed is 0.75³, or about 42%. Choose the metric according to whether the task needs one successful attempt or reliable success every time. For a feature executed on each user request, pass^k is closer to what users actually experience.

Capability and regression evaluations

Evaluations serve two different purposes.

Type Question Expected pass rate
Capability evaluation What can the system do well? Starts low enough to leave room for improvement
Regression evaluation Can the system still do what it previously could? Close to 100%

Move tasks with high capability-evaluation pass rates into the regression set. Code is not the only source of regressions in an LLM system: prompt wording, model-version changes, tool descriptions, search indexes, and provider model updates can all change the output. If the model version is not pinned, regressions can occur without a code change, so record the model identifier in use (the author's opinion).

Automated evaluations provide a first line of defense in CI for agent changes and model upgrades. One possible arrangement is to run deterministic checks on each commit and expensive model judgments before deployment (the author's proposal). Whenever you fix a failure found in production, add that case to the regression set.

How to start

  1. Create 20–50 simple tasks from real failures. Early changes have large effects, so differences show up even with a small sample.
  2. Use deterministic checks wherever outcomes can be verified directly.
  3. Reserve model judges for qualities that rules cannot assess, and calibrate them against a sample of human judgments.
  4. Run several trials per task and choose pass@k or pass^k according to the work's requirements.
  5. Read transcripts alongside scores. Only the transcript tells you whether a failure came from the system or from the grader.

Limitations

A public benchmark score does not stand in for the quality of your own tasks, because of factors such as training-data contamination and differences in task distributions (the author's opinion). Repeatedly tuning to an evaluation set can overfit the evaluation itself, so keep adding new failures. An old regression set can also drift away from actual usage. A 100% pass rate therefore does not guarantee quality.

References

Tags

LLMevaluationTestingAI Agent

Continue reading

All →