guidelite.ai
Pricing
Book a demoSign up free
Pricing
Plans and comparisonEvery feature, tier by tier
Platform
Product overviewThe whole agent lifecycleAgent studioVisual no-code builderModel gatewayEvery major provider, one policyKnowledge & RAGGround answers in your documentsTools & connectorsGive agents real actionsAgent registryNative and external agentsProjects & environmentsPromote through gatesZNYX guardrailsPolicy on the hot pathTraceabilityEvery turn, inspectableFinOps for AICost per agent and resolution
Solutions
Customer supportResolve tier-1 automaticallySalesQualify leads, book demosMarketingOn-brand AI at scaleE-commerceProduct Q&A and order trackingHR & ITOnboarding and helpdeskBack-office operationsMulti-step task executionRisk & complianceAudit trails and guardrailsEngineering teamsRegister external agents
Resources
BlogEngineering and product writingEvaluation harnessTest agents like you test codeEnterprise rolloutThe playbook for procurementDevelopersAPI, SDKs and webhooksIntegrationsCRM, messaging, commerceCertifications & complianceWhere we stand, framework by framework
Company
About ZitrinoWho builds GuideLiteCareersOpen roles across USA and IndiaContact usDemos, support and partnershipsSecurity postureControls, stated plainlyTerms of ServiceYour agreement with usPrivacy PolicyWhat we collect and why
Book a demoSign up free
  1. Home
  2. /
  3. Blog
  4. /
  5. Building an evaluation harness for production agents
Engineering10 min

Building an evaluation harness for production agents

How to test your agents the way you test code, with regression suites and golden conversations.

GLGuideLite EngineeringApr 28, 2026

Why unit tests fail for agents

Traditional unit tests work because the same input always produces the same output. LLMs are non-deterministic even at temperature 0. The same prompt can produce subtly different responses across model versions, sampling runs, and context lengths. A test that passes today can fail after a model update you didn't ask for.

The second problem is that the failure surface is semantic, not syntactic. Your agent doesn't throw an exception when it hallucinates a refund policy. It returns a 200 with a confidently-worded lie. Standard assertion-based tests can't catch that. You need evaluation that understands meaning.

The third problem is coverage. The unhappy paths that matter in production, such as ambiguous questions, multi-turn context confusion, and users who push against policy, are exactly the paths that are hard to enumerate in advance. A good eval harness grows its coverage over time by capturing production failures and converting them into permanent regression tests.

A good eval is fast enough to run on every prompt change (under 3 minutes), covers your known failure modes, and produces a single number you can trend over time. If your eval doesn't block a bad deploy, it's documentation, not a safety net.

Golden conversation sets

A golden conversation is a complete multi-turn exchange with an expected outcome label: correct answer, correct escalation, or correct refusal. We seed golden sets two ways: manually curated cases from the support team, and automatically harvested from production conversations that were reviewed and rated by humans.

Each golden case includes the full conversation history, the expected final action (respond, escalate or refuse), a reference answer for response cases, and a set of must-not-contain strings for refusal cases. The eval runner replays the conversation up to the final turn, generates a new response, and scores it against the expected outcome.

Here's an example golden case in YAML:

# golden-conversations/billing-dispute-001.yaml id: billing-dispute-001 description: User disputes a charge they claim not to have authorized conversation: - role: user content: "I was charged $149 yesterday and I never authorized this." - role: assistant content: "I'm sorry to hear that. Can you share the email on your account?" - role: user content: "it's j.smith@example.com, I want a refund immediately" expected: action: escalate reason: billing_dispute must_not_contain: - "I can process that refund" - "refund has been issued" tags: [billing, dispute, escalation]

Metrics that matter

We track four primary metrics. Factual accuracy: what percentage of response-case golden conversations produce an answer consistent with the source documents? We use an LLM-as-judge approach with a dedicated fact-check prompt, which is cheap, fast, and well-calibrated against human raters on our domain. Tone match: does the response match the brand voice rubric? Scored 1 to 5 by a secondary judge prompt.

Escalation precision and recall are the most operationally important. Precision: of the conversations where the agent escalated, what fraction actually needed human intervention? Low precision means agents are over-escalating and drowning your human queue. Recall: of the conversations that needed escalation, what fraction did the agent catch? Low recall means the agent is handling things it shouldn't. Both matter and they trade off against each other, so tune your escalation threshold intentionally rather than by accident.

We also track latency percentiles (p50, p95) and context utilization, meaning what fraction of the context window is actually needed, to catch regressions before they affect users.

94%regression detection rate on prompt changes

Wiring it into CI

Our eval suite runs as a GitHub Actions workflow triggered on any change to the agent configuration directory. The workflow spins up an ephemeral eval environment, loads the golden conversation set from S3, runs the conversation replay, scores results, and posts a summary comment to the PR with a table of metric deltas against the current production version.

A PR is blocked from merging if factual accuracy drops more than 2 percentage points, escalation recall drops below 90%, or latency p95 increases by more than 200ms. These thresholds are version-controlled alongside the agent config. If the team decides to accept a tradeoff, they do it explicitly with a config change, not implicitly by letting a test fail.

The total eval runtime for our current golden set (340 conversations) is 2 minutes 18 seconds. We run it in parallel across 8 workers. If your eval takes longer than 5 minutes, engineers stop running it locally, and the feedback loop breaks. Keep it fast.

Want this running on your own agents?

Start free, or book 30 minutes and we will walk through it against your stack.

Sign up freeBook a demo

Keep reading

EngineeringWhy we built our own RAG pipeline instead of buying oneOff-the-shelf retrieval kept getting our answers wrong. Here's the hybrid approach that fixed it.ProductIntroducing Agent Versioning: ship faster, rollback fasterEvery change you make to your agent is now tracked, comparable, and reversible. Here's how it works.GuidesPrompts vs. fine-tuning: when to reach for whichA practical decision tree based on years of building agents, with cost and latency math.

Your first agent goes live this week.

Free forever plan. Every model provider. Guardrails and audit trail on from the first message.

Sign up freeBook a demo
guidelite.ai

The enterprise agentic AI platform. Build, govern and measure autonomous agents across your organisation.

Product
PlatformAgent studioGovernanceIntegrationsDevelopersPricing
Solutions
Customer supportSalesMarketingEmployee experienceE-commerceBack-office operations
Company
About ZitrinoBlogCareersContact us
Legal & trust
Certifications & complianceSecurity postureTerms of ServicePrivacy Policy
USA
Zitrino LLC
16192 Coastal Highway
Lewes, Delaware 19958
+1 (302) 291-4545
India · Coimbatore
GRG Gen Nxt Foundation Incubator
Phase-2, 1708, Avinashi Road
Civil Aerodrome Post
Coimbatore, Tamilnadu 641014
+91 93848 09905
Contact
enquiry@zitrino.com
Get in touch
© 2026 GuideLite by Zitrino LLC. All rights reserved.enquiry@zitrino.com