Fieldnotes / engineering

Agent evals

Explanation

Task, trial and grader

An evaluation task specifies what the agent should accomplish. One execution is a trial. A grader inspects evidence against defined criteria.

Evaluate the agent with its harness, tools and environment, not just an isolated model response.

  1. 0s A task asks for an authentication fix. Define what success will look like.
  2. 7s Run one trial with the agent system. The system returns a patch and evidence.
  3. 14s A grader inspects the result. It applies the stated success criteria.
  4. 21s The grade describes this one trial. It is not a guarantee about future runs.

Check actual behavior

Instead of grading a claim that the bug is fixed, run the changed code on inputs with known expected outcomes.

Grade observable results. A good explanation can accompany an incorrect patch.

  1. 0s The agent says the bug is fixed. A statement is not the behavior itself.
  2. 7s Run the patch with an empty password. The expected behavior is rejection.
  3. 14s The empty password is rejected. This test has passed.
  4. 21s Record the observed result for grading. Other required cases still need testing.

Catch an overbroad fix

Patch A rejects all logins. It fixes the empty-password case but breaks legitimate users. A regression case reveals the overbroad change.

A narrow success test can reward the wrong solution. Include behavior that must remain valid.

  1. 0s Patch A rejects every login. Both bad and valid passwords fail.
  2. 7s The empty-password case is rejected. That expectation passes.
  3. 14s The valid-password case is also rejected. That expectation fails.
  4. 21s The grader rejects this overbroad fix. Passing one case was insufficient.

Repeat trials independently

Repeated trials reveal variation in the agent system. Each should start from the intended clean state so one trial does not contaminate another.

Repeated success measures consistency on these tasks. It does not make the system deterministic or prove general safety.

  1. 0s Run the same task more than once. Each trial starts in an isolated state.
  2. 7s Trial 1 produces a result. Record the outcome and evidence.
  3. 14s Trial 2 runs from a clean starting point. Its result may differ.
  4. 21s Report the distribution of outcomes. Do not show only the best attempt.

Know the grading limits

A suite collects representative tasks. Deterministic tests and model graders cover different properties, and graders themselves need calibration.

Passing a suite supports claims within its coverage. Keep held-out cases and inspect grading errors before making broader decisions.

  1. 0s Collect tasks that represent real use. Include known failures and valid behavior.
  2. 7s Apply graders suited to each criterion. Some judgments need human calibration.
  3. 14s Inspect false passes and false failures. A flawed grader can reward wrong work.
  4. 21s Use the evidence with stated limits. A passing suite is not automatic release.
Read the guide

Helpful first: Harness engineering.

The idea

An evaluation is a task plus evidence and grading rules. A trial is one attempt; a suite collects tasks. Evaluate the model together with its harness—the instructions, tools, and execution loop that let it act. A grader can inspect produced code, stored records, or a trace of tool interactions. Repeating a task measures variation; it does not make the agent deterministic.

Where it helps

Manual spot checks work for exploration but leave a weak basis for changing models, prompts, or tools. A fluent completion message can hide an incorrect result. Turn acceptance criteria into inspectable evidence before delegating recurring engineering work.

A team adopting agents needs a shared definition of successful delegated work before expanding autonomy. Evals turn familiar acceptance tests and review habits into repeatable evidence for choosing prompts, tools, and models.

Illustration: ask a coding agent to fix an empty-password authentication bug. Patch A rejects every login. It passes the new empty-password test but fails an existing valid-password test. Patch B passes both. The second patch is ready for further review, not automatically safe to release. These two cases are deliberately incomplete authentication coverage.

What you will be able to check

  • Write a task with observable success criteria and at least one behavior that must remain unchanged.
  • Separate an agent failure from a broken test environment using retained evidence.
  • Compare two agent configurations across repeated trials without reporting only the best attempt.

What changes in the team

Today
An engineer implements a change, runs selected tests, and asks a colleague to review the patch and acceptance criteria.
With an agent
The team saves representative tasks, runs the agent from a clean starting state, and grades each produced artifact against retained acceptance and regression checks.
Still your responsibility
Engineers own the task definition, grader quality, permissions, ambiguous failures, and the release decision.

Work through an example

  1. Define the task before running the agent. For the authentication example, record the starting revision, synthetic users, expected login behavior, and a time budget. Keep grader tests outside the agent’s editable submission. Include valid login, empty input, and a separate unfamiliar case for later validation.
  2. Run the actual configuration being considered: model, prompt, tool definitions, permissions, and harness version. Save the patch and tool trace. Start each trial from the same clean fixture so a previous attempt cannot leave a helpful file or changed database behind.
  3. Grade the artifact with trusted checks. Apply the patch and execute both the new requirement and existing behavior tests. Confirm the checks actually ran: a missing dependency or timeout is not proof the patch is wrong. An agent exhausting its agreed time budget still failed that task attempt; distinguish that from a broken evaluation environment. Inspect traces to explain failures without demanding one exact tool sequence.
  4. Compare the current and proposed configurations on the same tasks and budgets. Retain every attempt, including timeouts; report passes over attempts, failure categories, and time spent. Keep a separate set of tasks out of prompt tuning. Review unexpected results before accepting a change, then add newly discovered production failures to the suite.

The engineering decision

Make required correctness checks explicit. Use code to check concrete outcomes; use a rubric and human-calibrated model grading for subjective qualities such as explanation clarity. Do not average an authentication failure away with good prose. Passing a finite suite supports a bounded decision, not a general reliability guarantee.

  • Optimizing only the new test rewards a patch that disables every login; preserve regression checks.
  • Reusing fixtures or cached grades can produce a false improvement; reset state and identify each run distinctly.
  • Letting an agent rewrite its own acceptance tests undermines the evidence; grade the submitted artifact independently.
  • Treating evaluation success as permission enforcement confuses measurement with access control; tool and runtime controls must enforce boundaries.

Try it with your team

Catch a plausible but broken patch

  1. Choose one small historical bug in a disposable copy and write the desired outcome plus an existing behavior to preserve.
  2. Create a deliberately bad candidate that passes only the new requirement; confirm your grader rejects it.
  3. Run two agent configurations three times each from clean fixtures, using identical tasks and limits.
  4. Inspect all six results with a teammate and record the decision, uncertainty, and one missing case.

You have an answer when…

  • The grader distinguishes the deliberately bad candidate from a candidate satisfying both checks.
  • A teammate can trace every recorded result to its artifact, configuration, and test output; three trials remain a learning exercise, not a reliability estimate.

Read further

Which recent agent-assisted change looked successful but needed correction, and what observable check would have caught it?

Original video comparisons