esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

Offline vs Online Evaluation?

The fixed test you run before release, the live checks you run after it, and why a good AI team uses both, explained for your AI interview.

In short

Offline evaluation tests an AI system before release, on a fixed set of questions with known good answers, while online evaluation checks real user traffic after release, usually on a sample. Teams use both, because a fixed test set can miss what real users ask.

11 min readIntermediateVery common · estimateFacts checked 26 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

Offline evaluation tests my AI system before release, on a fixed set of questions with known good answers. Online evaluation checks real traffic after release, usually on a sample of chats. Offline is repeatable and runs on every change, but it only tests what someone wrote down. Online finds what users actually ask, but by then a bad answer may already have reached them. So I run both, and every real failure goes back into the test set.

What is offline vs online evaluation, in plain words?

Evaluation means checking how well an AI system does its job. Offline evaluation checks it before users see it, using a fixed set of questions with known good answers. Online evaluation checks it after release, using real user chats or requests.

Think of a pilot's simulator session before a flight, and the incident reports from real flights. The simulator is repeatable and safe, but it cannot copy every storm. The reports show what it missed, after someone was affected. An AI system works the same way: the test set is the simulator, and live traffic is the flight.

Key words

Offline evaluation
Tests run before release, on a fixed set of cases you control.
Online evaluation
Checks on live traffic after release, usually on a sample.
Test set
The fixed questions with known good answers, reused on every run.
Sample
The small share of live chats picked for scoring, such as one in fifty.
Production traffic
The real requests users send once the system is live.

The running example is a bank's fee bot, which answers customers' questions about fees.

How do offline and online checks differ?

Offline checks run in the build, before a release, and they are cheap to repeat. The same cases go in each time, so two releases can be compared fairly. Anthropic's engineering team rates these automated evals as fully reproducible and able to run on every commit, but warns they can give false confidence if they do not match real usage.

  • Offline

    Before release

    A fixed test set, the same on every run. Cheap to repeat on each change, but it only tests what someone wrote down.

  • Online

    After release

    Sampled scoring of real traffic, plus user feedback and A/B tests. It finds what users really ask, but by then a bad answer may have reached someone.

LangChain's LangSmith documentation draws the same line. Offline evaluations, it says, "Offline evaluations run on datasets and examples." Its online side feeds failures back into the offline set: "Production feedback: Identify issues to add to offline datasets."

Microsoft's Foundry guidance describes two checks after launch. Continuous evaluation scores production traffic at a sampled rate. Scheduled evaluation runs a fixed test dataset again and again to spot drift, the slow change in real use that makes a test out of date. It does not fit the simple before and after split, because it runs after launch but still uses a fixed test set.

  • “Continuous evaluation: Quality and safety evaluation of production traffic at a sampled rate”

    Microsoft Foundry

  • “Scheduled evaluation: Scheduled quality and safety evaluation using test datasets to detect system drift”

    Microsoft Foundry

How the two checks feed each other

Before release (offline)

Fixed test set

Questions with known good answers

Run the test

Same inputs and scoring rules, every change

App goes live

The model is in front of users

After release (online)

Sample live chats

A small share of real traffic

Score each sampled reply

Judges, checks, user ratings

New failure

A real case the test set missed

  1. 1The same questions go into the test, every time.
  2. 2Only a version that passes the test goes live.
  3. 3Real users start chatting with it.
  4. 4A small share of those chats is picked and scored.
  5. 5Wrong answers are flagged for a person to read.
  6. 6The real case joins the test set, so the next release is checked for it.
The fixed test runs before release. After release, a sample of real chats is scored. Each real failure goes back into the test set, so the next release is checked for it too.

How does this work for a bank's fee bot?

The bank's test set has 300 questions with approved answers. Before each release, the team runs the bot on all 300. A customer might ask "What is the cash advance fee on my card?" and the bot's answer is compared with the approved fee table.

  1. 1

    Before release

    Run the 300-question test set. 288 answers pass, which is 96 percent, so the release goes out.

  2. 2

    Two weeks later

    The cash advance fee rises. The test set still has the old fee, so the offline score stays at 96 percent.

  3. 3

    Online check

    Score every 50th live chat against today's fee table. The sample shows nine wrong cash advance answers in the first week.

  4. 4

    Fix the loop

    Put the new fee into the test set, add the nine sampled chats, and fix the bot's source before the next release.

Here is a simplified version in plain Python. It has three test questions, not 300, and the bot is only a stub that repeats its old answers.

Exact matching works for a fee figure. Free-text answers need a grader, such as a checklist of what a good answer must say, a second AI model that scores answers, or a person, because one right answer can be worded many ways.

Python
# A made-up bank's fee bot. The test set is old: the cash advance fee rose from 4 to 5 last month.
TEST_SET = {"late payment fee": "25", "foreign transaction fee": "3", "cash advance fee": "4"}
FEE_TABLE_TODAY = {"late payment fee": "25", "foreign transaction fee": "3", "cash advance fee": "5"}
LIVE_CHATS = [
    ("late payment fee", "25"),
    ("cash advance fee", "4"),
    ("foreign transaction fee", "3"),
    ("late payment fee", "25"),
    ("cash advance fee", "4"),
]

def bot(question):  # stands in for the model, which repeats its old answers
    return TEST_SET.get(question, "not sure")

# OFFLINE: run the fixed test set before release.
passed = sum(bot(q) == a for q, a in TEST_SET.items())
print(f"Offline: {passed} of {len(TEST_SET)} passed")

# ONLINE: score a sample of live chats (here every second one) against today's fee table.
sample = LIVE_CHATS[1::2]
wrong = [q for q, a in sample if FEE_TABLE_TODAY[q] != a]
print(f"Online: checked {len(sample)} of {len(LIVE_CHATS)} chats, {len(wrong)} wrong")

Output

Offline: 3 of 3 passed
Online: checked 2 of 5 chats, 1 wrong

What are the limits, and what do teams add?

Neither check is enough alone. Offline checks miss what nobody wrote down. Live checks show the bad answer only after a user has seen it. Anthropic's complete picture also lists user feedback, A/B tests, transcript review and human scoring.

  • “A complete picture includes production monitoring, user feedback, A/B testing, manual transcript review, and systematic human evaluation.”

    Anthropic

  • “Set up continuous evaluation (CE) to run evals on every change, monitor your app to identify new cases of nondeterminism, and grow the eval set over time.”

    OpenAI

OpenAI's guide also warns about test sets that do not copy real traffic patterns, so the set itself needs checking against live use. Anthropic adds that production monitoring kicks in after launch to detect distribution drift (the slow shift in the traffic the system sees) and unanticipated real-world failures.

Tip

Asked about the limits? Say offline tells you a change did not break the test, and online tells you what real users meet. Then say neither one proves the system is safe.

How would you set up checks for a claims agent?

An agent at a mid-size insurer reads claim forms and routes each one to the right team. Before launch, I build a test set from 500 past claims, each with the adjuster's real decision, and run it on every change. A release that falls below the agreed pass rate is blocked.

  • Before launch

    Fixed test set

    500 past claims, run on every change. Below the agreed pass rate, the release is blocked.

  • After launch

    Sampled live claims

    A share of new claims is scored. Low-confidence routings go to a person to check.

Every wrong route becomes a new test case, so the test set grows with the real work.

What does the interviewer want to hear?

A strong answer covers

  • A plain split: offline before release on a fixed test set, online on live traffic after it.
  • Why both: a test set cannot copy every real user, and live checks find failures after users do.
  • Sampling: score a share of live chats, so checks stay affordable.
  • The loop: every real failure goes into the test set.
  • Run the tests on every change, not once a quarter.
  • Honest limits: neither check proves the system is safe.

Common traps

  • Trap"Our offline score is 96 percent, so we are fine."

    BetterThe score only says the test passed. Check the test set against live traffic too.

  • Trap"Live checks are the real test, so we can skip the offline one."

    BetterLive checks find failures after users see them. Run the offline test first, so bad releases stop early.

  • Trap"A bigger test set always fixes it."

    BetterCoverage matters more than size. Add the real failures, and check the set matches production traffic.

Can you spot the gap?

Spot the gap

A team's offline score has been 96 percent for six months, but customers keep reporting wrong fees. Which setup line is the warning sign?

Quick check

An agent passes its offline test set on every release, yet users report wrong answers. What should the team add first?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q246How do you know your AI system actually works?11 min
  2. Q248What is a golden dataset, and how do you build one?11 min
  3. Q249What is LLM-as-a-judge?12 min
  4. Q251How do you calibrate a judge against humans?11 min
  5. Q264When do you need human evaluation?10 min

Learn it in depth

Last updated on 26 November 2026

Building an AI system that has to stay right after launch?

I design and build AI products and agents, including the evaluation and monitoring behind them. Book a short call and tell me what you need to measure.