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

flowchart LR; Diff["Code diff"]-->Smoke["Smoke: 20 tasks, 2 min (blocking)"]; Smoke-->|pass|Full["Full: 200 tasks, 15 min (blocks merge)"]; Full-->|pass|Merge["Merge to main"]; Merge-->Night["Nightly deep: 2k tasks + adversarial (advisory)"]; Night-->Ticket["File tasks on regression"];

Blocking policy is tiered: fast signal blocks fast, deep signal advises. Decided in advance, not on Friday at 5pm.

flowchart TD; Gold["Golden task set (human-verified)"]-->Judge["LLM judge scores"]; Judge-->Agree["Judge-vs-human agreement metric"]; Agree-->|drift|Calib["Tighten rubric, add few-shot examples"]; Calib-->Judge; Agree-->|healthy|Trust["Trusted in CI gates"];

๐Ÿงญ 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.