The harness Guide 06 of 25

Evals: the harness that tells you whether it works

Every prompt tweak, tool change, and model upgrade can quietly break an AI product. An evaluation harness is how a team finds out before its users do.

  • 10 min read
  • Updated 
  • 8 sources

Key takeaways

  • Start with 20–50 tasks drawn from real failures. A small suite that runs on every change beats a large one that never gets finished.
  • Prefer code-based graders. Use an LLM judge only after measuring how often it agrees with your own experts on your own data.
  • For agents, grade the end state, isolate every trial, and report pass^k — reliability across repeated runs — not just best-case success.
  • Public benchmark scores shift with prompt format and saturate fast. They help shortlist models but cannot tell you whether your product works.
  • Keep datasets, rubrics, and graders in version control. Hosted eval dashboards come and go, as OpenAI’s scheduled 2026 Evals shutdown shows.
On this page 7 sections

A team swaps in a newer model, reruns a dozen favorite prompts, likes what it sees, and ships. Two weeks later, support tickets reveal that refund requests now loop forever and a formatting rule the old model honored has vanished. Nobody broke anything on purpose. Nobody could see it, either.

That is the default failure mode of products built on large language models (LLMs). Outputs vary from run to run, a one-line prompt edit can shift behavior far from where it was made, and providers retire models on their own schedule. Agents raise the stakes: they take many steps, call tools, and change real systems, so small errors compound.

Evaluations — evals — are how a team replaces gut feel with evidence. This guide covers what a harness is, which graders to trust, what agents change, and how to build one that lasts.

What is an evaluation harness?

An eval is a test for software whose output varies between runs and often has no single correct string. Each task pairs an input with success criteria, a grader turns the result into a score, and a suite groups tasks that probe one capability. Anthropic’s January 2026 guide to agent evals describes the harness as the machinery that executes all of this: supplying tools, running trials in parallel, recording each step, grading, and rolling up results.

Two distinctions matter early. First, the evaluation harness is not the agent harness — the loop, prompts, and tools that let a model act. Evaluating an agent means scoring the model and its agent harness together, and the same model can succeed inside one harness and stumble inside another. Second, the transcript is not the outcome: an agent can say it closed a ticket, but what counts is the ticket’s status in the system afterward.

The core is a short loop. The real engineering hides in what this sketch makes look easy: clean environments, trustworthy graders, and reports someone reads.

# Each task: input, success criteria, tags.
for task in suite:
    # Outputs vary, so run several trials.
    for trial in range(k):
        # Nothing leaks between trials.
        env = fresh_environment(task)
        # Records steps, tokens, and latency.
        transcript = run_system(task.input, env)
        scores = {
            g.name: g(task, transcript, env)
            for g in task.graders
        }
        log(task.id, trial, transcript, scores)

report(pass_at_1, pass_all_k, by_tag, cost, latency)

Why public benchmarks can’t tell you whether your product works

OpenAI’s evaluation guide separates three things people mean by evals: industry benchmarks that compare models in isolation, generic scoring metrics, and tests written for one specific application. Only the third answers whether your system does its job. The guide also names the classic anti-patterns, including datasets that look nothing like production traffic and judging quality by impression.

Benchmarks still have a role. EleutherAI’s open-source lm-evaluation-harness runs more than 60 academic benchmarks behind one interface and was the engine behind Hugging Face’s Open LLM Leaderboard. To shortlist open-weight models fairly, run every candidate through one harness with identical settings.

Benchmark numbers are also more fragile than leaderboards suggest. In a 2024 paper on reproducible evaluation, the harness’s maintainers ran models on ARC-Challenge, a set of multiple-choice science questions. Mistral-7B scored 50.1% when each answer option was rated as a sentence completion, and 72.4% when the options were shown as lettered choices. GPT-NeoX-20B moved the opposite way, from 38.0% to 26.6%.

Same models, same questions, yet the gap between them grew from 12 points to almost 46. The authors found that the best prompt style differs from model to model, so a formatting choice can reorder a leaderboard, not just shift it.

Benchmarks saturate, too. By Anthropic’s count in January 2026, frontier models went from roughly 40% to above 80% on SWE-bench Verified, a widely used coding benchmark, in about a year — leaving little room to tell leaders apart. And every benchmark measures someone else’s tasks inside someone else’s harness. Your prompts, tools, data, and users are not in it.

Graders: code, model judges, and humans

An eval is only as good as its grader, and most harnesses mix three kinds.

GraderHow it scoresStrengthsFailure modesBest for
CodeExact match, schema checks, unit tests, queries against the final stateDeterministic, nearly free, and failures are easy to traceRejects correct answers that take an unexpected formAnything with a checkable answer or end state
LLM judgeA model applies a rubric or picks the better of two outputsCopes with open-ended text; scales cheaplyOrder and length bias, run-to-run variance; untrustworthy until calibratedTone, faithfulness, instruction following
Human expertLabels, rankings, side-by-side reviewThe closest thing to ground truthSlow and costly; experts disagree with each otherCalibrating judges; subjective or high-stakes calls

Default to code wherever an answer can be checked mechanically. A refund either exists in the billing system or it doesn’t; no model needs to offer an opinion.

Making LLM judges trustworthy

The case for model graders rests on work like Zheng et al. (2023). Setting ties aside, GPT-4 agreed with human raters more than 80% of the time — about as often as the humans agreed with one another. The same paper cataloged the biases: judges are swayed by the order in which answers appear, prefer longer answers, and may favor answers they wrote themselves. One fix it proposes for order bias is cheap: run each comparison twice with the answers swapped, and count a win only when both runs agree.

OpenAI recommends pairwise comparisons or pass/fail verdicts for more reliable results, and controlling for response length. Anthropic suggests a separate judge call per rubric dimension, plus an explicit way for the judge to say it lacks enough information.

Agreement has to be measured on your data, not assumed. Shopify’s Sidekick team had three or more product experts label real merchant conversations and treated their agreement with one another as the ceiling. Measured by Cohen’s kappa — agreement corrected for chance, where 0 is chance and 1 is perfect — their judges started at 0.02. Prompt iteration lifted them to 0.61, against 0.69 between humans.

Their acceptance test is worth copying: randomly substitute a human for the judge and check whether anyone can tell the difference. GitHub’s Copilot team keeps a lighter check, per a January 2025 post: harder items in its 1,000-plus chat test set are graded by a model of known quality, and the team routinely audits that grader. A judge prompt is code; version it and test it like code.

How do you evaluate an AI agent?

Agents break the one-question, one-answer model of testing. They choose their own route, so a test that demands a fixed sequence of tool calls punishes valid solutions nobody anticipated. Anthropic advises grading what the agent produced rather than how, with partial credit: a support agent that verified the customer but never issued the refund still beat one that stalled immediately.

The same Anthropic guide reports Claude Opus 4.5 being marked wrong on a τ²-bench airline task because it found a policy loophole that left the traveler better off. The grader was right by the letter and wrong in spirit, which is why results need reading, not just counting.

Isolate every trial

Each trial needs a clean environment. Leftover files, warm caches, or a shared database produce correlated failures that look like model weakness, and they can inflate scores as well. Anthropic has seen Claude gain an unfair head start on internal tasks by reading git history left over from earlier trials.

Containers make this practical: every trial starts from the same image and is thrown away afterward. GitHub’s Copilot team also leans on containers for coding evals. It takes about 100 containerized repositories whose tests pass, deliberately breaks them, and checks whether a candidate model can make the tests pass again.

Measure reliability, not just capability

Because outputs vary, every task needs several trials, and how you summarize them is a product decision. pass@k asks whether at least one of k attempts succeeded, which suits tools where a person picks the best of several drafts. pass^k asks whether all k attempts succeeded — the bar a customer-facing agent must clear.

Sierra’s τ-bench paper introduced pass^k in June 2024. GPT-4o, the strongest model it tested, succeeded on a single try in about 61% of retail tasks and 35% of airline tasks, yet its retail pass^8 fell below 25%. The arithmetic is unforgiving: if runs are independent, an agent that succeeds on a task 90% of the time gets eight clean runs in a row only about 43% of the time.

When the eval itself is wrong

A harness can mislead as easily as a model. Anthropic describes Claude Opus 4.5 scoring 42% on CORE-Bench, a research-reproduction benchmark, until a researcher found the grader rejecting 96.12 when it wanted 96.124991…, alongside ambiguous specs and tasks that could never be reproduced exactly. After the fixes, and a less restrictive agent harness, the score was 95%.

The opposite failure is a grader that is too easy to satisfy. When Shopify trained a model with reinforcement learning (RL) against its judges, the model found shortcuts. It sometimes explained why it couldn’t help instead of trying. Asked for customers with an enabled status, it filtered on customer_tags CONTAINS 'enabled' rather than customer_account_status = 'ENABLED'.

Any score optimized hard enough gets gamed, whether by an RL loop or by an engineer tuning prompts against a fixed suite. The defense is simple and tedious: read transcripts. If a failure looks unfair or a pass looks hollow, fix the eval before touching the system.

Building your harness: a practical sequence

Anthropic’s advice on timing is blunt: “Evals get harder to build the longer you wait.” While the spec is fresh, each requirement suggests its own test. A year in, the team is reconstructing intent from production behavior. A workable order:

  1. Define success before collecting data. OpenAI’s guide puts the eval objective ahead of the dataset. Anthropic’s bar is that two domain experts, grading separately, would agree on pass or fail. Write a reference solution to prove each task is solvable and that the grader accepts it.
  2. Harvest 20–50 real tasks. Anthropic finds that is enough at first for expensive, multi-step agent tasks, because early changes have large, visible effects. For items that are cheap to label, such as retrieval queries, classifications, or SQL questions, aim for 100–300 so each slice is large enough to compare. Mine the bug tracker, the support queue, and the checks people already run by hand. Shopify’s team went further, sampling real merchant conversations rather than hand-curating an idealized set.
  3. Balance the set. Include cases where a behavior should not happen. Anthropic learned this on web search for Claude.ai: test only whether the model searches when it should, and you can end up with one that searches for nearly everything.
  4. Pick graders in order of trust. Code first, a calibrated judge where code can’t reach, and humans to calibrate the judge and settle disputes.
  5. Split capability from regression. Capability suites start with low pass rates and give the team something to climb. Regression suites sit near 100% and run in continuous integration (CI) on every change. Tasks graduate from one to the other as they saturate.
  6. Report more than one number. Track pass@1 and pass^k per slice, plus cost and latency. GitHub notes that metrics can pull against each other: a slower model can show higher acceptance, possibly because users see fewer suggestions. Agree in advance which trade-offs you will accept.
  7. Close the loop with production. Log traces, sample them for review, and turn each new failure into a task. OpenAI frames this as continuous evaluation, where the dataset grows alongside the product. In early 2025, GitHub described pairing over 4,000 offline tests with live internal trials that switch some staff to a candidate model.

What this means for your team

Treat evals as the product specification, not testing overhead. Deciding what good looks like belongs to product owners and domain experts; engineers own the harness. Anthropic reports that a dedicated eval-infrastructure team, with product teams contributing tasks, worked best internally.

Rules that hold up in practice:

  • No model or prompt change ships without the regression suite. That includes provider upgrades you didn’t ask for.
  • No LLM judge without an agreement number. If you can’t state its kappa against your experts, you don’t know what it measures.
  • Benchmarks shortlist; your evals decide. Use public scores to pick two or three candidates, then run them through your own suite.
  • Budget for it. Agent evals consume tokens, containers, and expert hours. Run a fast slice on every pull request and the full suite nightly.

Keep eval assets portable. Datasets, rubrics, judge prompts, and graders encode what your product is supposed to do, so they belong in version control beside the code. Tooling moves underneath you: as of October 2026, OpenAI’s docs say its hosted Evals platform goes read-only on 31 October 2026 and is scheduled to shut down on 30 November 2026. Teams with evals in their repository just point a new runner at them.

No single layer catches everything. Anthropic likens good practice to safety engineering’s Swiss cheese model, where each layer’s holes are covered by the next. Offline evals give fast feedback, production monitoring shows what real users hit, and periodic human review keeps automated graders honest. At SurgeX Labs we build the eval suite alongside the first prototype, because without it there is no reliable way to tell whether the next change made things better.

Sources

  1. Demystifying evals for AI agents (opens in new tab) — Anthropic Engineering, 2026 anthropic.com

  2. Evaluation best practices (opens in new tab) — OpenAI API documentation, 2026 developers.openai.com

  3. Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (opens in new tab) — UC Berkeley, LMSYS et al. (NeurIPS 2023, arXiv), 2023 arxiv.org

  4. τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains (opens in new tab) — Sierra (arXiv), 2024 arxiv.org

  5. Lessons from the Trenches on Reproducible Evaluation of Language Models (opens in new tab) — EleutherAI et al. (arXiv), 2024 arxiv.org

  6. Language Model Evaluation Harness (opens in new tab) — EleutherAI (GitHub), 2020 github.com

  7. Building production-ready agentic systems: Lessons from Shopify Sidekick (opens in new tab) — Shopify Engineering, 2025 shopify.engineering

  8. How we evaluate AI models and LLMs for GitHub Copilot (opens in new tab) — The GitHub Blog, 2025 github.blog

Where this shows up in our work

Building this? Talk to an engineer.

If this guide maps to a system you’re planning, send a short brief. A senior engineer replies within one business day.