Design: Eval Harness for Agent Teams
Published:
๐ฏ Problem Statement
100+ engineers ship agent changes daily (prompts, tools, models, orchestration). Design the eval harness that keeps them from regressing production.
Constraints:
- Eval suite must run in <15 minutes (itโs in the inner dev loop).
- LLM judges are flaky โ the harness must be trustworthy despite that.
- Cost budget: evals run hundreds of times a day; $/run matters.
- Ownership: each team owns its agents; the platform team owns the harness.
๐ Architecture
Blocking policy is tiered: fast signal blocks fast, deep signal advises. Decided in advance, not on Friday at 5pm.
๐งญ Discussion Framework
1. Whatโs in the harness
- Golden task sets per team: curated, human-verified tasks representing real usage. Versioned alongside the agent code (eval v3 tests agent v3).
- Tiered suites: smoke (2 min, 20 tasks, runs on every diff) โ full (15 min, 200 tasks, runs pre-merge) โ nightly deep (2k tasks + adversarial set, not blocking).
- Deterministic checks first: schema validity, tool-call correctness, budget compliance โ cheap and flake-free. LLM judges only where determinism canโt reach.
2. Taming judge flakiness
- Rubrics over vibes: the judge scores against explicit criteria, with few-shot calibrated examples.
- n-runs + statistics: run contested tasks 3โ5ร, report pass rate with confidence intervals โ not a single boolean.
- Judge calibration pipeline: continuously measure judge-vs-human agreement; alert when it drifts.
- Pairwise comparison for subjective quality (A vs B) instead of absolute scoring.
3. CI integration
- Post-commit hooks that run smoke evals automatically; results posted on the diff.
- Blocking vs advisory: smoke failures block; full-suite regressions block merge to main; nightly findings file tasks (advisory). The key judgment: which gate blocks which stage.
- Attribution: bisect-style โ which change in the stack broke the eval? (Run evals per-diff in the stack, not just at the top.)
4. Cost control
- Cache deterministic results; sample (donโt exhaustively run) the expensive judge evals on every diff; full runs on a schedule + pre-release.
- Track $/eval-run per team; budgets prevent tragedy of the commons.
5. Dashboards & culture
- Per-team pass-rate trends, flake rate, judge agreement โ visible to everyone.
- Eval-driven development: the workflow is โwrite the eval first, then change the agentโ โ the harness shapes engineering culture, not just catches bugs.
๐ Deep-Dive Questions
- โAn eval goes red on Friday at 5pm โ block the deploy or not?โ โ Depends on the tier: smoke red = block, always. Nightly-advisory red = file a task, ship if the oncall signs off. The real answer: this policy must be decided before Friday at 5pm, written down, and owned.
- โHow do you attribute a regression to one change in a 10-diff stack?โ โ Per-diff eval runs (or bisection); plus keep prompt/model/tool versions pinned per run so the eval is reproducible.
- โThe team games the golden set (teaching to the test) โ now what?โ โ Rotate in held-out tasks the team never sees, add production-sampled tasks continuously, and track the gap between golden-set scores and production metrics. A widening gap is the signal.
๐ก What Great Looks Like
The candidate designs tiers with explicit blocking policies, treats flakiness as a first-class engineering problem (statistics, not hope), and thinks about the culture the harness creates โ evals as the agent teamโs unit tests, not a compliance checkbox.
Share on
Twitter Facebook LinkedInโ Buy me a coffee! ๐
If you found this article helpful, consider buying me a coffee to support my work! ๐
