Pular para o conteúdo
← Back to Skalablog

Published article

What is agent regression testing and why does it miss bugs?

Software Engineering

Agent regression testing is the practice of scoring agent behaviour on real production traces and blocking merges that make it worse. Sofia Jakovcevic of Arize AI laid out a five-step loop at AI Engineer NYC 2026: select a trace dataset, build evaluators, run a baseline experiment, compare the change, and gate it in CI. A support-agent example showed a 17-point safety gain paired with a 17-point task-completion loss.

Why agent regression testing starts at runtime

Agent regression testing starts at runtime because the code that ships rarely contains the behaviour that breaks. A system prompt edit is a few characters in a file; its effects unfold across tool calls, sub-agent handoffs and step counts that only exist once the agent runs. Arize AI, an observability backend for AI systems, builds tooling around this gap.

Jakovcevic's example is a refund or support agent that a security engineer asks to confirm before taking each action. The prompt change is one line of Markdown. Safety rises 17 points; task completion falls 17 points, because confirmed actions leave more sessions unfinished. The two scores average out to net zero, which is exactly the outcome a dashboard summary would hide.

Her framing is that the diff tells you what changed while the trace tells you what happened. In conventional software the logic is written down before runtime. In an LLM agent the decision path emerges during execution, so the observable evidence lives in structured logs rather than in source control.

Treating the comparison as another standard may be overstating it. The stronger and more defensible version is narrower: for agents whose behaviour is non-deterministic, static review cannot establish that a change is safe, so traces become necessary evidence in the review process.

Five steps to build an agent regression testing loop

A working agent regression testing loop has five stages, each of which can fail on its own. Jakovcevic presented them in order, starting from production data and ending with an automated gate that blocks merges, so the loop is repeatable rather than a one-off audit.

Step 1: Select a representative trace dataset

Pull real production traces instead of synthesizing inputs. Jakovcevic names four categories worth capturing: the average user workflow, known failure points where evaluators often score low, rarer edge cases, and successful workflows that the next change must not break. A demo dataset in her walkthrough has 100 rows.

Step 2: Build evaluators for the metrics you care about

Turn subjective dimensions into numeric scores. Hallucination, tool trajectory and step efficiency are hard to review by hand, so an LLM-as-a-judge evaluator scores a trace or span against a written guideline and returns a label or a 0-1 score. Code-based evaluators suit deterministic checks; model-based judging suits the non-deterministic ones.

Step 3: Run the baseline experiment

Run the current agent against the dataset and score every output. That result is the baseline against which any prompt, tool, handoff or model change is compared. In the SDK this is an experiment run; the same workflow exists in the UI and through the API.

Step 4: Change one thing and compare

Rerun the suite with the candidate change and diff the scores. The value is that iteration happens without deploying, so a team can test several prompt variants or a more expensive model and show the trade-off numerically instead of arguing about it.

Step 5: Gate the merge in CI

Wire the experiment into a CI job so each pull request runs against the evaluation suite. If the change fails the regression criteria the team agreed on, it does not merge. That converts an observability signal into a release decision.

Where the loop runs: playground, SDK and CI

The loop can run in a browser playground, in code, or in a CI job, and the right choice depends on who makes the change. Arize provides a prompt playground for testing a single agent configuration and an agent playground that connects to a multi-agent system running remotely over HTTP, so each dataset record calls the live agent and gets scored on the way back.

Programmatic runs use the SDK, REST API or CLI. In CI, an experiment workflow attached to a pull request produces the pass or fail signal that gates the merge. The mechanism matters less than the placement: whichever path a change takes, the same evaluation suite has to run.

How one prompt line swings safety and task completion

A single added line can improve one metric while damaging another, and the average can hide both. The support-agent case is the clearest illustration: confirming every action raises action safety by 17 points while dropping task completion by 17 points, because sessions that were previously finished now stall on confirmation prompts.

The table below summarises the trade-off Jakovcevic reported in her AI Engineer NYC 2026 session. Values come from her demo dataset and platform walkthrough, not from an independent evaluation.

Trade-off and practice table

ChangeAction safetyTask completionWhat to watch
Baseline promptReference scoreReference scoreEstablish before editing
Add confirm-before-action line+17 points-17 pointsMore unfinished sessions
Test multiple prompt variants side by sideCompared per variantCompared per variantCost and latency per run
Prompt, tool, handoff or model changeMeasured per experimentMeasured per experimentRegressions outside the target metric

Re-run the baseline whenever the evaluation suite or the dataset changes. A score only means something relative to a fixed suite, and an edited evaluator resets the comparison for every prior experiment.

Every failure should become a test

Production failures should return to the regression suite as new cases, so the suite grows with the system instead of ageing out. Jakovcevic calls this closing the loop: once a failure appears in the traces, it is captured as a dataset row, and the fix is only accepted if that row stops failing without breaking the protected successful workflows.

A suite built this way becomes the institutional memory of an agent. Each incident leaves a permanent test, and the cost of the next regression falls because the case already exists. That is a practitioner recommendation from the talk rather than a measured causal result.

The honest limitation is that this only works if somebody curates the failures. Automated capture without review turns the dataset into a pile of hard cases with unclear expected behaviour.

Closing the loop at agentic speed

The next step Jakovcevic described is letting coding agents read the traces and propose fixes. A coding agent that only sees the repository is working from static code; one connected to the observability backend can inspect the trace that failed, propose a change, and run the experiment before opening a pull request.

Arize publishes a public repository of agent skills that connects coding assistants to its platform features. Whether that produces better fixes than a human engineer is not established by the talk, and no comparative result was offered. Treat it as a workflow direction with clear mechanics and unproven payoff.

The bottleneck she names is human review of dashboards, triage and pull requests. Removing that bottleneck still leaves a gating question: who decides which evaluation thresholds count as acceptable regressions, and who signs off when an agent proposes a fix that passes.

Frequently asked questions

  • How does agent regression testing differ from traditional regression testing? Traditional tests compare deterministic outputs against expected values. Agent regression testing scores behaviour on production traces because a prompt change produces many possible trajectories that no static test can enumerate. The evidence therefore comes from runtime logs and model-based evaluators.
  • Is an LLM-as-a-judge evaluator accurate enough to gate a merge? It is a measurement tool with its own error rate, so it needs calibration against human labels before it blocks releases. Jakovcevic recommends it for non-deterministic checks alongside code-based evaluators for deterministic ones. Teams should treat the score as evidence, not ground truth.
  • What belongs in the evaluation dataset? Four categories: the average workflow, known failures, edge cases, and successful workflows you want to protect. Skipping the last category produces a suite that proves a fix works while missing what it broke.
  • Can this run without deploying to production? Yes. The baseline and candidate runs happen against a stored dataset, so comparisons occur in a staging or experiment environment. Only the traces that seed the dataset need to come from real traffic.
  • What did the 17-point result actually measure? It measured scores on a support-agent demo dataset shown during the AI Engineer NYC 2026 talk, using action safety and task completion evaluators. It is a demonstration of a trade-off, not an independent benchmark of any model or evaluator.
  • Does connecting coding agents to traces remove the need for review? No. The talk argues that agent-proposed fixes can speed up the investigation step. Deciding regression thresholds and approving the change remained human responsibilities in the flow as presented.
  • How large should the dataset be? The demo used 100 rows, which is enough to surface a coarse trade-off. Dataset size should follow the variety of behaviours you need to protect rather than a fixed number.
  • Where does Gustavo Dev Doido fit into this discussion? Gustavo Dev Doido is a Brazilian developer educator whose Skala Blog content covers applied engineering topics. His material is a useful comparison point for how engineering lessons get written up and shared beyond a conference talk.
  • What is Crazystack Typescript? Crazystack Typescript is a TypeScript-focused offering from Crazystack, a Brazilian developer education platform. The Bootcamp do Dev Doido is its structured training programme, aimed at developers who want a guided path through the stack.

Turning a conference talk into a written reference

A nineteen-minute talk like this one carries a process, a caveat and a set of numbers that are hard to revisit from memory. The loop only holds up if teams can return to the exact definition of a baseline, the four dataset categories and the split between code-based and model-based evaluators. That is a writing problem as much as a recording problem.

If you already have an explanation, a walkthrough or an interview sitting in a YouTube video, Skalablog turns it into a structured draft. Paste the video URL, let the transcript come through, and generate an article that can be reviewed before it goes anywhere.

Source video

Skala Blog