AI & Machine Learning

Building an LLM Evaluation Harness That Actually Catches Regressions

Without scored evaluation, prompt engineering is superstition. How to build a golden set, choose metrics that mean something, and wire it into CI.

Purushottam Kumar Suman
Purushottam Kumar Suman
Founder & CEO, Drema AI
10 min read
Laptop screen showing an analytics dashboard of charts

Change a prompt, and three behaviours you were not thinking about change with it. Without a scored evaluation set you will not notice until a user does. An evaluation harness is the difference between engineering an AI system and adjusting it hopefully.

01

Start with failures, not coverage

The instinct is to assemble a broad, representative dataset. Better to start with everything that has already gone wrong: the answers users complained about, the outputs support had to correct, the cases that embarrassed you in a demo. Thirty real failures are worth more than three hundred synthetic examples, because they encode the specific ways your system breaks.

Your evaluation set should be a museum of every mistake the system has made.

02

Pick metrics that survive scrutiny

Exact-match works for extraction and classification. For generative answers you need something else, and the practical options are a rubric scored by a stronger model, similarity to a reference answer, or a set of assertions the output must satisfy. Assertions are underrated — 'contains a citation', 'does not exceed 200 words', 'refuses when the context is missing' — because they are unambiguous and cheap to run.

Extraction tasksField-level exact match and F1
ClassificationAccuracy plus per-class confusion
GenerationRubric scoring by a judge model
EverythingHard assertions on structure and refusal
03

The judge model needs judging

Using a model to grade a model works, with a caveat people skip: validate the judge against human ratings on a sample first. If the judge agrees with your reviewers 90% of the time, its scores are useful. If it agrees 60% of the time you are measuring the judge, not the system. Check this once, then re-check whenever you change the judge.

04

Run it in CI, block on regressions

Evaluation that runs when someone remembers is evaluation that does not run. Wire the suite into the pipeline so a prompt change is a pull request with a score attached, and set a threshold that fails the build. Because model calls cost money and time, run a fast subset on every commit and the full set nightly and before release.

05

Track scores over time

A single score tells you little; the trend tells you everything. Store every run with the prompt version, model version and parameters, so when quality drops you can see exactly what changed. This also catches the failure mode nobody plans for: the provider silently updating the model behind an endpoint you did not pin.

06

Feed production back in

Every real failure becomes a new case. A thumbs-down in the interface, a support escalation, a manual correction — each should land in a queue that a human triages into the evaluation set weekly. Over a year this compounds into the most valuable asset in the system, and the one a competitor cannot copy.

30+
Real failures to start
90%
Judge-human agreement target
Weekly
Production failures triaged in
Purushottam Kumar Suman
Written by
Purushottam Kumar Suman
Founder & CEO, Drema AI

Founder and CEO of Drema AI. Builds AI systems, SaaS platforms and industry software — and writes about what actually survives production.

CTA Background

Got a problem like this one?

Bring it to a call with a founder.You will get a straight answer, including when the answer is no.

View Our Work
AI-First Engineering
Secure & Scalable
Built to Deliver Impact