By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
| Drift | What changed | How it appears | Detect with |
|---|---|---|---|
| Data drift | Users ask different things | New intents, new vocabulary, new languages | Question clustering and intent mix |
| Knowledge drift | The world changed; documents did not | Confidently outdated answers | Freshness probes on known-changed facts |
| Model drift | The provider changed the model | Grades slip with no deploy | Nightly eval vs rolling baseline |
Teams usually monitor only the second, because it is the one they understand. The other two are just as common and far more embarrassing.
You do not need sophisticated statistics. Log the intent classification and the embedding cluster of every question, then chart the share per intent over time. A new cluster that reaches 5% of traffic is either an opportunity or an outage in your help centre.
from collections import Counter
def intent_share(intents: list[str]) -> dict[str, float]:
total = len(intents) or 1
counts = Counter(intents)
return {k: round(v / total, 3) for k, v in counts.items()}
# today: {'returns': 0.31, 'shipping': 0.22, 'sizing': 0.18, 'unmatched': 0.29}
# a jump in 'unmatched' is your early warning that users ask something you cannot answerPick five facts you know have changed recently and assert them nightly. It is the cheapest possible index-health check.
PROBES = [
{"question": "What is the returns window?", "must_contain": ["14 days"]},
{"question": "Do you ship to Canada?", "must_contain": ["Canada"]},
]
def run_freshness_probes(answer_fn) -> list[str]:
failures = []
for probe in PROBES:
answer = answer_fn(probe["question"])
missing = [t for t in probe["must_contain"] if t.lower() not in answer.lower()]
if missing:
failures.append(f"{probe['question']} missing {missing}")
return failuresRun the same fixed dataset every night and compare today's scores against a rolling seven-day mean. A shift with no deploy and no data change is almost always a model update. The statistical tool is simple:
def z_score(current: float, mean: float, std: float) -> float:
"""How many standard deviations from the baseline. 0.0 if std is 0."""
if std == 0:
return 0.0
return round((current - mean) / std, 2)
def alert_level(z: float) -> str:
magnitude = abs(z)
if magnitude >= 3:
return "page"
if magnitude >= 2:
return "warn"
return "ok"Key takeaways
Three drifts: data (different questions), knowledge (stale facts), model (silent updates).
Chart the intent mix; a rising 'unmatched' share is an early warning.
Five freshness probes are the cheapest knowledge-drift alarm.
Use |z| ≥ 2 as investigate and |z| ≥ 3 as page, and prefer two consecutive bad days.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.