How We Built an Automated LLM Eval Harness for 40M Daily Queries
Why manual prompt spot-checking fails at scale, and how to calibrate LLM-as-a-Judge scoring against human domain experts with Cohen's Kappa > 0.84.
The Illusion of “Vibe-Driven” Prompt Engineering
Nearly every engineering team starts building AI features the same way: a developer tweaks a system prompt in a playground, eyeballs five sample outputs, declares victory, and merges the PR.
Two weeks later, customer support tickets spike because a subtle formatting change broke JSON tool invocation for 14% of multi-turn conversations. Without a deterministic CI/CD evaluation harness, every prompt edit, model version upgrade, or retrieval chunking adjustment is a blind production deployment.
1. Curating the 500-Sample Golden Dataset
Before writing a single line of automated grading code, your team needs a stratified dataset representing real production traffic:
- 60% Core Happy-Path Queries: High-frequency workflows where latency and citation accuracy must never regress.
- 25% Multi-Hop & Ambiguous Edge Cases: Queries requiring cross-document synthesis or clarifying questions.
- 15% Adversarial & Out-of-Scope Inputs: Prompt injections, missing context, and policy-violating requests.
“Your evaluation dataset is your true product specification. If a failure mode isn’t represented in your golden evaluation set, your production system will eventually regress on it.”
2. Calibrating Pairwise LLM-as-a-Judge Rubrics
Asking a judge model to output a generic 1 to 10 score produces noisy, uncalibrated variance. Instead, break evaluation into binary or 3-point atomic criteria (Pass / Partial / Fail):
- Citation Faithfulness: Does every factual claim in the response trace directly to a retrieved context span?
- Schema Determinism: Does the output strictly validate against the target Pydantic / JSON Schema contract?
- Completeness vs Verbosity: Did the response answer the user’s core question within the 280-token budget?
In our Production LLM Systems & Eval Engineering cohort, every student builds and calibrates this exact pipeline during Week 1.
Dr. Elena Rostova
Principal AI Systems Architect. Lead instructor at Cohorta Academy. Join the upcoming 4-week live cohort to build production systems directly with Dr. Elena Rostova.
Related Technical Playbooks
Why 84% of Senior Engineers Use L&D Stipends for Cohort Courses
A complete breakdown of how corporate learning budgets work at engineering-driven companies, plus the exact manager request template that gets approved.
Product StrategyThe Death of Pure Seat Pricing: Structuring Hybrid AI Monetization
Why charging per seat breaks when AI agents automate headcount, and how top B2B products combine platform commits with outcome-based credits.