Offline evaluation runs against a fixed dataset outside the production request path. Online evaluation runs on production traffic or live traces. The difference is not which metrics you compute, because the same evaluator can run in both places. The difference is when you evaluate and against what data, and that decides what the resulting score is allowed to tell you.
Offline evals buy control. Same inputs, same evaluator, so when the number moves you can attribute the move to the prompt, model, or retrieval change you just made. Online evals buy realism. Real users, the current retrieval corpus, tools that time out, inputs nobody on the team would have written down. Neither one substitutes for the other, and the space between them is where most production failures live.
Build better agents with Arize
Trace, evaluate, and learn. Build agents that work with Arize AX and start tracing your runs today.
Prefer open source? Try Arize Phoenix for self-hosted, open source agent observability.
Key takeaways
- Offline evaluation trades realism for reproducibility: a fixed dataset makes changes comparable, which is what you need for prompt iteration, model swaps, and regression gates before release.
- Online evaluation trades reproducibility for realism: it runs on production traffic where there is no reference answer, so it relies on reference-free evaluators such as groundedness, retrieval relevance, and tool selection correctness.
- Your offline dataset is a snapshot of the traffic you knew about. Production drifts away from it continuously, so an offline suite that keeps passing is not evidence that quality held.
- Online evals are sampled, not exhaustive, because every judged span costs tokens and time. Sampling rate is the main cost control you have.
- The loop matters more than either half: production failures found online become rows in the offline dataset, which turns a one-time incident into a permanent regression test.
What offline evaluation actually gives you
An offline eval needs three things: a dataset of examples, an evaluator, and a runner. The dataset is usually a mix of hand-written cases, examples pulled from production traces, and edge cases somebody filed after an incident. Those examples often carry a reference answer or an expected tool call, which lets you score against ground truth.
Because the inputs are fixed, offline evals support the workflows that need comparability:
- Prompt and model iteration. Change one variable, rerun the suite, read the delta.
- Regression gates. Run the suite in CI on a pull request and block a merge that drops a named metric below its threshold.
- Experiment comparison. Two configurations scored on the same rows can be ranked.
One caveat about the word reproducible. If your evaluator is an LLM judge, the same input can produce a different label on two runs, even at temperature zero. Offline reproducibility means the dataset is pinned, the evaluator prompt is versioned, and the judge model is a specific version. It does not mean the score is deterministic, so treat small movements between runs as noise until you have enough rows to rule that out.
What online evaluation actually gives you
Online evaluation reads what the system did in production. In practice that means evaluating spans and traces after the request has already been served, which is why online evals are usually built on the same instrumentation you already use for tracing and evaluating agents rather than on a separate data path.
Three things change once you leave the fixed dataset:
There is no reference answer. Nobody wrote down the correct response to a live user’s question. So online evaluators have to score properties that can be judged from the trace alone: is the answer grounded in the retrieved context, did the retrieved chunks actually relate to the query, did the agent pick a sensible tool, did the session reach the user’s goal.
You evaluate a sample. Judging every span with an LLM judge means paying for a second model call on every request, which is why sampling rates and cheaper judge models show up quickly in any discussion of what evaluation actually costs. Sample by slice rather than uniformly if you care about a low-traffic route.
Timing is a design decision. Most online evals run asynchronously after the response is sent, so they add no user-facing latency. Evals that run inline, in the request path, can block or modify a response, but they spend your latency budget to do it. That inline case is closer to a guardrail than to measurement.
Where the gap between them hides failures
A clean offline suite and a healthy dashboard can coexist with users having a bad time. The usual reasons:
- Distribution shift. Your dataset has the questions you anticipated. Production has typos, other languages, pasted documents, and adversarial phrasing.
- The system changed around the model. The retrieval corpus got reindexed, a tool version changed its error format, an upstream service started returning empty results. None of that appears in a dataset of prompts and expected answers.
- Overfitting to the eval set. Iterating against the same 200 rows for two months produces a system tuned to those rows.
- Aggregates hiding slices. A stable average can sit on top of one segment failing badly, which is why slice-level monitoring is a standard part of agent observability rather than an advanced feature.
The fix runs in one direction: online findings feed the offline dataset. A flagged session becomes a new test case with the correct behavior recorded, so the suite grows toward the real distribution instead of drifting away from it.
FAQ
Which distinction best describes the difference between offline and online evaluation?
Offline evaluation scores a fixed dataset outside the request path, before or independent of release. Online evaluation scores real production traffic, usually from traces, after the request has been served. Everything else, including which metrics you use, follows from that.
Do I need both?
If you ship to real users, yes. Offline evals tell you whether a change is an improvement. Online evals tell you whether the system works for the traffic you actually get. Offline alone means you learn about failures from users. Online alone means you detect problems but cannot iterate safely, because you have no comparable baseline to test a fix against.
Can I use the same evaluator offline and online?
Reference-free evaluators such as groundedness or retrieval relevance run in both places, and using the same evaluator version in both is worth doing because the scores become comparable. Evaluators that need a reference answer only work offline, since production traffic has no labeled correct output.
How much production traffic should I evaluate online?
Start with a low sampling rate on high-volume routes and a much higher one, up to everything, on low-volume or high-risk routes. The binding constraint is cost and judge throughput rather than statistics.
Does online evaluation slow down my application?
Not if it runs asynchronously on traces after the response is sent, which is the normal setup. Evaluation only affects user-facing latency when you deliberately put it in the request path to block or rewrite a response, and in that case it needs a hard timeout and a defined fallback.
Evaluation experiment
An evaluation experiment compares two or more versions of a system on the same dataset with the same evaluators. It is also called an LLM experiment, agent experiment, or offline experiment.
The versions might differ in prompt, model, retrieval settings, or agent code. Because the inputs and evaluators stay fixed, you can attribute score differences to the change itself.
An offline experiment does not split production traffic. Splitting live traffic between versions is part of online evaluation.
How to run an evaluation experiment
An experiment has four steps:
- Freeze versions: Lock the version of the evaluation dataset and of each evaluator.
- Run candidates: Run each candidate version and capture its full outputs in traces.
- Compare row by row: Count per-row wins and losses, not only averages. A higher mean can hide regressions on critical rows.
- Record the setup: Save the dataset, evaluator, and model versions so someone can reproduce the result.
Arize Phoenix documents this workflow in datasets and experiments and the getting-started guide. For help choosing evaluators, see AI evaluation.
Example: reading experiment results
Suppose candidate B beats candidate A by 4 points overall. But B fails all 12 rows that test refund policy.
Do not promote B until those rows pass. The higher headline average does not make up for a complete failure on one critical area.
Evaluation reproducibility
Evaluation reproducibility means you can rerun an evaluation later and get a result you can meaningfully compare with the original. The rerun might come from a teammate, a CI job, or a model change.
Reproducibility does not require identical outputs. A sampled model can produce different text on each run, and the evaluation still counts as reproducible if everything that defines the run is pinned and recorded. Pinned means fixed to a specific, recorded version.
With the setup pinned, a changed score points to the change under test. Without it, the change might come from some unrecorded difference in setup.
What to pin
Record these items for every run:
- Dataset: The exact evaluation dataset version.
- Prompt and model: The prompt version and the model version.
- Evaluator: The evaluator code, or the judge model and its prompt.
- Scoring: The scoring logic, as described under scoring function.
Reproducibility for agent evaluations
For agent evaluations, pin the environment as well as the inputs. Tool state, external data, time-dependent responses, and retries can all differ between runs.
Record the tool versions and the state each run started from. Note any step that cannot be replayed exactly. If a step depends on a live external system, say so in the run record instead of calling the score fully reproducible.
Keep the pinned files under version control as part of EvalOps. Log each run’s configuration in its trace.
Offline results only predict production behavior if you can repeat the offline run. For the wider picture, see AI evaluation.
How to check reproducibility
Rerun last week’s evaluation from its recorded configuration, without changing the system under test. If the score moves more than sampling alone would explain, something was not pinned. It could be the dataset, the evaluator, the judge, or the environment.
Find that difference before you trust any comparison built on the run. The Phoenix experiments documentation shows how to run experiments with pinned datasets and evaluators.