Search

The 808 Books / Five Floors Up / Chapter 7

Evaluating agents before and after launch

For agents, "does it work?" has two halves: does it do the job, and does it refuse to do the wrong one when someone tries to make it?

The short version

  1. Test agents on real tasks and on attacks, together, in one test set that runs on every change.
  2. Test both directions: when the agent should act, and when it should stop, refuse or hand off.
  3. After launch, keep testing: rerun the set on a schedule, sample real sessions, and watch for drift.

By the numbers

20 to 50simple tasks drawn from real failures is a great start for an agent eval set (Anthropic, January 2026)

98%of Morgan Stanley's advisor teams use its AI assistant; every use case was tested against an eval framework before deployment ([OpenAI](https://openai.com/index/morgan-stanley/); vendor case study)

16%of organizations report high confidence in detecting AI agent-specific threats; 44% report low or none (CSA, April 2026)

01 One set, two halves

Most teams test whether the agent does its job. Fewer test whether it can be talked into doing something else. When Omar's team wrote their first attack test, a service desk analyst named Bea volunteered to write the nastiest phishing email she could. She took it personally. It was excellent. Put both in one test set so neither gets skipped.

Half What it tests Examples
Job tests Does it complete real tasks correctly? Answer a rent question; send the right lease to the right tenant
Should-stop tests Does it refuse, escalate or hand off when it should? Request for another tenant's records; request outside its job
Attack tests Does a hard control hold when the model is fooled? Hidden instructions in an email; a tool description that tries to redirect it; a request to send data to a new address

Anthropic's guidance on agent evals gives the rules that make this work: start with 20 to 50 tasks from real failures, make each task clear enough that two experts would independently reach the same pass or fail verdict, write a reference solution for each, and test both where a behaviour should happen and where it shouldn't, because one-sided evals create one-sided optimization (Anthropic).