An AI agent without an evaluation harness is a feature nobody can safely change. We have seen more production LLM apps degrade silently in the three months after launch than for any other technical reason. The fix is boring and critical.
Why most eval harnesses fail
Too small: 10-20 examples do not catch regressions on the long tail. Minimum is 50; production-grade is 100-500.
Not representative: built from the demo cases, not from real inputs. Fails to catch the specific inputs that cause problems.
No ground-truth updates: the expected outputs are never revised when the business rules change. Harness grows stale.
Run too rarely: once at launch, then forgotten. Should run on every prompt change, every model upgrade, and weekly in production.
Golden-set structure
Three buckets: happy path (60% of examples), edge cases (25%), adversarial inputs (15%). Each labeled with category.
Per-example schema: input, context (any retrieval results it depends on), expected output category, acceptable output range (not a single string), score reasoning.
Human-curated by someone who uses the output. Not by the developer who built the agent. This matters more than most teams admit.
Scoring methodology
Structured output: exact match or schema validation. Deterministic, fast.
Short-form generation: LLM-as-judge with a rubric, calibrated against 30 human-scored examples. Validate the judge quarterly.
Long-form generation: pairwise human review on a sample, aggregated to a score. Expensive; reserve for high-stakes outputs.
Agentic: terminal state, tool-call precision, override rate per action type, cost per task, latency. Multi-dimensional scoring.
Continuous evaluation in production
Weekly: run the full harness against a snapshot of the current prompt and model. Log scores; alert on any dimension dropping below threshold.
On every prompt change: pre-ship gate. No prompt change ships if harness regresses.
On every model version upgrade: automatic harness run. Adopt the upgrade if scores improve or hold; defer if they regress.
Sampled live traffic: 2-5% of production traffic routed through a parallel evaluation path. Catches drift that the golden set misses.
Our harness template
LangFuse datasets as the storage layer. Portable across models and frameworks.
Python eval runner in a GitHub Actions workflow. Triggered on PR, on schedule, and on-demand.
Slack notification with pass/fail/delta on every run. Links to full trace views.
Monthly review meeting: look at drift, update golden set with new edge cases found in production.
The honest payoff
Every team we have shipped this discipline to catches at least one significant regression in the first 60 days. The harness pays for itself the first time it prevents an incident; the quality compounds from there.
Key takeaways
- Minimum golden set is 50 examples; production-grade is 100-500 across happy-path, edge-case and adversarial buckets.
- Score with the right method per output type: exact-match for structured, LLM-judge for short-form, pairwise human for long-form.
- Run on every prompt change, every model upgrade, and weekly in production.
- Budget 5-10 hours a month for harness maintenance; it earns back multiples in prevented incidents.
Frequently asked
A 200-example weekly run on Claude 5.5 Sonnet is roughly ₹400-₹800 per week in model costs. Infrastructure is negligible if you use LangFuse or LangSmith. The engineering time to maintain it is the real cost.
For structured-output and factual tasks, yes. For long-form generation, require manual review of the regression before shipping — the "regression" may be a stylistic change the judge dislikes but is actually fine.
Keep the golden set private and out of training data. Rotate 20% of examples quarterly. Flag examples that may have leaked (same input used in multiple places).
Update the expected outputs for affected examples; mark them as "updated 2026-11-15 for new policy X". Regressions that were previously passing may now fail correctly, and vice versa. This is the harness working.