LLM Evaluation Is the Product in Regulated, High-Load Systems
For engineering and business leaders shipping LLM features in regulated products: why evaluation drives cost, risk and launch speed, plus a CI gate.
Getting an answer from a language model is cheap now: a fraction of a cent and a few hundred milliseconds. Knowing whether that answer is correct, allowed by policy, and still correct after next week's change is not cheap at all. In regulated, high-load products, that is where most of the cost and most of the risk end up.
I have built LLM features in iGaming, fintech and hospitality: a betting assistant, an AI platform that B2B operators use through an API, and voice AI for restaurants. Every time, the first weeks went into prompts and choosing a model. After that, nearly every hard discussion, with engineers and with the business, came back to the same question. Did the last change make things better or worse, and how do we know?
If a team can't answer that, the model choice doesn't matter much. So I treat the evaluation setup as the product and the model as a dependency.
The model is the cheap part of an AI feature
When AI comes up at leadership level, the conversation usually starts with model price and token budgets. That is the smallest line in the real bill. The bigger costs come later and slower: manual review before every release, support tickets caused by wrong answers, a compliance review that drags on because nobody can show what the system actually does, a partner who pauses rollout after one bad screenshot.
All of these have the same root. The team has no reliable way to measure quality, so every change is a risk, and every risk needs a meeting.
A few things make this harder than people expect:
- The model changes even when your code doesn't. Providers update versions, retire old ones and adjust safety behavior. Same prompt, different product.
- Small edits travel. A tone change in the system prompt can change how the model refuses questions in a completely different area.
- Averages hide the expensive cases. Overall quality can go up while answers about payments or account limits get worse, and those are the ones that end up in a complaint.
What you actually own is your definition of a good answer: the test data, the checks, the thresholds and the score history for each version. With that, moving to a cheaper or better model is a normal engineering task, and you have real leverage when you negotiate with providers. Without it, you stay on whatever you shipped first, because nobody wants to be the person who changed it.
What an evaluation harness contains
Most teams that say "we have evals" have a notebook with fifty examples that someone ran once. To use it for release decisions you need five things:
- Golden dataset. Real inputs from production or a pilot, labeled by someone who knows the domain. Each case notes where it came from.
- Checks in layers. Code checks first: valid output format, required disclaimers present, numbers matching the source data, no forbidden phrases. Then an LLM judge with a written rubric, compared against human labels. Then a small sample reviewed by people.
- Separate thresholds per category. Some areas can live with small drift. Some allow zero mistakes.
- Comparison with production. Every run is compared to the version that is live now, not to a target number someone picked in a planning doc.
- A path back from production. Flagged conversations, complaints and incident reviews turn into new test cases within days.
The part most teams get wrong is ownership, and it is not a technical problem. The rubric for "correct answer about account restrictions" should come from the people who are accountable when it goes wrong: compliance, risk, support leads, the product owner. Engineering builds and runs the harness. The business defines what good means.
When engineers write the rubric alone, it measures what is easy to measure. When the business is kept out of it, they don't trust the results and ask for manual sign off anyway, so you pay for both.
What "correct" means with regulators and real traffic
In a demo, correct means the answer looks right. In production it splits into separate properties. Each has a different owner and a different cost when it fails, so each needs its own check and its own release rule.
| Failure | Example | Who pays for it | How to check | Release rule |
|---|---|---|---|---|
| Policy violation | Explains how to get around a deposit limit | Compliance, license | Code check + LLM judge | Zero allowed |
| Wrong fact | Quotes the wrong fee | Support, refunds, trust | LLM judge against source data | No worse than production |
| Broken contract | Output a downstream service can't parse | Engineering, partners | Code check | 100% valid |
| Answer without data | Talks about account state when retrieval found nothing | Compliance, customer | Code check on that slice | Must refuse or hand over |
| Slow | p95 over budget at real concurrency | Conversion, partner SLA | Load replay | Hard ceiling |
| Expensive | Tokens per request keep growing | Margin | Metered replay | Limited increase |
High load adds two more things.
The fallback path is part of the product. When the main model is rate limited or slow, traffic goes to a cheaper model, a cached answer or a template. That path runs during incidents, when users are already angry. If you only test the happy path, you have never tested what customers see on your worst day.
Tail behavior counts as correctness. A retry storm that doubles token spend, or a timeout that cuts a structured response in half, is a defect even if every complete answer is accurate.
Then there is audit. At some point a regulator, a partner or your own legal team will ask which version produced a given answer and what you knew about its behavior on that date. Stored eval runs, linked to a version id logged on every response, are how you answer. They also help on the commercial side: a partner's risk team can approve a report much faster than a promise.
A release gate you can run in CI
The harness is only useful if it can block a bad release. Treat the prompt, model, retrieval config and tool definitions as one versioned bundle, and run the suite whenever any of them changes. A minimal definition, with illustrative thresholds you should tune to your domain:
suite: customer-assistant
candidate: ${CANDIDATE_BUNDLE} # prompt + model + retrieval config, one version id
baseline: ${DEPLOYED_BUNDLE}
datasets:
- name: golden_core
path: evals/golden_core.jsonl
- name: policy_redlines
path: evals/redlines.jsonl
- name: empty_retrieval
path: evals/empty_retrieval.jsonl
- name: prod_sample_14d
source: warehouse.flagged_conversations
graders:
- id: schema_valid
type: deterministic
gate: { min: 1.0 }
- id: redline_violation
type: [deterministic, llm_judge]
gate: { max_count: 0 }
- id: refuses_without_grounding
dataset: empty_retrieval
type: deterministic
gate: { min: 1.0 }
- id: answer_correctness
type: llm_judge
rubric: rubrics/correctness_v3.md
require_judge_human_agreement: 0.85
gate: { max_regression: 0.02, report_by: [intent, locale] }
- id: latency_p95_ms
type: load_replay
gate: { max: 2500 }
- id: cost_per_request
gate: { max_regression: 0.10 }
The exact numbers matter less than these choices:
- Policy violations are counted, not averaged. One violation blocks the release. Once they go into an average, they get shipped.
- Regressions are measured against what is live. "Not worse than production" is a rule people actually keep. Absolute targets get ignored after a quarter.
- The judge gets tested too. If the LLM judge disagrees with human labels too often, its scores mean nothing. Fix that before you trust it.
- Results are shown by slice: intent, locale, customer segment. A new market or language becomes its own slice with its own numbers, which is exactly what the business needs to decide whether to launch there.
- It has to be fast. If the suite takes longer than a coffee break, people start merging without it "just this once". Run a small core set on every change and the full set nightly.
How a one-line prompt change becomes a compliance issue
This is a composite, not one specific incident, but anyone who has run an LLM feature in production will recognize the steps.
- Product asks for a warmer, more conversational tone. Fair request.
- An engineer edits the system prompt and tries about ten examples by hand. They read well. It ships the same day.
- The new wording pushes the model to be helpful at any cost. When retrieval returns nothing for an account question, it no longer says "I can't see that, let me connect you to support". It guesses, and the guess sounds confident.
- Satisfaction scores go up. The guesses are polite.
- Weeks later a complaint reaches compliance: the assistant told a customer something about their account that was not true.
- The incident review can't establish which prompt was live at the time, because it was edited in a config store that wasn't versioned together with the model and retrieval settings.
Nobody did anything unreasonable. What was missing was structure: an empty retrieval slice in the dataset, a code check that the assistant refuses or hands over when it has no data, reporting by slice that would have shown the drop while the average went up, and one version id on every response.
The engineering fix here is small. The business cost is not: a compliance review, a paused rollout while everyone works out what happened, and extra manual sign off on every release after that. A better model would not have prevented any of it.
What I'd do on Monday
If you have an LLM feature in production, or close to it, and no harness you would let block a release, split the work between engineering and the business.
On the engineering side:
- Pull 200 real inputs from production or a pilot and spend half a day labeling them with one domain expert. That is your first golden set.
- Add an empty retrieval slice: questions the system can't answer from its sources. The right behavior is to refuse or hand over.
- Give prompt, model, retrieval config and tools one version id, and log it with every response.
- Put the suite in CI. Block on policy violations and broken contracts from day one. Add quality regression gates once the judge agrees with human labels.
On the business side:
- Sit with compliance or risk and write the five to fifteen things the system must never say or do. Engineering turns as many of them as possible into code checks.
- Name an owner for each rubric outside engineering.
- Ask for the eval report before approving a new market, a new partner or a model switch, the same way you would ask for a security review.
What is the one answer your AI feature must never give, and do you have a test today that would fail if it did?