# Design an Eval Harness for a Model Release

> How to build the test rig that feeds a release decision on a new model: suites, graders, repeated trials and a release gate, for your AI interview.

**In short:** An eval harness is the set-up that runs a fixed bank of tests on a new model, grades every answer, and compares the scores with the model in use today. Its scores feed a release gate that decides whether the release ships, and it runs the same way every time.

AI and LLM interview question Q280, Evaluation and observability. Advanced, occasional (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/design-an-eval-harness-for-a-model-release

## Say it in 30 seconds

For a model release I would build an eval harness, the rig that runs our tests end to end. It has three frozen suites: a regression set the new model must still pass, a capability set it should improve on, and a safety set. Each task runs several times, because outputs vary. Code graders check what they can, a model judge handles the rest after it is calibrated against people, and a person reads a sample of transcripts. Scores go on a scorecard beside today's model, and a release gate holds the ship if any gate line fails.

## Say it in 2 minutes

A model release changes the part of the system that is hardest to predict, so I want one fixed rig that answers two questions: did anything get worse, and did what we care about get better? The rig is the eval harness: the runner, the test bank, the graders and the report. Each test is an eval, and each attempt at it is a trial.

I would split the test bank into suites. The regression suite holds the tasks the bot already handles, and it should pass almost every time. The capability suite holds the hard cases we want to improve. The safety suite holds attacks and risky requests. Each suite includes cases where the behaviour should happen and cases where it shouldn't, so a bot that refuses everything can't pass.

Grading comes in layers: code checks first, a model judge for judgement calls, and people on a sample of transcripts. The judge must agree with people on that sample, or its scores mean little. Every trial starts from a clean environment and every transcript is stored, so a failure can be read line by line. The release gate blocks the ship when one suite falls below its line, even if the overall score looks fine. Each failure is read, labelled and turned into a new task, so the bank keeps growing with the real problems.

## What is an eval harness, in plain words?

An eval harness is the set-up that runs a fixed bank of tests on an AI model, grades every answer and writes a report. Anthropic puts it in one line: "An evaluation harness is the infrastructure that runs evals end-to-end."

Think of a car maker's crash-test lab. The same barrier, the same dummies and the same speed run on every new model, so the results can be compared. The lab is the harness, and each crash is one test.

Here is the real case. A mid-size bank's support assistant is moving to a new model. The same refund and policy questions run on the new model and on the one in use today. If the new one gets an old refund rule wrong, the harness should catch it before a customer does.

- **Eval:** A test for an AI system: an input, a grader that scores the output, and a result.
- **Task:** One test with its input and its success rule.
- **Trial:** One attempt at a task. Outputs vary, so each task runs several times.
- **Grader:** The rule that scores one part of an answer. Graders combine into a pass or fail.
- **Regression:** A case the old model passed and the new one now fails.

## How does the harness fit together?

A harness has a few parts: the candidate model, frozen test suites, a runner that calls the model, graders that score each answer, a scorecard, and a gate that makes the call. The picture shows the path a release takes.

*Diagram, The release harness: A new model goes through the same frozen suites as today's model. Each task runs three times, every answer is graded, and the gate holds the release only when a suite falls below its line.*
1. The new model goes into the same test bank as today's model.
2. The frozen suites run, and each task is graded.
3. The results go on one scorecard, next to today's model.
4. The gate holds only when a suite falls below its line. Otherwise it ships.

Frozen means the same tasks, graders and settings every time, so the scores can be compared. Each suite should be balanced, with cases where the behaviour should happen and cases where it shouldn't. Anthropic puts it this way: "Test both the cases where a behavior should occur and where it shouldn't."

The regression suite is the tasks the bot already handles. Anthropic describes a regression eval as one that asks whether the agent still handles what it used to, and that should pass almost every time.

NIST also says independent review can reduce internal bias, so someone outside the team should check the suites.

> "Processes for independent review can improve the effectiveness of testing and can mitigate internal biases and potential conflicts of interest" (NIST AI Risk Management Framework 1.0)

## How do you make the scores trustworthy?

Outputs vary between runs, so one run proves little. Anthropic runs several trials for that reason, and it defines the strict check, pass^k: "pass^k measures the probability that all k trials succeed." Here k is the number of trials you run.

- **Run once: One pass, one number.** A refund suite runs each task once. If 9 of 10 tasks pass, the team reports a 90% pass rate. One run per task hides the misses it did not happen to hit.
- **Run three in a row: What customers feel.** At 90% per run, and if the runs are independent, all three runs pass about 73% of the time (0.9 × 0.9 × 0.9 = 0.729). Customers meet every run.

Three trials still leave noise, so a 1 or 2 point gap may be chance. NIST's AI RMF 1.0 measure step asks for testing with measures of uncertainty, so report the spread across trials beside the score.

Each trial should start clean. In some internal evals, Anthropic saw Claude gain an unfair edge by reading the git history left by earlier trials, so shared state between trials can distort the scores.

Grade the cheapest way first. Anthropic recommends deterministic graders where possible, LLM graders where necessary, and human graders for extra validation. Deterministic graders are plain code checks that give the same answer every time. A model judge is an LLM grader: a second AI model that scores answers against a written rubric, a checklist of what a good answer contains. The picture shows that ladder.

*Diagram, Who grades the answer: One answer and its transcript go to code checks, a model judge with a written rubric, or a person on a sample. Each grader scores the answer, and the task's result is saved with the transcript.*
1. Each answer and its full transcript go to the graders.
2. Graders score each answer, and the result is saved.

A model judge has to earn its place. Anthropic says LLM-as-judge graders should be closely calibrated with human experts, so the judge and the people agree on a sample before the judge's scores count.

> "You won't know if your graders are working well unless you read the transcripts and grades from many trials" (Anthropic)

> **Tip:** Say this in the interview: a score is only as good as the grader behind it, and a grader is only as good as its match with people.

## How do you decide ship or hold?

A gate is a rule agreed before the run, so the result can't move the line. Here is a made-up gate in plain Python for a support bot. Its suites are refunds, policy and regression. The numbers are invented.

```python
# Release gate for a made-up support bot. The numbers are invented, and the gate is set before the run.
BASELINE = {"refunds": 0.97, "policy": 0.95, "regression": 0.99}
CANDIDATE = {"refunds": 0.96, "policy": 0.96, "regression": 0.97}
GATE = {"refunds": 0.95, "policy": 0.94, "regression": 0.98}  # lowest pass rate allowed, agreed before the run

def check(baseline, candidate):
    lines = []
    for suite, new in candidate.items():
        old = baseline[suite]
        change = round((new - old) * 100, 1)
        status = "ok"
        if new < GATE.get(suite, 0):
            status = "HOLD: below gate"
        elif change < 0:
            status = "read transcripts"
        lines.append(f"{suite:<11}{old:>4.0%} -> {new:>4.0%}  {change:+.1f} pts  {status}")
    return lines

for line in check(BASELINE, CANDIDATE):
    print(line)
blocked = [s for s, v in CANDIDATE.items() if v < GATE.get(s, 0)]
print("RELEASE:", "HOLD" if blocked else "SHIP", blocked)
```

Output:

```text
refunds     97% ->  96%  -1.0 pts  read transcripts
policy      95% ->  96%  +1.0 pts  ok
regression  99% ->  97%  -2.0 pts  HOLD: below gate
RELEASE: HOLD ['regression']
```

The regression suite drops below its line, so the release is held. A refund drop does not block the ship. A person reads its transcripts. Nothing ships on one overall score.

Scores can also mislead. Once a model passes every solvable task, the suite stops showing progress, which Anthropic calls eval saturation. Anthropic also says it does not take eval scores at face value until someone digs into the details and reads some transcripts.

Keep the test sets, metrics and tool details documented, so a result can be repeated. NIST's AI RMF 1.0 measure step, its testing and reporting part, asks for that. Track speed (latency, how long an answer takes) and cost on the same bank too: Anthropic notes that latency, token usage, cost per task and error rates can be tracked on a static bank of tasks.

Production has the last word. Anthropic notes that production monitoring picks up distribution drift (real traffic slowly moving away from the test set) and unanticipated real-world failures. We then add each failure to the bank as a new task.

### How would you set the harness up in two weeks?

Start small and build the rig in order. Each step gives you something to check before the next one.

1. **Collect real tasks:** Start from support tickets and failed chats. Anthropic says to be task-specific: design evals that mirror your real-world task distribution.
2. **Write a reference answer:** For each task, keep a known working output that passes every grader. It shows the task is solvable and the graders are set up right.
3. **Read transcripts before trusting scores:** Read a sample of trial transcripts, and fix any grader that rejects a good answer.
4. **Freeze, then run old against new:** Lock the suites, settings and graders. Run three trials on today's model and on the candidate.
5. **Agree the gate lines first:** Write the lowest pass rate for each suite before the run. Save the scorecard with every transcript.
6. **Feed production back in:** After launch, each real failure becomes a new task in the bank.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] The harness is the runner, the test bank, the graders and the report, run the same way every time.
- [ ] Three frozen suites: regression, capability and safety, each with balanced cases.
- [ ] Several trials per task, each starting from a clean environment.
- [ ] Code checks first, a calibrated model judge, and people reading transcripts.
- [ ] A gate per suite, agreed before the run, that holds the ship.
- [ ] Production failures feed back into the bank as new tasks.

**Common traps**

- Trap: "The average went up, so we ship." Better: Check each suite on its own line. A rise on one suite can hide a drop on another.
- Trap: "We ran it once, and it passed." Better: Outputs vary. Run several trials and check pass^k, the chance that every run passes.
- Trap: "The judge gave it 9 out of 10, so it is fine." Better: Check the judge against people first. A score is only as good as the grader behind it.

## Can you spot the problem?

**Spot the problem:** Which line in this release note is the mistake?

A. Scored on 3 trials per task, with the same settings for both models.
B. Overall score 94.1%, up from 93.6%, so we ship.
C. Refund answers fell from 97% to 95%. Flagged for a person to read.
D. The judge matched people on 47 of 50 sampled transcripts, and we read the 3 misses.

**Answer:** B. An overall average hides a fall in one suite. Check each suite against its own gate, and read the transcripts of any drop. The other three lines are sound practice.

**Quick check:** A new model gains on the capability suite but drops 3 points on the regression suite. What should happen?

A. Ship, because the gain is bigger than the drop
B. Hold the release and read the failing transcripts
C. Lower the regression gate so the run passes
D. Retrain the judge until the regression score rises

**Answer:** B. The regression suite should pass almost every time, so a 3-point fall is a red flag. Hold the release until the transcripts explain it. Moving the gate after the run only hides the fall.

## Can you answer these from memory?

**Flash cards**

- **What is an eval harness?** The set-up that runs fixed tests on a model, grades each answer and writes a report.
- **Eval or trial?** An eval is the test. A trial is one attempt at a task. Run several.
- **What is a regression suite?** Tasks the model already handles. It should pass almost every time.
- **What is pass^k?** The chance that all k trials of a task succeed. Stricter than passing once.
- **Who checks a model judge?** People. Calibrate it on sampled transcripts before trusting its scores.
- **Why a release gate?** It holds the ship when one suite fails, so one overall average can't hide a drop.

## Likely follow-up questions

- Q247 Offline vs online evaluation? https://designervenkat.online/interview/ai/offline-vs-online-evaluation
- Q256 Capability evals vs regression evals? https://designervenkat.online/interview/ai/capability-evals-vs-regression-evals
- Q249 What is LLM-as-a-judge? https://designervenkat.online/interview/ai/what-is-llm-as-a-judge
- Q262 "The model got worse after an upgrade." What do you do? https://designervenkat.online/interview/ai/the-model-got-worse-after-an-upgrade-what-do-you-do
- Q263 Why can public benchmarks mislead? https://designervenkat.online/interview/ai/why-can-public-benchmarks-mislead
- Q279 Statistical significance in evals? https://designervenkat.online/interview/ai/statistical-significance-in-evals

## Learn it in depth

- [Regression Testing](https://designervenkat.online/learn/ai-engineering/regression-testing)
- [A model as the judge](https://designervenkat.online/learn/ai-engineering/model-based-evals)
