Agentic Engineering

How do you know the AI is good enough?

We write the check before we build. An eval is a set of tasks, a way to grade the answers and the result you accept, written down beside the test cases.

In plain English

A test checks code. Given this input, the code must return this output. It passes or it fails.

An eval checks an AI model on a task where the answer can differ each time. We run the model on a set of examples, score the results, and see whether they fall inside the range we expect. An eval tells you how well the model does and how often, not just yes or no.

Google's paper The New SDLC With Vibe Coding (opens in a new tab) draws the same line. Tests verify the parts of a system that give the same answer every time. Evals verify the parts that do not. It also says that tests and evals are how you tell an agent what "correct" means, and that you write them before the code.

Tests and evals, side by side

The two are relatives, not rivals. Anthropic, the maker of Claude, calls an eval "a test for an AI system" (opens in a new tab): you give the AI an input, then apply grading logic to what comes back. The difference is in the answer you expect.

A test and an eval, side by side.
What differsTestEval
The questionDoes this code do what it should?How well does this AI do this kind of work?
What it checksOne behavior, such as a discount calculation.A set of tasks, scored together.
Same input, same result?It should. A test that sometimes flips is flaky, and we fix it.No. The model can answer differently on each run, so each task runs more than once.
The resultPass or fail.A success rate, such as 7 of 10 tries. Teams also track the cost and how many steps the agent took.
When it runsOn every change to the code.Before launch and on every change, then next to monitoring of real use.

A test is often one check inside an eval. For coding agents, Anthropic advises unit tests to verify correctness and a rubric scored by an AI judge for code quality.

A classic test expects input A to give output B. An agent can reach the goal in many ways, so a single pass or fail is not enough.

Where each fits in the software life cycle

Software teams already separate two questions. Are we building the product right? That is verification (opens in a new tab): does the build match its specification? Are we building the right product? That is validation: does it meet the real need? The pairing is credited to the software engineer Barry Boehm.

Automated tests are verification: they check the code against its specification. Evals are verification too, against a looser specification: a set of tasks and a rubric for a good answer. Neither tells you that you built the right agent. An eval gets close only when its tasks come from real use and real users judge the answers. Whether enough people need the agent at all is a product question. No test or eval answers it. That mapping is our reading. No source we read states it.

  • While we build: tests and evals run in the same pipeline. Anthropic calls automated evals "the first line of defense".
  • After launch: monitoring of real use shows where behavior drifts from what the evals assumed.
  • Over time: people read transcripts, review samples and read user feedback. Their judgment calibrates the automated checks.

Anthropic compares this to the Swiss cheese model from safety engineering. No single layer catches every issue. Another layer may catch a failure that slips through. Ours are tests, evals, independent AI review and, where the risk calls for it, an engineer review. See who checks the AI's work.

When we write them

Evals belong to the Shape phase of our process, with the requirements. We write them before we build, for tasks where an AI agent does the work. The other steps we take before building are on how we work.

We write a range, not a single number. A model will not score the same every time, so the question is whether it stays inside the range we agreed.

How an eval is scored

These are the points from Anthropic's article that we think matter most.

  • Three kinds of grader. Code checks a condition: a test passes, a lint check is clean. It is fast and repeatable, but it can reject a valid answer that looks different. An AI judge scores the work against a rubric. It is flexible, but it is not deterministic and needs calibrating against people. A person reading the work is the gold standard, and the slowest and most expensive. Anthropic's rule: code where possible, an AI judge where necessary.
  • Check what the agent produced, not the steps it took. A flight agent may say it booked a seat. The outcome is whether the booking exists in the database. Anthropic calls checking one fixed sequence of steps too rigid.
  • Run each task more than once. Say an agent solves a task 75% of the time on one try, and the tries are independent. Three tries in a row all succeed about 42% of the time (0.75 × 0.75 × 0.75). Anthropic names two measures: pass@k, at least one success in k tries, and pass^k, all k tries succeed. Use the first when one success is enough. Use the second when customers need consistency.
  • Two kinds of eval. Capability evals start with a low pass rate, a hill to climb. Regression evals sit near 100% and tell you the agent still does what it did before. A task moves from the first kind to the second once it is solved.
  • Start small, from real failures. Anthropic suggests 20 to 50 simple tasks drawn from real failures. A task is fair when two experts would reach the same verdict. A score of 0% across many tries more often means a broken task than a broken agent.

That last point is why the example below checks a check. In Anthropic's audit of a public coding benchmark, one task's tests assumed a file path that the task never stated.

An example from our own work: can the check fail?

A check that cannot fail tells you nothing. So we test our checks too. This example checks a test, not a model. It uses the same idea.

When we moved our agentic engineering pages to new URLs, every old URL had to keep working. So we wrote one spec with four tests. It checks that each old URL redirects to its new page. On the merged change, all four tests pass.

Then we broke the code four ways, one at a time, and ran the spec each time:

  1. We changed one redirect from permanent (301) to temporary (302). Caught by: The test that every old URL redirects with a 301.
  2. We added a rule that sends a new page somewhere else, so a visitor would hop twice. Caught by: The test that every redirect lands in one hop.
  3. We put an old URL back in the list of live pages. Caught by: The test that the old URLs are gone.
  4. We removed the live-site check from our after-launch script. Caught by: The test that the script runs that check.

Each break made exactly one test fail, and a different test each time. The four tests together catch all four breaks. We ran this on 5 November 2026 and kept the output in our repository.

We show two examples: this real one from our own work, and an illustrative one below. The real one comes from that change in our website repository. The repository and its review trails are private.

An illustrative example: evals for an AI that drafts quotes

This example is made up to show the pattern. It is not a client case.

Say an AI agent turns a customer's enquiry into a draft quote: "We need 50 office chairs delivered to Munich by 1 December." The evals check each draft in three layers.

  • Rule checks that need no AI. The quantity, the currency and the delivery date appear in the quote. VAT is stated, or the quote asks whether to include it. Every product and price matches the approved price list. Code checks these the same way every time.
  • One judged check, against a written rubric. An AI judge reads the draft for one rule: it answers what the customer asked, in words fit to send.
  • A person approves each quote. Nothing reaches the customer before that. We keep the AI draft, the check results and the person's edits together, so you can see later what the AI got wrong and what the person changed.

The order follows the rule above: code where possible, an AI judge where necessary. The person comes last because a quote commits your company to a price.

Tools you can start with

Two open-source tools can run evals like these. Promptfoo (opens in a new tab) tests prompts and agents from a simple config file. Its checks include contains and javascript for rule checks and llm-rubric for a judged check. Inspect AI (opens in a new tab), from the UK AI Security Institute, is a Python framework for evals of language models. Both are free under the MIT licence. We name them as starting points, not as an endorsement: we have not compared them with other tools.

When the average does not matter

An eval reports a success rate. Some failures make that rate beside the point. One leak of another customer's data blocks a release, whatever the success rate. Access and data rules are hard gates: they must hold on every run, not on average.

Quality, speed and cost are different. We measure those across runs. A hard gate is not proof of safety: passing a finite set of checks does not prove that no other leak exists.

Who checks the AI's work, how our process changes, with a person deciding, and agentic engineering, not vibe coding.

Our sources. "Demystifying evals for AI agents" (opens in a new tab) by Mikaela Grace, Jeremy Hadfield, Rodrigo Olivares and Jiri De Jonghe, Anthropic, 9 January 2026. We read it on 5 November 2026.

Start a Project