Zenaique

How drift detection on LLM systems differs from drift detection on classical ML systems

Flashcard·Medium·4.0 · 0·~30s·Asked atBaiduSalesforce
Attempt it
TL;DR

LLM drift is detected on outputs and signals (judge scores, refusal rate, retrieval recall) against a rolling baseline, because the training distribution is owned by the vendor.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture a restaurant that gets ingredients from a supplier they do not own. They cannot inspect the supplier's farm to spot bad weather. What they can do is taste their own soup every morning against last week's soup and notice if today's batch tastes saltier or less savory than usual. A small panel of tasters runs the same six dishes daily and flags any dish whose rating dropped against the rolling weekly average. That is LLM drift detection: you taste the outputs because you cannot see the kitchen. The two usual culprits are the supplier quietly swapping ingredients (provider snapshot roll) or your own pantry getting rearranged (retrieval index rebuild).

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Classical ML drift detection rests on a baseline the team controls: the training-time feature and label distributions. LLM applications break this assumption because the team almost never trained the model. The hosted vendor owns the training distribution, the snapshot may advance silently, and even pinned open-weights deployments have their behavior shaped by prompts and retrieval state that change independently.

Drift detection therefore inverts: instead of comparing live inputs to a training baseline, the application compares live outputs and behavior signals to a baseline it computes itself, continuously, from recent history.

Why classical detectors do not transfer

PSI, KS tests, KL divergence on feature distributions, all of these answer the question "has the input distribution shifted from what the model was trained on?". Two parts of that question fall apart for LLM applications.

First, the input to a hosted LLM is a prompt plus context blob whose distribution the team can characterize but whose relationship to the model's training data is unknown. Computing the KL divergence between today's prompts and last month's prompts tells you that prompts changed; it does not tell you anything about whether the model handles them differently than it used to.

Second, the model itself is not stable in the way a deployed classical model is. A pinned XGBoost model in production has frozen weights. A gpt-4o alias does not, it can advance to a new snapshot during a routine vendor update. The thing you would be measuring drift against is itself drifting beneath you.

The correct shift in mental model is to stop trying to characterize "distribution drift" and start measuring "behavior drift" through proxies on outputs.

The output and behavior metric portfolio
Rolling baseline and the alerting math
The daily canary eval as the alerting backbone
Cause signatures and how the portfolio diagnoses them
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • Langfuse and Phoenix both surface rolling judge-score panels with built-in deviation alerts for production traces.
  • Inspect AI and OpenAI Evals can be wired into a nightly job to rerun a canary set against the current production model alias.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow would you confirm a suspected silent snapshot roll from the provider?
A

Pin a dated snapshot on a parallel route, rerun the canary set against both, compare scores; the gap is the snapshot delta.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Trying to apply classical feature-drift detectors to a hosted LLM whose training distribution you never had access to in the first place.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Why classical feature-drift detection does not transfer to hosted-model applications

  • The output and behavior metric portfolio (judge scores, refusal, length, format, retrieval, cost)

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Why a circuit breaker around the primary LLM provider is more than a fancy retry
Flashcard·Medium