Production Evaluation
Offline evals tell you about the cases you thought of. Production shows you everything else. Online evaluation measures behavior on real traffic and sends what it finds back into your offline suite.
Parcel: green offline, falling online
Parcel's assistant passed its offline eval at 89% and shipped. A few weeks later support escalations were climbing, and the offline number hadn't moved. A product launch had changed what users were asking about, and the frozen eval set barely covered the new topics. On the new mix of questions, quality had dropped into the 60s.
The offline gate had been answering "is this change good on last quarter's questions?" Parcel added online evaluation: live quality signals, sampled production conversations, and a schedule for adding those conversations to the eval set. The next drop showed up within days.
Signals, guardrails and silent regressions
On live traffic you can collect user behavior signals, run a judge on a sample of responses, and enforce guardrails that block or repair a response before it's sent. Guardrails act in the moment; evals measure over time. You want both.
The failure to fear is the silent regression. Nothing crashes and nothing logs an error, but quality drops, because users started asking different things or because the model provider updated the model. You find out when customers leave. Drift detection is how you notice sooner.
Production turns up a failure. You capture the case and add it to your offline set. You fix it and prove the fix offline, then ship, and production confirms it. Mature teams run this loop constantly, and describing it well is a strong answer in a senior interview.
Explicit and implicit feedback
Explicit feedback is what users choose to give: thumbs up or down, star ratings, a report button. It's clear but rare. On most products only a percent or two of responses get rated, and the people who rate tend to be either delighted or annoyed. Implicit feedback is what their behavior shows, and there's far more of it:
- Acceptance rate. For inline suggestions such as code completions or reply drafts, did the user keep it? For a completion product this is often the main quality number.
- Edit distance. How much did they change an accepted suggestion before using it? A suggestion that was accepted and then rewritten wasn't much of a win.
- Copy, retry and abandon. Copying a response suggests it was useful. Regenerating or rephrasing the question suggests it wasn't. Leaving in the middle of a conversation is often the clearest signal of all.
Each implicit signal is noisy, but in aggregate they're strong, and they cost nothing to label. Use them for the main dashboard, a sampled judge to understand why things change, and explicit ratings as spot checks.
Operational metrics
Quality always trades off against speed and cost, and at scale managing that trade-off is much of the engineering. Track these next to quality:
- Time to first token (TTFT). How long until the user sees anything. In a streaming interface this is what feels fast or slow: under a second feels instant, several seconds feels broken.
- Tokens per second. How fast output streams once it starts, and how many requests a deployment can handle at once before it slows down.
- Cost and latency per request. Dollars and milliseconds per call, compared against quality. A prompt change that adds two points of judge score but doubles cost and TTFT may be a net loss.
- Utilization. How busy the GPUs are behind a self-hosted model, which tells you whether you need more hardware or better batching.
A common answer to the cost problem is model routing: send the easy majority of requests to a small, cheap model and pass only the hard ones to a frontier model. Your eval harness is how you prove the router didn't cost quality. Showing a quality-versus-cost curve and explaining where you'd set the cutoff makes a stronger case than any single number.
Catch a silent regression with drift detection
Implement PSI (Population Stability Index) and compare last month's score distribution with this week's. No error was thrown and no test failed, but the numbers moved. PSI makes that visible.
Lab code · runs free
from math import log
def histogram(values, edges):
counts = [0] * (len(edges) - 1)
for v in values:
for i in range(len(edges) - 1):
hi_ok = v < edges[i+1] or (i == len(edges) - 2 and v == edges[-1])
if edges[i] <= v and hi_ok:
counts[i] += 1
break
total = sum(counts) or 1
return [c / total for c in counts]
def psi(expected, actual, edges):
e, a = histogram(expected, edges), histogram(actual, edges)
return sum((ai - ei) * log((ai + 1e-6) / (ei + 1e-6)) for ei, ai in zip(e, a))
edges = [0, 0.2, 0.4, 0.6, 0.8, 1.0]
baseline = [0.90, 0.85, 0.80, 0.95, 0.70, 0.88, 0.92, 0.78, 0.83, 0.91] # last month
this_week = [0.50, 0.55, 0.40, 0.60, 0.45, 0.70, 0.30, 0.65, 0.50, 0.42] # quality slipped
d = psi(baseline, this_week, edges)
print(f"PSI = {d:.2f} -> {'DRIFT — investigate' if d > 0.2 else 'stable'}")
PSI = 1.93 -> DRIFT — investigate
Last month's scores sat between 0.7 and 0.95. This week's fell into the 0.3 to 0.7 range. The service is up and nothing was logged, but the distribution moved a long way, and a PSI of 1.93 is far above the usual 0.2 alert threshold. In production you'd also watch for drift in the inputs (the questions changing) and add the worst new cases to your golden set.
Remi is live. Meridian watches resolution rate, escalation rate and wrong-action rate on real traffic. When Meridian introduces a new subscription tier, customers start asking new billing questions and Remi's accuracy on them slips. The frozen offline set can't see it; sampled production tickets can. The team adds those tickets to the eval set, fixes Remi and recovers.
School projects usually stop at offline accuracy, so production evaluation is where new grads tend to have the biggest gap. You can close it quickly. Learn what TTFT means and why streaming makes it matter, be able to name two implicit signals, and be able to describe the loop from production failure to new test case in a sentence or two.
Observability tools such as LangSmith, Arize Phoenix and Langfuse have free tiers. Wiring one up to a toy app and looking at the traces for an afternoon will teach you more than reading about them.
The scariest AI failures make no noise. If support tickets about your AI feature triple and engineering says, truthfully, "we didn't change anything," the usual suspects are a shift in what users ask or a model update from your provider. Neither needs a code change. What should already exist is a live quality dashboard with drift alerts, so the team hears about it within hours rather than after a month of tickets.
Ask for speed and cost to sit next to quality: time to first token, cost per successful task and error rate. Routing easy requests to a cheaper model is often the right move. Don't accept a quality gain that breaks your response-time or margin targets unless the trade-off has been stated and agreed.
Quiz · Chapter 10
- What's the difference between guardrails and evals?
- Why is a silent regression dangerous?
- How can an LLM system get worse with no code change?
- What is edit distance used for in production evaluation?
- What does model routing trade off?