Home » Evaluating Tool-Using Agents by Their Final State

Evaluating Tool-Using Agents by Their Final State

Comparing two ledgers reveals one changed row and preserves the neighboring rows.

Evaluate a tool-using agent by comparing the resulting business state with the change the user requested. Verify the intended records and assert that neighboring records did not change. Use the transcript and tool calls to diagnose how the agent got there and to check constraints that cannot be inferred from the final state.

Two identical final states, two different grades

We calibrated a small evaluator with four scripted action lists. Both shipments started on Thursday. The task allowed writes only to A and required its final date to be Friday. The evaluator compared both final records and checked the target of every write. The actions were supplied directly, so these grades measure the evaluator on known cases. No agent or language model ran.

Two identical final states, two different grades
Run on shipments A and B Final dates (A / B) State / permitted writes
Report success, write nothing Thursday / Thursday Fail / pass
Update A once Friday / Thursday Pass / pass
Update B once Thursday / Friday Fail / fail
Update B, restore B, then update A Friday / Thursday Pass / fail

Suppose the last run also sent a dispatch notice every time a date changed. The final rows look exactly like the successful one-write run. Restoring B cannot recall a notice already sent. For a production grader, capture the event identity and check which effects actually occurred. For this fixture, the write to B alone was enough to fail the scope check.

Give the evaluator a small database

Suppose a user asks to reschedule shipment A to Friday and leave other shipments alone. Create two shipments with similar descriptions and different stable IDs. Seed the requested record and its neighbor with known dates and status. The fixture should give a tool something real to change without involving production data or customers.

Write an expected delta. Shipment A should have Friday as its dispatch date. Its status and recipient should remain unchanged. Shipment B should remain exactly as seeded. Decide whether legitimate audit rows or version increments are part of the expected state. Comparing an entire database byte for byte would make otherwise correct updates fail on autogenerated values.

τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains uses terminal database state as part of its evaluation of tool-agent-user interactions. Use that idea to build an oracle for your own domain, where affected fields, permitted side effects and success criteria are known.

Score task completion and policy separately

A success message with no update fails the state check. An update on shipment B fails both the target and scope checks. An agent could also update B, then restore it and update A correctly. The final rows would pass, but an audit stream could reveal that the agent triggered a temporary change or a notification. Assert constraints that matter in the event log or a test adapter at the point where they apply.

For outcomes that can legitimately vary, compare normalized state. “Friday” might expand to a date in the account's timezone. Specify the reference time and what range or value is acceptable. Keep the oracle's expected state outside the agent's accessible tools while allowing the agent to see the ordinary task requirements.

Build a grader that can fail

Check the grader against known cases: unchanged data, correct delta, extra changed row and correct row with a forbidden notification. Reset fixtures between trials and capture the seed or fixture version, outcome and effect log. If an event is asynchronous, define the settling condition and deadline rather than sleeping an arbitrary interval.

The repository evaluation guide gives a broader setup for evaluating coding changes on a repository. Business-state grading applies that discipline to a service with explicit records and write effects.

Report errors the owner can act on

Count wrong target, missing effect, collateral write and forbidden effect separately. An aggregate pass rate cannot tell a team whether to fix lookup, validation, result reporting or action gating. Preserve a sanitized state diff and event identity for each failure. The four scripted shipment cases above calibrate the grader. Its usefulness depends on whether it represents actions your application actually lets an agent take.

You may also like