Monitoring screens showing live production traces next to a test run report

Online vs Offline LLM Evaluation: What Each Catches

The offline suite said 94%. The following Monday, escalations to human support doubled. Nothing in the regression set had changed, the model version was pinned, and every CI check was green. The suite was fine; it just could not see what real users were typing.

That gap is the whole story of online vs offline LLM evaluation. Offline evaluation runs a fixed dataset against a candidate before it ships, so you can compare versions and block regressions. Online evaluation scores live production traces after it ships, so you can catch the inputs and behaviors your dataset never contained. You need both, and each one is blind exactly where the other can see.

What offline evaluation is good at

Offline evals run against curated examples with known-good answers or rubrics. LangSmith’s evaluation concepts describe the use cases plainly: benchmarking versions, regression testing, unit testing individual components, and backtesting against historical data. They target datasets with reference outputs, which is why they can check correctness rather than just plausibility.

Concretely, offline is where you answer questions like these:

  • Did the new prompt beat the old one on the same 300 questions?
  • Did swapping the embedding model drop recall on part-number queries?
  • Does the JSON tool-call schema still validate after the system prompt rewrite?
  • Is the cheaper model within two points of the current one on every tagged slice?

Offline results are repeatable. Run the same set twice with the same settings and you can see whether a change is signal or noise. That repeatability is what makes a gate possible, which we cover in the eval regression gates post. The cost is that the dataset is a snapshot. It reflects the traffic you imagined or remembered when you built it.

What online evaluation is good at

Online evaluation looks at what actually happened. In LangSmith’s framing, online evals run on production traces and threads without reference outputs, so they focus on quality patterns, safety, anomalies, and real-world behavior instead of exact correctness. The same doc describes the loop: online evaluations surface issues, those become offline test cases, offline evals validate fixes, and online confirms production improved.

Online is where you find out about:

  • Distribution shift. Users start pasting spreadsheets, switching languages, or asking about a product you launched last week.
  • Interaction effects. Latency, truncation, tool timeouts, and retry loops that never occur in a clean harness.
  • Silent degradation. A provider-side model update, a stale index, or a prompt change that interacts badly with a rarely used feature flag.
  • Behavior that cannot be graded from the question alone, such as conversation drift over twelve turns.

Instrumenting this properly means traces with enough structure to score. The OpenTelemetry GenAI semantic conventions give a vendor-neutral vocabulary for model calls and agent spans, which keeps your online evaluators from being locked to one tracing tool.

Side by side

QuestionOfflineOnline
When does it run?Before release, on every candidateAfter release, on live traffic
InputsCurated, tagged, versionedWhatever users send
Ground truthReference answers and labelsUsually none; rubric, rule, or proxy signal
Best atRegression, A/B between versions, component testsDrift, anomalies, real failure discovery
Blind spotTraffic you did not anticipateCannot prove a change is better without comparison
Cost shapeFixed per run, controllableScales with traffic unless sampled
OutputPass/fail gate, version comparisonAlerts, dashboards, new test cases

Sizing the online sample

Judging every request with another model call is rarely worth it. Take a product with 200,000 requests per day. Scoring 2% of traces gives you 4,000 judged traces daily. If each judge call consumes roughly 2,500 tokens of trace plus rubric, that is about 10 million judge tokens per day. That is a number you can budget, track, and halve if needed.

Sample with intent, not just randomly:

  1. Random slice (about 50% of the budget) to estimate the overall rate without bias.
  2. Risk slice (about 30%) for high-stakes intents such as billing, account changes, or medical wording.
  3. Anomaly slice (about 20%) for traces with errors, long latency, many tool retries, or user escalations.

Report the random slice for trend lines and the others as work queues. Mixing them into one average is how you get a flattering number and a bad week.

Cheap online signals that are not judges

Before spending tokens, collect signals that cost nothing: thumbs up or down, regenerate clicks, copy events, edits to a suggested reply, escalation to a human, and abandonment after the first answer. These are noisy and biased toward vocal users, but a sudden shift in regenerate rate after a deploy is a better alarm than a monthly audit.

Treat them as triggers, not truth. A spike in edits to suggested replies means “look at these traces,” not “quality fell 12%.” The judgment step is still a rubric or a human, and the human review loops post covers how to staff that without stalling releases.

The middle zone: shadow, canary, and A/B

Between “ran on a dataset” and “everyone gets it” sit three patterns:

  • Shadow mode sends production inputs to the candidate without showing its output. You get realistic inputs and can score offline-style against the current version’s output or a judge.
  • Canary shows the candidate to a small slice, say 5%, with online monitors and an automatic rollback condition.
  • A/B test splits traffic for long enough to compare a business metric such as resolution rate.

Shadow is underused. It converts online traffic into an offline comparison with no user risk, and it feeds your dataset with inputs that look like the real ones.

Which to trust, by type of change

ChangeRely first onThen confirm with
Prompt wording tweakOffline regression on tagged slicesCanary with online rubric on the affected intent
Model swapOffline comparison plus cost/latencyShadow, then canary
Index rebuild or new chunkingOffline retrieval and faithfulness metricsOnline sampling of citation precision and abstentions
New tool or new agent stepOffline trajectory testsOnline monitors for retries, loops, and escalations
Provider-side model update you did not triggerScheduled offline rerunOnline drift alerts

The last row is worth underlining. You can have no deploy and still have a regression. A nightly offline run of a small canary set against the live endpoint catches provider-side changes that production monitoring finds only after users do.

Feed production back into the dataset

The most valuable offline test cases are the ones that failed online. Every flagged trace should get one of three outcomes: dismissed with a reason, fixed and added to the regression set, or added as a hard negative to the golden set. Record the trace ID so reviewers can see where each example came from. This is the practical backbone of building golden datasets for LLM apps.

A good habit is a weekly 30-minute triage. Pull the top 20 flagged traces, label the root cause as retrieval, prompt, tool, or model, and promote the five most representative to the offline set. After a month your dataset reflects the traffic you actually serve, not the traffic you guessed at in the planning doc.

How this fits the rest of your stack

Offline gates belong in CI. Online monitors belong in your observability stack. Both feed the release scorecard, so the same metric definitions appear in both places; otherwise a number in the dashboard cannot be compared with the number in CI. For the broader operating picture, see the LLMOps production guide, and for how to roll both into one go/no-go page, see the LLM quality scorecard.

OpenAI’s evaluation best practices summarize the philosophy well: evaluate early and often, log everything so you can mine it for eval cases, and keep evaluation continuous rather than a launch milestone. If you are doing retrieval, the offline half of the work is detailed in the RAGAS evaluation guide, and the claim-level online checks are in hallucination metrics for LLM apps.

Frequently asked questions

What is the difference between online and offline LLM evaluation?

Offline evaluation runs a fixed, labeled dataset against a candidate before release, which makes results repeatable and gate-able. Online evaluation scores real production traces after release, which exposes inputs and behaviors the dataset never contained but usually lacks reference answers.

Can I skip offline evals and just monitor production?

You can, but users become your test suite. Without offline regression sets you cannot tell whether a prompt change caused a drop or whether traffic changed, and you cannot block a bad release before it reaches anyone.

How much production traffic should I score online?

Start small, often 1 to 5 percent, and split the budget between a random slice for unbiased trends, a risk slice for high-stakes intents, and an anomaly slice for errors and escalations. Adjust based on judge cost and how quickly you need to detect shifts.

How do online evaluators work without reference answers?

They use reference-free checks: rubric-based LLM judges on the trace, rule checks such as schema validity or banned content, and proxy signals such as user feedback, retries, and escalations. They detect patterns and anomalies rather than proving exact correctness.

What is shadow mode for LLM releases?

Shadow mode sends real production inputs to a candidate system while users still see the current system’s output. You can score or compare the candidate on realistic traffic with no user-facing risk, then promote the interesting cases into your offline dataset.

Related reading

About Mudasir Syed

Check Also

Rows of server racks in a data center suggesting storage infrastructure for vector database workloads

Open-Source Vector DB Projects Worth Tracking

Choosing among open source vector database projects is less about finding the fastest one and …

Leave a Reply