Practical thinking about AI tools and everyday work.

Training-serving skew can hide between an AI notebook and production

An analyst comparing training data and live feature tables on two screens.
AI-generated photographic illustration; not documentary photography.

A model performs well in a notebook and disappoints after deployment. The saved model file may be identical. The data reaching it may not be.

Google’s production-ML guidance distinguishes schema skew from feature skew: inputs can follow different structures, or feature-processing code can produce different values. This makes the path into the model part of the evaluation, not merely plumbing around it.

Trace one example through both paths

Choose a permitted, representative example and compare its raw fields, transformations and final model inputs in training and serving. Look at units, missing-value handling, category mapping and the timing of any external lookup.

In an invented support-routing example, the notebook fills a missing account age with a separate missing-value indicator, while the service silently inserts zero. The same customer can therefore reach the model with a different meaning attached to the field.

Use synthetic or appropriately protected examples where possible. Logging every production feature without a data-handling plan can create a privacy problem while you investigate an accuracy problem.

Check availability at prediction time

A training dataset may contain information added after the event being predicted. Ask when each feature becomes available in the real workflow. A perfectly implemented transformation cannot rescue a feature that the service would not yet know.

Google’s Rules of Machine Learning recommends explicitly monitoring training-serving differences rather than assuming they will remain aligned.

Record the model version together with feature code, schema and relevant configuration. When a discrepancy is found, reproduce it on a small controlled sample before changing production. Compare the corrected pipeline against the baseline and watch the live result.

The first question should not always be “Do we need a larger model?” Sometimes the useful work is establishing that the existing model is receiving the same kind of information it was evaluated on.