Evaluation and regression testing for agents
Software engineering has a decades-old answer to "how do we know a change didn't break anything": tests that run before the change ships. Agentic systems need the equivalent — and because their behavior is probabilistic rather than deterministic, building that equivalent takes a bit more care.
Start with what "correct" means
Before anything can be measured, success has to be defined in terms specific to the workflow — not "the agent responded" but "the extracted invoice total matched the source document" or "the ticket was routed to the queue a human reviewer would have chosen." Vague success criteria produce evaluation results nobody trusts.
Build a representative case set
A regression suite is a collection of real, representative inputs with known-correct outputs, covering the common path and the edge cases that have actually caused problems. It doesn't need to be exhaustive on day one — it needs to grow every time a new failure mode is found, so the same mistake can't ship twice without being caught.
Run it before every change
The suite should run automatically whenever the agent, its prompts, its tools, or its underlying model change — the same discipline as a CI pipeline for code. A change that drops performance on the suite is a regression, whether or not anyone anticipated it.
Watch for drift in production
A regression suite catches known failure modes. Drift monitoring catches the ones nobody wrote a test for yet — a slow decline in a live metric like escalation rate, reviewer override rate, or task completion, compared against the baseline set during the pilot. Drift is often the first signal that something upstream has changed: a data source, an integration, real user behavior.
Close the loop
Evaluation is only useful if its results change something. A regression that's flagged and then ignored isn't evaluation, it's a dashboard. The value comes from feeding results back into what actually gets adjusted — the prompt, the tool, the guardrail, or the checkpoint that needs to move — so the system genuinely improves over time instead of just being measured.
