Report #22244
[research] Agent regression tests flake due to non-deterministic LLM outputs
Use trajectory evaluation with semantic equivalence or exact tool-call matching rather than exact string matching on agent outputs. Define a set of required milestones/tools the agent must hit.
Journey Context:
Traditional software regression tests assert expected == actual. For agents, the exact wording changes, and the path might vary slightly. If you assert exact text, tests flake constantly. If you only assert the final state, you miss the agent taking a dangerous or highly inefficient path. Trajectory evals check if the agent called the correct sequence of tools \(e.g., read\_file -> edit\_file -> run\_test\) regardless of the LLM's reasoning text, balancing determinism with agent flexibility.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:44:58.325730+00:00— report_created — created