Salar Saeedi

Product management · Analysis

How to test whether an AI agent did the work

Use end-state checks for actions, explicit permission fixtures and trace review for diagnosing failures in agent products.

Salar Saeedi2 min read
Three-stage illustration — How to test whether an AI agent did the work

A support agent tells a buyer their refund was created. During a test the conversation reads well, but the merchant system has no refund record. An acceptance test that grades only the conversation would let that failure through.

Write the expected outcome in the system of record

Anthropic distinguishes an agent’s transcript from the final environment state. For a refund, specify the original order, allowed amount and record the test expects to exist. If the request requires approval, the expected outcome might be a pending review case.

Source · Anthropic · Evaluating AI agents

Make permitted and blocked scenarios concrete

Create eligible and ineligible sample transactions, a duplicate request and a temporary provider failure. Run them in a sandbox with test data. Compare both the customer-facing text and the changes written to the payment or review system.

Use traces to diagnose missed outcomes

Keep traces for evaluation and correlate them with the test order. If a refund is missing, determine whether the action was never attempted, was rejected, or failed before recording. Add each recurring pattern to the evaluation set.

Source · Anthropic · Evaluating AI agents · OpenAI · Evaluation best practices

What to take away

Set a release criterion for accidental side effects and outcome accuracy separately. A refund test should verify the exact recorded amount and the text the customer received.

References

Related work in the portfolio