Phase 10 · Agentic AI/
Lesson 10.9advanced2 h 45 min⚡ live demo

Evaluating agents

Trajectories, graders, pass@k vs pass^k, compounding error, benchmarks and harnesses

You cannot improve what you cannot measure, and agents are the hardest systems in this path to measure: they take many stochastic steps, change the environment, and can succeed by different routes. Teams that win build evaluation harnesses before they build features. This lesson gives you the vocabulary, the two success metrics everyone confuses (pass@k and pass^k), the compounding-error math that explains why agents feel unreliable, the benchmark landscape, and a recipe for your own harness — which you will build in 10.12 Project: build a research agent with tools, an MCP server and an eval harness.

You'll be able to

  • Define task, trial, grader, trajectory and outcome, and choose among code-based, model-based and human graders
  • Compute pass@k and pass^k from trial data and explain what each measures
  • Derive end-to-end success from per-step success (pⁿ) and compute the per-step accuracy a reliability target requires
  • Read agent benchmarks critically (saturation, contamination, infrastructure noise, eval awareness) and build a task-based harness

Key ideas

  1. Agent evals grade trajectories and end states under nondeterminism; vocabulary: task, trial, trajectory, outcome, grader (code-based, model-based, human).
  2. pass@k = 1 − (1 − p)^k measures achievable success with a verifier; pass^k = p^k measures consistency without one; report both.
  3. End-to-end success ≈ pⁿ; a 20-step task needs ~99.5% per-step accuracy for 90% success — fix it structurally (fewer steps, verification + retry, checkpoints).
Show 3 more key ideas
  1. Verification with r retries lifts per-step success to 1 − (1 − p)^(r+1); this is the mechanism behind coding agents' reliability.
  2. Benchmarks (SWE-bench Verified, τ-bench, GAIA, WebArena, OSWorld, BrowseComp, AgentBench) each measure something narrow; watch saturation, contamination, infrastructure noise and eval awareness.
  3. Build your own harness: 20–50 real tasks, end-state graders, k trials, cost per success, stored trajectories, capability vs regression suites, grader audits.

Suggested path through this lesson