LLMs, GenAI, RAG, agents, evaluation · insight-1573
Assert required steps and forbidden actions in a trajectory instead of matching an exact path
- Evidence type
- practitioner heuristic
- Difficulty
- hard
- Roles
- Applied AI, Data scientist, ML engineer
- Industries
- retail, banking
Summary: situation, action, reason, boundary
Situation
An agent that issues refunds reaches the right final state, but sometimes skips the identity check the policy requires.
Action
Add trajectory assertions such as the verification call happened before the refund, a forbidden tool was never called, and a limit was not exceeded, and run them beside the end-state check on every test.
Reason
End-state grading, as in tau-bench, compares final database state with a goal state, so it cannot see how the state was reached; targeted step assertions cover that gap without fixing one path.
Boundary
Agents bound by policies, ordering rules or safety constraints.
Symptom or risk
An end-state check passes while a policy violation went unseen, and exact-path matching instead fails valid variations.
Exceptions
Pure information tasks with no policy need only outcome checks.
Trade-offs
Assertions must be written and maintained per policy.
Pitfalls
Over-specifying the order of steps that are genuinely interchangeable.
Lessons and concepts
Claims and their sources
tau-bench judges success by comparing the final database state with the annotated goal state and reports pass^k reliability over repeated trials.