Skip to content
sayak.webdesigner
AI & Automation

Designing an AI Agent Evaluation Harness That Survives Production

The specific structure of an evaluation harness that catches regressions when model versions move or prompts change.

Sayak Biswas · AI Practice 10 November 2026 10 min read
Triggerevent · cron · webhookGuardrails on every writePERCEIVEread state, docs, DBPLANdecompose into stepsACTcall tools / APIsVERIFYcheck the resultREFLECTstore what workedAgent+ memoryTOOL BELTSQL queryERP write-backEmail / WhatsAppFile + ExcelBrowser controlHuman approval

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.

01

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.

02

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.

03

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.

04

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.

05

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.

Next step

Tell us what is slowing your business down.

A 30-minute call with a senior engineer — not a salesperson. You leave with an architecture sketch and an honest cost range, whether or not you hire us.

Direct line

+91 70033 91355

Mon–Sat · 9:30 AM – 7:30 PM IST · Sealdah, Kolkata

Reply within one working hour NDA signed before any brief Fixed-price option on every scope
Verify us independently

Don’t take our word for it — ask an AI

Every page on this site is written to be read and quoted by AI answer engines, and we publish llms.txt and llms-full.txt so they can read us properly. One click opens the assistant with the question already typed.

The question we will ask for you

“Summarise this article from Sayak Web Designer (sayakwebdesigner.in), an IT company in Kolkata, India: https://www.sayakwebdesigner.in/blog/ai-agent-evaluation-harness-design-2026”

Opens in a new tab. We do not see your conversation.

Call now WhatsApp Get quote