Final-State Grading for Agents
In this article
- Explain why a final-state check reads the system of record after a run instead of the agent's last message.
- Write a final-state oracle with assertions on the required change and on changes that must not happen.
- Keep a test environment repeatable by seeding it and stubbing a flaky outside service.
- Name two real benchmarks that grade agents by the end state.
- Terms defined here: environment seed, final-state oracle.
Overview
An agent finishes a task and writes "Done, your refund is on its way." Did it do the task? The sentence cannot tell you. Only the system it changed can. Brightline, a made-up home-internet provider, has a support assistant that can look up orders and refund at most $50; its team grades the router refund with a check that reads the order system after each run.
You will see why grading the last message lets a wrong run pass, how to set up a run so its end state can be checked, and how to write that check: the change you need, and the changes you must not get. You will also keep a flaky outside service from failing good runs.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Why the reply is not the result
- Seed, run, read the order system
- Writing the oracle
- Two runs, one oracle
- What the agent cannot see
- The flaky payment sandbox
- Real oracles
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions