Recipe · recipe:evaluate-agent-quality

Get a pass rate with a confidence interval for your agent, from your own tasks, that CI can fail a merge on

Curated. Written from research and curation. Not run in our harness yet.

The job

Give a builder a pass rate with a confidence interval, computed from their own tasks and their own agent, that a CI job can fail a merge against.

The approach

We build an offline scored eval set. We fix a dataset of 30 to 50 real tasks drawn from our own traffic, logs or support queue, including the failures we already know about, and store them as versioned data files next to the code. For each task we split the expected outcome into what an assertion can check (did the file change, does the test pass, does the JSON match the schema, was the forbidden tool called) and what it cannot (is the answer correct, is the tone right). We run the deterministic assertions first and short-circuit, and we reserve a model judge for the remainder only, calibrating that judge against 30 to 50 hand labels before we trust its number. We pin the harness version and the model snapshot in the run artifact. We run the agent N times per task and report pass rate and pass-to-the-power-k, not a single run. We report cost per passing task next to the rate. We gate CI on a threshold we chose before seeing the number.

Two alternatives are worse for this job. Trace-first observability (Langfuse, Phoenix, Braintrust) is where most of the install volume sits and it answers "what is my agent doing" well, but it has no pass or fail by default and is online only, so it cannot block a merge. Its correct role is to seed the task set with real failures. The public benchmark scoreboard (SWE-bench, tau-bench, terminal-bench, GAIA) is the weakest for this job and the most popular: it measures model plus harness plus scaffold rather than your agent, it is contaminated over time, and it reports accuracy without cost. Use it only as a cheap model sanity check.

What you need

Selected rows. Rows marked unconfirmed are unverified and should be checked from the linked page or dropped.

Note on Ragas: the PyPI homepage now points at https://github.com/vibrantlabsai/ragas. Do not cite the older explodinggradients/ragas path.

Steps

  1. Write the job as a one-sentence success condition, then enumerate the ways it can fail. For multi-agent systems build the failure list from the MAST taxonomy (14 failure modes, arXiv 2503.13657). Do this before choosing a tool.
  2. Collect 30 to 50 real tasks with real inputs from your own traffic, logs or support queue. Include known failures. Store as versioned data files next to the code, each with a checkable expected outcome.
  3. Split each expected outcome into deterministic (file changed, test passes, JSON matches schema, forbidden tool not called) and non-deterministic (answer correct, tone right). Record the split ratio for the suite.
  4. Pick one runner: promptfoo, DeepEval or Inspect AI. Do not mix runners inside one suite. Run deterministic assertions first and short-circuit; route only the remainder to a model judge.
  5. Pin the harness version, the model identifier and the sampling parameters and write all three into the run artifact.
  6. Label 30 to 50 examples by hand, score them with the judge, measure agreement. If agreement is poor, fix the judge before touching the agent.
  7. Run each task N times. Report pass rate and pass-to-the-power-k.
  8. Record cost and latency for every run. Report cost per passing task alongside the rate.
  9. Wire the suite into CI against a threshold chosen before seeing the number. Fail the build on a drop. Treat a score rise after an unrelated change as an eval bug. Keep the run inside a wall-clock budget.
  10. Re-seed quarterly: retire tasks the agent always passes, add newly observed failures, re-run the step 6 calibration.
  11. Keep the model sanity check separate. If you must compare base models, run lm-evaluation-harness or a public benchmark and report it as a model number, never as your agent's quality number.

Traps

Scope

Covers: measuring the quality of an agent you already have, in a way that produces a number you can gate a change on. Defining success and failure, building a versioned task set from your own traffic, splitting deterministic from judged scoring, calibrating the judge, running N times for a rate, reporting cost alongside accuracy, wiring the result into CI, and keeping the set current.

Does not cover: prompt optimisation, fine-tuning or training (this measures, it does not improve). Model selection (separate job, covered only as the step 11 sanity check). Safety, red-teaming and adversarial evaluation (promptfoo and Inspect AI can do that work, but those scores do not transfer to the quality question and this recipe does not claim them). Online monitoring, alerting and incident response (tracing appears here as an input to the task set, not as a monitoring design). Human-in-the-loop annotation workflow design beyond the single calibration step. Non-agent LLM quality such as single-turn prompt and retrieval evaluation, except where a task set happens to contain it. Any claim that a passing score predicts production success: it predicts that the behaviours you chose to enumerate have not regressed.

Sources

Every version, licence and date in this recipe was read from the source named in the table above on 2026-10-14. Nothing here was executed end to end, and no step has a recorded run artifact. Treat the whole recipe as curated until someone runs the steps and records the artifact: harness version, model snapshot, sample count and CI threshold. Every version and date will drift.