Playbook
How to Detect Model Drift in Production
Amber Jain
2 min read
Detecting model drift means monitoring a deployed model for the gradual decay in accuracy that happens when the live data, or the relationship it learned, moves away from what the model was trained on.
A model is only as good as the world it was trained on, and that world changes. Drift is the silent degradation that follows: predictions get quietly worse while the model keeps running. Detecting it means watching both the inputs (has the data shifted) and the outcomes (are predictions still accurate), and triggering retraining before the decay hurts.
Data drift versus concept drift
Two things drift. Data drift is when the input distribution changes, the model sees inputs unlike its training data. Concept drift is when the relationship between inputs and the target changes, so even familiar inputs now map to different outcomes. Both degrade accuracy, and you detect them differently: data drift by comparing input distributions, concept drift by tracking prediction accuracy against ground truth.
The challenge of delayed ground truth
Often you learn whether a prediction was right only later (did the flagged transaction turn out to be fraud), so you cannot measure accuracy in real time. That is why input-distribution monitoring matters: a shift in the inputs is an early warning you can see immediately, before the accuracy numbers confirm the damage.
- Baseline the training distribution. Record the input distributions and performance the model was trained and validated on.
- Monitor input distributions. Compare live inputs to the baseline to catch data drift early.
- Track prediction accuracy. As ground truth arrives, measure accuracy against it to catch concept drift.
- Set drift thresholds. Define how much shift or accuracy loss triggers action.
- Trigger retraining. When thresholds are crossed, retrain or roll back to a known-good model.
How Opstral handles model drift
Opstral's AI Ops pillar operates models in production, monitoring input distributions and performance, and when drift crosses a threshold Sentinel AI acts, alerting, triggering retraining, or rolling back to a known-good model, through a governed Action Ticket.
Frequently asked questions
How do you detect model drift?
Monitor input distributions against the training baseline to catch data drift early, and track prediction accuracy against ground truth to catch concept drift.
What do you do when a model drifts?
Retrain on fresh data, or roll back to a known-good version, once drift crosses a defined threshold. Input monitoring gives the early warning before accuracy confirms the decay.
What statistical tests should we use to detect data drift?
For numerical features, the Kolmogorov-Smirnov test compares two distributions and returns a p-value; the Population Stability Index (PSI) is more common in credit-risk settings and easier to interpret. For categorical features, chi-squared or Jensen-Shannon divergence work well. In practice, the choice matters less than the discipline of running any of them consistently against a stable baseline and alerting when the metric crosses a defined threshold.
How often should drift detection run?
It depends on how fast your world changes. For fraud-detection models where adversaries adapt quickly, hourly or daily drift checks are reasonable. For customer-churn models where behaviour shifts slowly, weekly is usually enough. For most production models, daily is a sensible starting point, tuning down (weekly) or up (hourly) based on how frequently the checks actually surface real drift.
What is the interaction between drift detection and Agent Ops for LLMs?
LLM agents drift differently from classical ML models. The input distribution (prompts) can shift, and the model or system prompt can change under you (via provider updates). Agent Ops adds signals a traditional MLOps drift detector does not: quality evaluation against expected outputs, cost per interaction, and agent-trace fidelity across tool calls. The same principle applies: baseline, monitor, threshold, act. The signals are just different.