What is an AI eval harness?
You have an AI system that looks good in the demo. Someone asks whether it is ready to go live, and nobody can answer with a number. That is the problem an AI eval harness solves. It is the test rig that runs your AI against a fixed set of real cases, scores every answer the same way, and tells you whether it cleared a pass mark you agreed in advance. If you cannot run that test on demand, you do not know whether your AI works. You have an opinion.
Anthropic's engineering team, writing in January 2026, defines the evaluation harness as "the infrastructure that runs evals end-to-end." Braintrust's glossary breaks it into four jobs: loading the dataset, running the task, scoring and reporting. Both definitions are correct and both are written for engineers. This guide is written for the person who has to sign off on the result.
In plain terms, an eval harness has four parts:
- Cases. Real inputs from your business: tickets, invoices, contracts, leads. Each one has a known correct outcome.
- A runner. Code that feeds every case to the AI, exactly as production would, and records what it did.
- Graders. Rules, checks or reviewers that mark each result pass or fail.
- A report. One pass rate, compared against the pass mark, plus the list of failures and why they failed.
What is the difference between an eval, a benchmark and an eval harness?
A benchmark tells you how a model performs on someone else's problems. An eval tells you how your system performs on yours. The harness is the machinery that makes the eval repeatable, so the same test gives a comparable answer next week, after the next prompt change, and after the next model upgrade.
| Term | What it is | Who it answers to | Useful for |
|---|---|---|---|
| Public benchmark | A standard test set published by a lab or researcher | The model vendor | Shortlisting models |
| Eval | One test of your system on your cases, with success criteria | Your workflow owner | Deciding if this version works |
| Eval harness | The code and process that run every eval the same way, every time | Whoever signs off on go-live | Go-live decisions, regression checks, vendor accountability |
| Guardrail | A live check that blocks or retries a bad response in production | Operations | Stopping a single bad output reaching a customer |
The last row matters. DeepEval's guide draws the same line: offline evals measure behaviour against a fixed dataset, while checks that act on live traffic are guardrails. You need both. A guardrail stops one bad answer. A harness tells you how many bad answers to expect before you ship.
Why do you need an eval harness before AI goes live?
Because most companies that ship AI cannot prove it works, and quality is what kills it. Without a harness, every go-live decision rests on a handful of hand-picked demos, and every later change is a guess.
LangChain surveyed 1,340 practitioners between November and December 2025 and published the results in June 2026. Just over half, 52.4%, run offline evaluations on test sets. Among teams that already have agents in production, the share running no evaluations falls to 22.8%. The teams that ship are more likely to test.
Grant Thornton's 2026 AI Impact Survey of 950 business leaders adds the governance view. 46% cite governance failures as a leading cause of underperformance, and just 20% have a tested AI incident response plan. An eval harness is not the whole of governance, but it is the evidence an auditor asks for first: what you tested, against what standard, and what the result was.
There is a commercial reason too. MIT Project NANDA's 2025 report, The GenAI Divide, found 95% of organizations get zero return on their generative AI investment. A harness does not create return. It stops you paying for a system that was never going to produce any, and it tells you early.
What goes into a good AI eval harness?
A good harness tests outcomes on real cases against a standard set before anyone sees the results. Four design choices separate a harness that informs decisions from one that decorates a slide.
Real cases, not invented ones
Pull cases from your own history: last quarter's tickets, last month's invoices, the contracts that caused trouble. Include the awkward ones. Anthropic's guidance is to draw early tasks from real failures, because those are the cases that will recur.
Grade the outcome, not the claim
Anthropic separates the transcript, what the agent said and did, from the outcome, the final state of the system. Its example: did the reservation actually land in the database, not did the agent say it booked one. For a back-office workflow, that means checking the ledger entry, not the confirmation message.
Match the grader to the question
Anthropic describes three grader types. Code-based checks are fast, cheap and objective, but brittle on anything subjective. Model-based graders handle nuance but need calibrating against people. Human review is the gold standard, but slow and expensive. Most harnesses use all three: code for the fields that must be exact, a model for tone and completeness, people for a sample and for every disputed case.
Run it more than once
AI output varies from run to run. Anthropic distinguishes pass@k, the chance of at least one success in k attempts, from pass^k, the chance that all k attempts succeed. For a customer-facing agent, consistency is the point, so pass^k is the honest measure. An agent that gets the refund right two times in three is wrong once in every three customers.
How many test cases does an eval harness need?
Enough to make the pass rate mean something, drawn from enough variety to cover the cases that cost money. Anthropic's engineering guidance says 20 to 50 simple tasks drawn from real failures is a good start for an agent team building capability.
A go-live decision needs more. We test on 100 to 300 of the client's real cases against a pass mark set before the build starts. The arithmetic is simple. With 20 cases, one result moves the pass rate by five percentage points, so a single lucky or unlucky case can flip the decision. With 200 cases, one result moves it by half a point. That is the difference between a sign-off and a guess.
The mix matters as much as the count. Weight the set toward the cases where an error is expensive: refunds above a threshold, invoices with unusual tax treatment, contracts with non-standard clauses. A harness that only contains easy cases will report a pass rate the real world will not repeat.
Can you use AI to grade AI?
Yes, for some judgments, if you check the judge against people first. Model-based grading scales where human review cannot, but it is a measuring instrument, and instruments need calibrating.
The research basis is a 2023 paper by Zheng and colleagues at UC Berkeley and other institutions, Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. It found that strong model judges matched human preferences with over 80% agreement, the same level of agreement found between humans. That is a useful result. It is also a result on general chat questions, not on your invoices.
Practice reflects the caution. In LangChain's 2026 survey, 59.8% of organizations use human review in evaluation and 53.3% use LLM-as-judge. Our rule: before a model grader marks anything that decides go-live, it grades a sample people have already marked, and we publish the agreement rate alongside the pass rate. If the judge and the people disagree often, the judge does not get the job.
How do you build your first eval harness?
Start with one workflow and one number. The framework below is the order we follow, and it works whether you build the harness yourself or hold a vendor to it.
- Name the workflow and the owner. One process, one person accountable for the result. "Support" is not a workflow. "First reply to billing tickets" is.
- Write the pass mark down first. For example: 92% of cases correct, zero cases that issue a refund above policy. Agree it before anyone sees a result, so nobody moves the target.
- Collect 100 to 300 real cases. Pull them from your own systems, with the known correct outcome for each. Remove or mask personal data where your policies require it.
- Define what pass means per case. Which fields must be exact, which are judged on quality, and which failures are fatal regardless of the overall score.
- Build the runner against real systems. The harness should call the same tools, data and permissions the production system will. A test against a mock tells you about the mock.
- Calibrate the graders. Have people mark a sample. Check that code and model graders agree with them before trusting the automated score.
- Run, read the failures, fix, rerun. The failure list is the most valuable output. Each failure is either a fix to the system or a new case for the set.
- Lock the set as a regression suite. Every change to the prompt, the model or the integrations reruns it before release.
The test of a vendor. Ask any AI vendor for their eval harness on your cases: the case count, the pass mark, the latest pass rate and the failure list. If they cannot produce it, they cannot tell you whether their system works on your business either.
What does an eval harness do after launch?
It turns into your early warning system. Systems nobody maintains repeat their mistakes, and AI systems also change underneath you when a vendor updates a model.
Anthropic separates capability evals, which ask what an agent can do and should start at a low pass rate, from regression evals, which ask whether it still does everything it used to and should sit near 100%. After launch, the regression suite is the part that pays for itself. It catches the prompt tweak that fixed one complaint and broke three other cases, and the model upgrade that changed how dates are read.
Feed it from production. Every complaint, escalation or correction a person makes becomes a candidate case. Over months, the set comes to look like your actual business, not the version of it someone imagined at kickoff. That is the core of how we run and improve systems monthly, and of our governance, evaluation and measurement work.
If you already shipped AI without a harness, the first step is the same: build the test set from real cases and measure what you have. That is what an AI Rescue starts with, and it ends in a written verdict to fix, rebuild or retire. For the wider set of services we build harnesses into, see our services.
Questions we get asked
- What is an eval harness in AI?
- An eval harness is the test rig that runs an AI system against a fixed set of cases, scores each result the same way every time, and reports a pass rate against an agreed standard. Anthropic defines it as the infrastructure that runs evals end to end. It turns the question of whether your AI works from an opinion into a number you can check after every change.
- Is an eval harness the same as a benchmark?
- No. A public benchmark measures a model on a standard test set someone else wrote. An eval harness measures your whole system, including prompts, tools and data connections, on your own cases. Benchmarks help shortlist models. A harness tells you whether the system you built handles your invoices, tickets or contracts well enough to go live.
- How many test cases do I need to evaluate an AI agent?
- Anthropic suggests 20 to 50 tasks drawn from real failures as a starting point while building. For a go-live decision we use 100 to 300 real cases. At 20 cases one result moves the pass rate five points; at 200 it moves half a point. Weight the set toward cases where an error costs money.
- Can I trust an LLM to grade another LLM's answers?
- Partly. A 2023 study by Zheng and colleagues found strong model judges agreed with human preferences over 80% of the time, about the same rate humans agree with each other. That was on general chat questions. Before a model grader decides anything that matters, check it against a sample people have already marked, and report the agreement rate.
- Who should own the eval harness, IT or the business?
- Both, with clear roles. Engineering builds and runs the harness. The business owner of the workflow sets the pass mark, supplies the cases and decides what counts as a fatal error. If engineering sets the standard alone, the test measures what is easy to check rather than what costs the business money when it goes wrong.
- What should I ask an AI vendor about evaluation?
- Ask for four things on your own cases: how many cases they tested, the pass mark agreed before testing, the latest pass rate, and the list of failures with causes. Ask whether the test runs again before every release. A vendor who can only show a demo or a public benchmark score has not shown you the system works on your business.
- Do I still need guardrails if I have an eval harness?
- Yes. They do different jobs. A harness tests the system offline and tells you what share of cases it gets right before release. Guardrails act on live traffic, blocking or retrying a single bad output. You need the harness to decide whether to ship, and guardrails, spend limits and a kill switch to limit damage once you have.
Sources
- Demystifying evals for AI agents (January 2026). Anthropic
- State of Agent Engineering (2026, n=1,340). LangChain
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (Zheng et al., 2023). arXiv
- 2026 AI Impact Survey (n=950). Grant Thornton
- The GenAI Divide: State of AI in Business 2025. MIT Project NANDA
- Eval harness (glossary). Braintrust
- Eval harness: what it is, how to use it, and why you should care. DeepEval