All field notes

Agent evals: score the trajectory and the outcome

Evaluate complete runs with state checks, trace inspection, repeated trials, and calibrated judgment.

Published Documentation reviewed Updated

trajectory-evals, observability, regression-testing

Evaluate the work an agent actually performed. For a coding task, inspect the resulting patch and tests; for a service task, query the resulting state. The final response can be confident even when a tool failed.

Anthropic’s agent evaluation guide distinguishes transcripts from outcomes and combines deterministic checks, model-based grading, and human judgment. It also separates capability evaluations from regression coverage. Passing tasks remain useful regression tests.

A task fixture to start with

This is an illustrative schema to implement in your own runner:

{
  "task": "fix-date-parser",
  "initial_revision": "fixture-r1",
  "acceptance": ["month regression passes", "existing parser tests pass"],
  "forbidden_effects": ["publish package", "modify unrelated fixtures"],
  "limits": { "model_turns": 8, "wall_seconds": 180 },
  "trials": 5
}

The limits and trial count are examples. Choose them for your latency, cost, and reliability requirements.

Preserve enough to diagnose a failure

For each trial, store the model identifier, harness revision, prompts and tools versions, dataset revision, environment image, tool arguments and results, usage, and stop reason. Keep sensitive content under an appropriate access and retention policy.

Score two views:

  1. Outcome: did the acceptance checks pass, and was the final state correct?
  2. Trajectory: did the run obey permissions, avoid repeated writes, handle failures, and stay within its limits?

Do not demand one exact tool sequence when several sequences can satisfy the task. A trajectory check should enforce a meaningful invariant, such as “approval preceded deployment.”

Compare repeated runs

Keep the fixtures and environment consistent across candidates. Report per-task pass rates, cost, latency, and stop-reason distributions. Decide whether you care about at least one success in several attempts or consistent success across attempts; these answer different product questions.

A model judge needs calibration against expert labels. Changing the judge’s model family alone does not establish validity. Review disagreements and test for position bias when comparing outputs.

Regression exercise

Inject a timeout, a duplicated tool response, a stale checkpoint, and a missing permission. Verify the terminal state and resulting side effects for each case. Then remove an important observation from context and check whether the grader catches a plausible but unsupported answer.

Keep stable passing cases when they protect behavior users depend on. Add incidents to the suite; do not silently change labels or thresholds to pass a release.

Try the fixtures: the loop inspector exposes authored examples of five run paths. They are teaching fixtures, not benchmark results from a live agent.