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
- 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.
- 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.
- 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.
- 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.
- Pin the harness version, the model identifier and the sampling parameters and write all three into the run artifact.
- 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.
- Run each task N times. Report pass rate and pass-to-the-power-k.
- Record cost and latency for every run. Report cost per passing task alongside the rate.
- 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.
- Re-seed quarterly: retire tasks the agent always passes, add newly observed failures, re-run the step 6 calibration.
- 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
- Treating the model judge as ground truth. Agents make this because a judge returns a number and a number looks like a measurement. Fix: label 30 to 50 examples by hand, score them with the judge, report the agreement (step 6). Until that number exists, a judge score is an opinion with a decimal point.
- Scoring only the final answer. Agents make this because the final answer is the cheapest thing to capture. An agent that returns the right text after a destructive path passes. Fix: assert coarse trajectory properties (tools called, turns taken, budget consumed). Do not assert the exact tool sequence, which fails on harmless reordering.
- Optimising the score instead of the agent. Agents make this because the eval set is the only visible signal. Fix: hold out a portion of the set, re-seed quarterly (step 10), and treat a suspiciously large jump as an eval bug first.
- Reporting one run. Agents make this because a green run is a clean result to report. On a stochastic system one green run is an anecdote. Fix: N runs and pass-to-the-power-k (step 7).
- Ignoring cost. Agents make this because accuracy is the score that is easy to compute. Fix: report cost per passing task next to accuracy on every run (step 8).
- Not pinning the harness. Agents make this because the harness is a dependency like any other. A dependency bump changes the score silently and the team concludes the model got worse. Fix: pin and record harness version and model snapshot (step 5).
- Reading an Elastic licence as open source. Agents make this because "source available on GitHub" is read as "open source". Arize Phoenix is Elastic-2.0, which is not OSI open source and restricts offering it as a hosted service. Fix: read the licence column in the table above before committing to a platform, and note that the MIT or Apache labels on the Braintrust SDKs describe the SDKs, not the service.
- Assuming one version line per project. Agents make this because most packages ship one line. Langfuse is at 5.0.1 on PyPI, v4.59.0 on GitHub and 3.39.2 on npm. Fix: pin per channel, never reconcile across registries.
- Treating a trace UI as the eval. Agents make this because a trace UI looks like a dashboard and therefore like a measurement. Fix: a trace is an observation, not a score. The scored set is the deliverable.
- Letting the eval rot. Agents make this because a suite that passes everything generates no work. Fix: retire always-passing tasks and add new failures on a schedule (step 10).
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.
- MAST taxonomy of multi-agent failure modes: arXiv 2503.13657
- Ragas canonical URL changed; the PyPI homepage now points at https://github.com/vibrantlabsai/ragas. Do not cite the older
explodinggradients/ragaspath.
Rules and labels: How we choose · machine form: /recipes/evaluate-agent-quality.json · all recipes