Intermediate

Root Cause Analysis

A five-step framework for diagnosing whether drift came from your data, your model, your evaluation, or the world - so you pick the right fix on the first attempt.

✍️ AI School Editorial Team · Lilly Tech Systems 📅 Published Jul 30, 2026 · Reviewed Jul 30, 2026

Why the Wrong Diagnosis Is Expensive

A retrain takes days or weeks, consumes significant compute, and still requires a deployment cycle. If the actual problem was a broken data pipeline that started sending malformed inputs, a retrain changes nothing - the pipeline is still broken. The model learns from bad data and performs the same way. You spent two weeks for zero improvement.

Root cause analysis before remediation is not optional overhead. It is the only thing that ensures the fix you pick actually addresses the problem. The five steps below are structured to rule out cheaper causes first, escalating to more expensive ones only when necessary.

💡
Time budget guidance: Good RCA for most drift incidents should take 4-8 hours, not days. If you need a dedicated week, the incident is either unusually complex or the investigation lacks structure. Run through these five steps in sequence; stop as soon as you have identified the root cause.

The Five-Step Drift RCA Framework

1
Step 1: Rule out infrastructure and pipeline issues first

Before treating any performance change as model drift, verify the data pipeline is intact. Infrastructure problems frequently masquerade as drift because they change the distribution of inputs arriving at the model. Check: Have any upstream data sources changed schemas? Are there new NULL proportions or encoding changes? Has any ETL job failed silently and started sending default or stale values? Has the serving infrastructure been updated (new container image, new runtime version)?

Resolution time if positive: Hours to a day. Fix the pipeline. Recompute the drift metrics on clean data - most apparent drift disappears.

2
Step 2: Check for external model or provider changes

For LLM applications: did your provider update the model version, change default parameters, or modify safety filters during the period when drift appeared? For any model served by a third-party API: check the provider's changelog and status page. For internally served models: check the model registry for any recent deployments that may have gone out without proper announcement.

Resolution time if positive: Hours. Update the prompt to compensate, pin to a specific model version, or roll back to the previous version if one is available.

3
Step 3: Localize the drift to a feature or input segment

Run your PSI and KS detection metrics broken down by feature. Identify which specific features have shifted. Then segment your production inputs and examine whether the drift is concentrated in a specific user cohort, product category, geography, or time-of-day window. Localization tells you whether you have a broad distributional shift (entire population) or a segment-specific shift (e.g., mobile users only, a new enterprise customer, a recently launched geography).

This step tells you: Is the drift input-driven (data drift from a specific source) or broad (potentially concept drift)?

4
Step 4: Collect fresh labels for the drifted segment

For the segment identified in Step 3, collect ground-truth labels for a sample of 100-500 recent predictions. Compare the model's predictions against these labels. Calculate accuracy (or your relevant metric) on this fresh labeled sample and compare it to the baseline accuracy at deployment.

What the result tells you: If accuracy on the new segment's inputs matches deployment-time accuracy, you have data drift without quality impact - the model is still correct, just being called on a different input distribution. If accuracy has dropped, you have either concept drift (the relationship changed) or the data drift is severe enough that the model cannot generalize to it.

5
Step 5: Evaluate the model on your original test set

Run the drifted model against your original, unchanged holdout test set from deployment time. If performance on this held-out set has not degraded, your model is unchanged - the drift is entirely environmental (data or concept drift in the input population). If performance has degraded on this fixed test set, you have a model regression - likely caused by a silent provider update, an infrastructure change, or (for internally served models) a deployment error.

The Diagnosis Decision Matrix

After running all five steps, map your findings to a root cause and recommended action:

Input PSINew-segment accuracyOriginal test set accuracyRoot CauseRecommended Fix
High (drift)StableStableData drift - input shift, model still correctMonitor; no fix needed unless segment grows large enough to warrant retraining
High (drift)DegradedStableData drift - inputs outside training distributionRetrain on recent data including new segment
StableDegradedStableConcept drift - world changed, inputs sameRetrain on recent labeled data; may need new features
StableDegradedDegradedModel regression - provider or deployment changeRoll back model version; investigate pipeline change
StableStableStableEvaluation drift - metric or label driftReview evaluation methodology; check label collection process
StableStableStable, but user complaints upProxy metric divergence - evaluation does not capture what users care aboutRevise evaluation metrics; run user research

Worked Example: Embedding Drift in a RAG System

A customer service team noticed that their LLM-powered FAQ assistant was producing less relevant answers starting approximately 6 weeks after a document index refresh. User satisfaction with responses dropped from 4.4 to 3.8 out of 5.

📚
RCA walkthrough:
  • Step 1: Data pipeline clean. The document ingestion pipeline was intact. New documents were being indexed correctly.
  • Step 2: Checked provider changelog. The embedding model provider had silently updated the embedding model version during the 6-week window.
  • Step 3: Retrieval recall@5 on the held-out eval suite had dropped from 88% to 71% across all query types - not segment-specific.
  • Step 4: Fresh labels confirmed that queries were returning topically correct but not best-match documents.
  • Step 5: Original test set (indexed documents only) performed at 91% - slightly above baseline. The problem was that old documents were indexed with the old embedding model and new documents with the new one, creating a mixed-model index where cosine similarity comparisons were not meaningful across the split.
  • Root cause: Embedding model drift due to provider update + mixed-model index.
  • Fix: Re-index all documents with the new embedding model. Implement version pinning for the embedding model to prevent silent future updates. Full re-index took 4 hours; recall@5 returned to 87%.
RCA record keeping: Document every drift incident with five fields: (1) first detection timestamp, (2) estimated onset (when did it actually start?), (3) root cause, (4) fix applied, (5) verification method. After 5-10 incidents, patterns emerge - you will likely find that 80% of your drift incidents share 2-3 root causes. That concentration informs your preventive investment in the final lesson.

Ready to Go Deeper?

Live instructor-led courses from our partners. Affiliate disclosure.