Book a 30-min callBook a call

Evaluating AI agents in CI: test sets, graders and regression gates

How to run AI agent evals in CI: test sets from real traces, outcome and trajectory graders, LLM judges, pass^k over repeated trials, and merge gates.

A stack of test cards run through an agent box three times, each run marked pass or fail, beside a gauge and a striped gate bar that a pull request arrow must pass.
Written by
BYD Tech
Published
Topic
Deep dives
Reading time
13 min read

Questions people ask

How many test cases does an agent eval need?

Enough that the confidence interval is smaller than the drop you want to catch. Intervals shrink with the square root of the number of cases, so a few dozen cases can only detect large regressions. Start with what you have, measure the interval, and grow the set from real traces and incidents until it can detect the changes that matter to you.

Should evals run on every pull request?

A small, fast smoke set should, whenever the agent's prompts, tools or code change. The full set with more trials can run nightly, before releases and on model upgrades. Mock tools and cap the run budget so the per-PR job stays quick and repeatable.

What is the difference between pass@k and pass^k?

pass@k is the chance that at least one of k tries succeeds, which suits tasks where a good attempt can be picked out. pass^k, introduced with τ-bench, is the chance that all k tries succeed, which measures reliability. For an agent that acts for users, pass^k is the more honest number.

Can I trust an LLM judge to grade agent runs?

After you have checked it. Judges show position and verbosity biases and can be swayed by the text they grade. Give the judge a narrow rubric and an easy-to-score output, compare its grades with yours on a labeled sample, and prefer programmatic checks wherever the property can be checked by code.

Should I grade the final answer or the tool calls?

Both. The final answer and the final state show whether the task got done; the tool calls show whether it got done safely and efficiently. Keep trajectory checks loose where many paths are valid, and strict where a tool must never be called or an argument must match the user's request.

Building something like this?