Research, signal design, and decision systems

Our AI pilot looked great in offline tests but underperforms in real operations. How do we determine whether the failure is actually data (drift, label issues,

Lucía Ferrer
Lucía Ferrer
13 min read·

Answer

Treat this as a measurement problem before a modeling problem. The fastest way to tell whether you have a data problem is to replay real production inputs offline using the exact same feature pipeline and then compare those results to what you saw in the pilot. If replay performance collapses, your pipeline, labels, or data generating process changed. If replay matches the pilot but the business result is still weak, the gap is usually in decision thresholds, workflow adoption, or evaluation bias rather than the core model.

Most teams jump straight to “the model must be bad” when production underperforms. In practice, the model often behaves exactly as trained, but reality changes, the data pipeline differs, or humans route around the system. Think of it like a student who aced the practice test but failed the final because the exam was in a different room with different lighting and half the questions were missing. Your job is to figure out which room you are in.

Define the failure precisely (before debugging)

Before you touch features or retrain, pin down what “underperforms” means. Production failure can be any of these: worse business KPI, worse model metric, worse performance for key segments, or operational breakage such as latency and missing inputs.

Start with a short, explicit checklist and write the answers down so everyone argues about the same thing.

  1. Business KPI vs model metric: Which KPI is down (revenue retained, fraud dollars prevented, handle time, conversion), and which offline metric looked good (AUC, PR AUC, accuracy)? If the model optimized a proxy that does not map cleanly to KPI, you can “win” offline and still lose in operations, a pattern widely discussed in offline vs online metric gaps.

  2. Decision threshold: What score threshold or policy turns a prediction into action, and did it change between pilot and production?

  3. Segment breakdowns: Where is the underperformance concentrated (region, channel, product line, device, customer tier, time of day)? A flat average can hide a disaster in one slice.

  4. Latency and availability constraints: Are you timing out and falling back to defaults? If the system silently switches to “safe mode,” your model can look fine while decisions are not.

  5. Ground truth in production: What is the exact definition of the label, who creates it, and when does it arrive? If production “truth” is actually a loosely coded field, your evaluation may be grading the wrong test.

Practical tip: Capture baseline performance from the rules or manual workflow that the model is replacing, measured on the same time window and segments. Without that baseline, you cannot tell whether the model is worse, or whether the world got harder.

Recreate production conditions in an offline replay (the quickest differentiator)

If you only do one diagnostic step, do this. Build a replay test that uses production logs as inputs, reconstructs the feature vector exactly as served, and then evaluates predictions against the labels once they arrive.

The replay test is your differentiator because it answers a simple question: is the model failing on the same inputs it actually saw in production, or is the problem introduced by your offline dataset and evaluation setup?

A solid replay typically includes the raw request payload or identifiers, timestamps, the exact model version, the served feature values (or the ability to deterministically rebuild them), and the action taken. Then you attach delayed labels later.

Pass or fail logic:

  1. If replay performance is close to your offline validation, but production KPI is still weak, you likely have a decisioning or workflow problem. Look at thresholds, capacity constraints, user behavior, and calibration.

  2. If replay performance is materially worse than offline, you likely have data pipeline mismatch, training serving skew, drift, or label definition issues.

Practical tip: Time correctness matters. Use point in time feature snapshots and time correct joins. Many offline wins evaporate when you stop accidentally using “future” data that was not available at decision time.

This focus on matching real world context and conditions aligns with the broader “context gap” explanation for why AI systems fail outside the lab. Production is not your notebook, and it will not politely behave like one.

Check for training serving skew and feature parity issues

Training serving skew means the model sees one reality during training and another during serving. This can be as obvious as a missing column, or as subtle as a timezone shift that moves events across the day boundary.

Look for feature parity issues that produce consistent, explainable degradation.

  1. Missing feature rates: Compare missingness for each feature in training, pilot evaluation, replay, and live serving. A jump from 2 percent missing to 40 percent missing will cripple most models.

  2. Default and fallback values: In production, services often insert defaults on timeouts. Defaults are not neutral, they are a new data distribution.

  3. Schema and units: Currency in cents vs dollars, duration in seconds vs milliseconds, different encoding of categories.

  4. Categorical mapping drift: New categories appear, old ones get renamed, or the “unknown” bucket balloons.

  5. Join and key failures: If your online join misses customer records or inventory data, you are scoring a different entity than you trained on.

Quantify it instead of eyeballing. Run per feature distribution tests (PSI or KS), missingness deltas, and correlation shifts between key features and the target. Also add minimal production logging so you can see what the model actually received: a feature vector hash, feature counts, and the top missing features per request.

Common mistake: Teams retrain immediately when performance drops, but the real culprit is a silent feature pipeline change. Retraining on broken serving features just teaches the model to cope with broken plumbing. Fix parity first, then retrain if needed.

Diagnose drift: covariate, label, and concept (and which one you have)

Drift is real, but not all drift is the same. Naming the type tells you what to measure and what lever to pull.

Covariate drift is when the distribution of inputs changes. Maybe customers shift channels, product mix changes, or new devices dominate. You detect this with feature distribution monitoring, windowed over time, and compared to a baseline period. Account for seasonality, otherwise you will “detect drift” every Monday like it is a surprise.

Label drift is when the base rate of the outcome changes. Fraud rates can spike during holidays, churn can rise after a pricing change. Monitor outcome frequency over time and by segment. Label drift can make a perfectly stable model look worse simply because the world’s base rate moved.

Concept drift is the hardest. It means the relationship between inputs and outcomes changes. Your features still look similar and the base rate might be stable, but the model’s conditional performance deteriorates. Clues include worsening calibration, rising error for stable subgroups, and residual patterns that shift over time.

A useful heuristic:

  1. If inputs changed a lot, suspect covariate drift.

  2. If outcome rates changed a lot, suspect label drift.

  3. If neither changed much but performance still drops, suspect concept drift or a workflow change.

Quiet failures are particularly dangerous because they can unfold gradually while dashboards still show “green” system health. That is why drift monitoring needs to be tied to both data health and outcome metrics.

Rule out leakage and evaluation bias that inflated offline results

Sometimes the production system is not worse. The offline test was overly optimistic.

Leakage is when training features contain information that would not be available at decision time, or are downstream of the outcome. It can be overt, such as a “refund issued” flag used to predict refunds, or subtle, such as a timestamp or status field that is only populated after escalation.

Do a no peek feature audit. For each important feature, ask two questions.

  1. Could this value exist at the moment the prediction is made?

  2. Could this value be influenced by the decision policy, or by the outcome itself?

Then validate with time split evaluation rather than random splits, so the model is evaluated on later time periods that better resemble deployment. Editorial discussions of offline vs online paradoxes often boil down to this point: offline evaluation is easy to game unintentionally if you do not respect time and causality.

Selection bias is the other classic. Your training data may contain mostly “easy” cases, or only cases that humans chose to act on. In operations you face the full distribution, including the messy edge cases humans used to filter out.

Audit label quality and inconsistent definitions across operations

Option Best for What you gain What you risk Choose if
Define Business KPIs & Model Metrics Any AI project, especially new ones Clear success criteria. alignment with business goals Model optimizes for wrong outcome. project deemed a failure despite good technical performance You are starting an AI project or re-evaluating an existing one's impact
Reproduce Production Offline (Replay Test) Diagnosing production failures. validating model updates Pinpoint if failure is model or data pipeline. faster debugging Complex setup. requires robust logging and data infrastructure Your model performs differently in production than in offline tests
Track Data Drift (Covariate, Label, Concept) Long-term model performance and relevance Understanding how real-world changes impact your model. timely retraining Complex to implement. can be noisy without proper windowing/seasonality handling Your data environment or user behavior changes over time
Implement Leakage & Selection Bias Checks Ensuring model fairness and generalizability Robust, fair models. avoid misleading performance metrics Can be subtle and hard to detect. requires careful feature engineering You suspect your model is using information it shouldn't have or is biased
Establish Ground Truth Definition & Collection Accurate model evaluation and continuous learning Reliable labels for training and evaluation. clear understanding of reality Expensive and time-consuming. inconsistent labeling introduces noise You need to measure true model performance against real-world outcomes
Monitor Training-Serving Skew Maintaining model reliability in production Early detection of data pipeline issues. consistent model behavior Overhead of monitoring infrastructure. false positives if thresholds are too strict You have a model deployed in production and want to prevent silent failures

If your “ground truth” is noisy or inconsistently defined, the best model in the world will look unstable. This is especially common across multiple sites, teams, or vendors where the same event is coded differently.

Check these label failure modes.

Label delay distribution: How long after the decision does the label arrive, and does that delay vary by segment? If you evaluate too early, you undercount positives that arrive late.

Backfilled corrections: Operations teams often correct records later. Offline training might include corrected labels while production evaluation uses preliminary ones.

Inconsistent definitions: One region treats “canceled” as a negative outcome, another treats it as neutral. That is not a modeling problem, it is a semantics problem.

If humans label outcomes, measure inter annotator agreement on a sample and run spot checks. Also run a short alignment workshop where operations and data science agree on one written label definition with examples and counterexamples.

Evaluate process changes and human workarounds (the hidden failure mode)

Even when the model is fine, the system can fail because people adapt. Users might ignore alerts, route around the tool, or change their data entry behavior because they know the model is watching. AI in production is always a social technical system, not a math artifact.

Look for:

Alert fatigue: Too many flags cause teams to stop trusting any of them.

Automation bias: Users accept the model output without thinking, which can create new error patterns.

Strategic behavior: Sales reps or customers learn how to “look good” to the model.

UI bypass: People export to spreadsheets or use side channels, so the model is not in the loop.

Instrument the workflow, not just the model. Capture the decision context, the user action taken, and a reason code for overrides. If you can, use an A/B test or stepped rollout so you can separate model quality from adoption and process effects.

Confirm decision policy: thresholds, costs, and calibration

A model score is not a decision. Production performance often collapses because the decision policy around the model was never re optimized for real costs and constraints.

Start with calibration. If a model’s 0.8 score does not mean “about 80 percent likely,” thresholding becomes guesswork. Calibration drift can also be an early sign of concept drift.

Then confirm your threshold choices by segment and by capacity constraints. For example, a fraud model might need to fit a fixed review queue. If the threshold is set too low, you flood the queue and miss the truly risky cases. If it is too high, you starve the queue and leave value on the table.

Tie the threshold to an explicit cost matrix. What is the cost of a false positive versus a false negative, in dollars and operational load? If you optimized PR AUC offline but your business cares about net cost, you will get mismatched incentives.

Do targeted error analysis to pinpoint root cause

Once you have replay results and parity checks, do not stop at “overall accuracy fell.” You need to know where the KPI loss is coming from.

Run slice based analysis across the dimensions that matter to the business: geography, product line, channel, device, customer tier, and time. Identify the top five slices that contribute most to KPI loss. Often, fixing two slices recovers most of the value.

Then review concrete errors. Pull the top false positives and top false negatives, and review them with domain experts. Ask whether the model is missing key information, whether the label is wrong, or whether the action policy is inappropriate.

Use feature attribution tools as a sanity check, not as a truth machine. If the model is heavily driven by a feature that should not be available at decision time, you likely have leakage. If it is driven by a constant default value, you likely have missingness or fallback issues.

Create a counterexample library. Each time the model fails in a meaningful way, capture that case with context, label, decision, and why it failed. Over time this becomes your best asset for prioritizing data fixes and policy changes.

Decision framework: fix data, fix model, or fix the system (with go or no go gates)

At this point you should be able to classify the failure. The mistake is to treat everything as “model quality.” Your options are usually one of three.

Fix data when replay performance is worse than offline and you find skew, missing features, schema changes, label noise, or drift. Your first lever is repairing feature parity, then tightening label definitions, then refreshing training data with time correct snapshots.

Fix model when the pipeline is sound but the model is under powered for new patterns, or concept drift has genuinely changed the mapping. This might mean new features, a different objective, or retraining with more recent data.

Fix the system when replay performance is good but real world impact is weak. This is thresholding, calibration, queue design, UI design, adoption, and incentives. It is the unglamorous part, which is exactly why it matters.

Use simple go or no go gates so you do not burn months on the wrong lever.

Gate 1, measurement: We can compute KPI and model metrics reliably with a clear ground truth definition and a baseline comparison.

Gate 2, replay: Offline replay on production inputs matches live scoring behavior.

Gate 3, parity: Feature availability and distributions are within agreed bounds.

Gate 4, decisioning: Thresholds and costs are agreed, calibrated, and feasible with operational capacity.

Gate 5, adoption: Users actually use the output as intended, with override reasons captured.

Below is a quick decision table to keep the conversation grounded.

Define Business KPIs & Model Metrics: Locks in what “success” means before you debug the wrong thing.

Reproduce Production Offline (Replay Test): Separates model issues from pipeline and context issues quickly.

Track Data Drift (Covariate, Label, Concept): Tells you whether the world moved, and how.

Implement Leakage & Selection Bias Checks: Prevents you from believing an offline score that was never achievable in production.

If you want a practical starting move: run the replay test on the last two weeks of production traffic, then do a parity report of missingness and distribution shifts for your top 20 features. Do not retrain until you know whether the model saw the same reality in training and in serving. Your goal is not to “save the model.” Your goal is to make the overall decision system reliable enough that the business can trust it.

Sources


Last updated: 2026-04-23 | Calypso

Tags

ai-doesnt-fail-data-does-the-real-reason-ai-projects-collapse