Models fail silently
Unlike a service that throws a 500, a model that's wrong just returns confident garbage. Monitoring is how you know. Track two layers:
- Operational — latency (p95/p99), throughput, error rate, cost, resource use. Standard service monitoring.
- Model quality — prediction distributions, confidence, and (when labels arrive) accuracy/business metrics. This is the layer teams forget.
Drift — the core ML monitoring concept
The world changes, so a model trained on old data degrades:
- Data drift (covariate shift) — the input distribution changes (new user behavior, a new product, seasonality). The model sees inputs unlike its training data.
- Concept drift — the relationship between inputs and the target changes (what predicted fraud last year doesn't this year). More dangerous, harder to detect.
- Label lag — you often don't get ground-truth labels immediately (did this "fraud" flag turn out true?), so you monitor proxies (input drift, prediction drift, confidence) as early-warning signals before accuracy can be measured.
Detect drift statistically: compare production feature/prediction distributions to a training baseline (population stability index, KS test, etc.) and alert when they diverge.
Closing the loop: retraining
Drift triggers retraining — either scheduled (retrain weekly) or triggered (retrain when drift crosses a threshold). Automating this (continuous training) keeps the model current without manual firefighting. But retraining needs fresh labeled data and a gate (the new model must beat the current one on eval before promotion).
For LLM apps
"Drift" shows up as new query types the system wasn't built for, a stale RAG index, or a provider model update silently shifting behavior. Monitor faithfulness/quality on sampled traffic (Evaluation course) and watch for distribution shift in inputs and outputs — and pin/track the model version so a provider update doesn't surprise you.