Advanced

Advanced 9 · ML-Specific Data Considerations
⏱️ Est. ~30 min
Advanced 9 · Section 1

ML data layer: what changes compared to “normal” analytics

ML introduces reproducibility, versioning, leakage risk, and ongoing drift — so data management must support the full lifecycle.

Key shift: analytics asks “what happened?”. ML asks “what will happen?” and then has to keep being right over time.

Machine learning changes the relationship between data and output. In ML, data is not only used for analysis. Data becomes part of the system’s behaviour: the model learns patterns from historical examples and then applies those patterns to new situations. That means the quality, structure, timing, and representativeness of the data directly shape how the system will behave in production.

For decision makers, the most important mindset shift is this: ML is not a one-time analytical project. It is an operational system that depends on data over time.

That means your data needs to be reproducible (you can recreate training sets), traceable (what data fed which model), and monitorable (detect drift).

Experimentation
Training data
Features
Deployment
Monitoring

Reproducibility means you can answer questions such as:

  • Which dataset version was used to train this model?
  • Which time period did the data cover?
  • Which filters, transformations, and feature definitions were applied?
  • Which code version and configuration produced the result?
  • Which evaluation dataset was used to decide that the model was “good enough”?

This is not only a technical concern. It affects trust, auditability, debugging, onboarding, compliance, and investment decisions. If results cannot be reproduced, it becomes very difficult to know whether the organization is improving or merely getting lucky.

Before asking “Which model should we use?”, ask: “What exactly will the model learn from, and do we trust that data enough to let it influence decisions?”
Bottom line: ML-specific data management is about making learning systems reliable over time. The goal is not to add bureaucracy. The goal is to make experimentation faster, deployment safer, and trust easier to maintain.
Deep Dive: Why ML needs a different data discipline

1. Data is no longer just an input — it becomes part of the product

In a reporting system, data is mostly consumed by humans. In an ML system, data is consumed by a model. The model does not “understand” your business context in the way a person does — it learns statistical relationships from the examples it receives. If those examples are incomplete, biased, outdated, poorly labelled, or inconsistent, the model will learn from that. This is why “we have data” is not enough. For ML, you need data that is usable for learning: sufficiently clean, representative, documented, versioned, and connected to a clearly defined objective.

2. Evaluation is not a final step — it is part of the system

In many software projects, testing happens shortly before release. In ML and AI systems, evaluation has to happen repeatedly: before development, during experimentation, before deployment, after deployment, and whenever the system changes. Good evaluation starts with a baseline — if the ML system cannot reliably beat a simple baseline in the situations that matter, it may not be worth operationalizing yet. Evaluation should also separate different questions:

  • Model quality: does the model make useful predictions or outputs?
  • Business quality: does it improve the decision or workflow we care about?
  • Operational quality: is it reliable, fast enough, secure enough, and affordable?
  • Risk quality: does it behave acceptably in edge cases, sensitive cases, and failure modes?

3. Production data is a signal — and ML systems create feedback loops

A common ML failure pattern is that a model performs well during development but disappoints in production, because the data used for training does not match the data the model sees after deployment. Production data tells you whether the model still fits the real world; if you do not collect and monitor that signal, degradation becomes invisible until users lose trust. Once deployed, a model can also influence the very data it later learns from: a recommendation model changes what users see, which changes what they click, which changes future training data. Teams should intentionally decide what feedback they want to capture, how reliable it is, and how it will be used.

🧩 Task

Interactive task: Pick the failure mode your organization is most at risk of this quarter. You’ll get a recommended first investment.

Advanced 9 · Section 2

Experimentation workflow

Fast learning requires tracking what changed: data, code, parameters, and results — so you can repeat wins and debug failures.

In ML, “What changed?” is the most valuable debugging question. If you can’t answer it, scaling becomes guesswork.

Machine learning development is experimental by nature. Teams try different datasets, feature definitions, labels, model types, hyperparameters, prompts, and evaluation metrics. Some changes improve results. Some make results worse. Some appear to help in development but fail later in production.

If a model performs better today than yesterday, the team needs to know why. Was it a better feature? A different train/test split? A larger dataset? A changed learning rate? A new model version? A data leak? Without tracking, the team may celebrate a result that cannot be reproduced or debug a failure with no evidence.

Experiment tracking is not bureaucracy. It is how teams turn AI work from trial-and-error into repeatable learning.

At minimum, every meaningful ML experiment should track four categories: data, code, configuration, and results. A useful prioritization is:

  • Must track: data version, code version, configuration, metrics, model artefact.
  • Should track: error examples, plots, runtime, resource usage, notes.
  • Track when relevant: subgroup metrics, fairness checks, cost, latency, carbon footprint, approval status.

The goal is not to create beautiful dashboards. The goal is to support better decisions.

Practical rule: Track enough that a teammate can understand the result without asking the person who ran it.
Deep Dive: Experiment tracking — knowing what changed and why it mattered

1. What should be tracked?

The dataset is often the most important part of an ML experiment: track the dataset version or snapshot date, source systems, date range, filters applied, label definitions, and the train/validation/test split strategy. For code, small changes can have large effects — track the git commit, branch, and dependency versions where relevant. Configuration covers the choices that shape the experiment without changing the code: model type or checkpoint, hyperparameters, feature set, prompt version if using LLMs, retrieval settings if using RAG, and the random seed. Results should include more than one final score: metrics, loss curves, performance on important slices, examples of correct and incorrect predictions, and the decision made after the experiment.

2. Experiment tracking and versioning belong together

Imagine that a model shows a strong improvement. The team wants to use it as the new baseline. But then nobody can reproduce the result. The dataset has changed. The script was edited. The random seed was not recorded. The model checkpoint was overwritten. Now the team does not know whether the improvement was real. This is not a rare edge case — it is a normal failure mode in ML teams that do not track experiments systematically. Versioning should cover data versions, code versions, configuration versions, model versions, and evaluation versions. Without versioning, experiment tracking becomes a diary. With versioning, it becomes a reproducible record.

3. From a minimum viable stack to a model registry

For a single person exploring an idea, the minimum viable setup can be simple: git for code, datasets with clear names or snapshot dates, experiment notes in a README or spreadsheet. Once several people work together, shared repositories, naming conventions, configuration files, and a shared experiment table or tracking tool (MLflow, Weights & Biases, DVC) become useful — the tool matters less than the discipline. As AI work matures, a model registry separates “all experiments” from “candidate models” and “approved production models”: it records which model artefacts exist, which have been evaluated, which are approved, and which are deployed. The same principle applies to prompt-based, RAG, and agentic systems: if system behaviour depends on it, it should be traceable. The key is proportionality. Do not overbuild. But do not rely on memory either.

Track learning, not only numbers: each important experiment should include a short note — what was the hypothesis, what changed compared to the previous run, did the result support it, and what should be tried next.
Advanced 9 · Section 3

Training data management

Training sets should be versioned, well-split, and defensible. Most model issues trace back to splits, labels, and leakage.

Training data is not just “input material”. It is the curriculum you give the model. A model does not learn your business goal directly — it learns patterns in the training data. If the training data represents the right situations, contains reliable labels, avoids hidden shortcuts, and reflects the conditions the model will face in production, the model has a chance to generalize.

“How much data do we need?” is less useful than looking at three dimensions together:

  • Quality: Are the examples correct, relevant, clean, and consistently labelled?
  • Coverage: Does the dataset include the situations the model must handle?
  • Quantity: Is there enough data for the model to learn stable patterns?
Better training data often improves AI systems more reliably than simply trying a larger model. The question is not only “How much data do we have?”, but “What will the model learn from this data?”

To evaluate a model honestly, teams usually split data into separate parts:

  • Training data: examples used to teach the model.
  • Validation data: examples used during development to compare choices.
  • Test data: examples kept aside for a final, more independent assessment.

The split is not a technical detail — it defines what kind of trust you can place in the evaluation result. If time matters, a time-based split is often safer: train on earlier data and evaluate on later data. If entities matter — customers, patients, machines, stores, or suppliers — an entity-based split may be necessary. Otherwise, the model may see examples from the same customer during training and testing, making the evaluation unrealistically easy.

🧪 Example — leaky vs. safe split (churn)
✗ Leaky
Random split of all customer rows — the same customer lands in train AND test. Offline: 96% 🎉 Live: ~70% — the model "remembered" customers, it didn't learn churn.
✓ Safe
Split BY customer (entity), and by time where seasonality matters. Offline: 78% Live: ~77% — the offline number finally predicts real performance.

A "great" offline score that collapses in production is usually leakage, not luck. Pick the split that mirrors how the model is actually used.

Practical rule: Split first, then preprocess using only information from the training split. For time-dependent problems, respect time. For customer-, patient-, machine-, or account-dependent problems, respect entity boundaries.
Deep Dive: Training data is where models learn the wrong lessons

1. Data leakage: when the model gets a hidden cheat sheet

Data leakage happens when information that would not be available at prediction time accidentally enters the training process. The model learns from a hidden shortcut: during evaluation, performance looks excellent; in production, the shortcut disappears. Common patterns include future information in features, preprocessing before splitting, duplicates across splits, group leakage, and process leakage — for example, a churn dataset with a field that is only updated after a customer has already contacted support to cancel. The key question is: Would this information really be available at the moment the model must make the decision?

2. Labels are assumptions, not automatically truth

Labels are often treated as ground truth, but in business settings they are frequently imperfect. A “fraud” label may only exist for cases that were investigated. A “machine failure” label may be entered inconsistently by technicians. If labels are noisy, the model learns a noisy target; if labels reflect biased processes, the model may reproduce those biases. Label management needs standards: clear definitions of each label, guidelines for human annotators, checks for disagreement, and spot reviews of edge cases. Label quality is model quality — if the organization cannot define the target consistently, the model cannot learn it reliably.

3. Version and freeze datasets — synthetic data is useful, but not magic

If a dataset is used to train or evaluate a model, it should have a version. Data changes: new rows arrive, labels are updated, preprocessing logic evolves. If the dataset is simply called “training_data.csv” and overwritten repeatedly, the organization loses memory. A disciplined folder structure, immutable snapshots, and a short dataset README can already prevent many problems. Synthetic and augmented data can increase coverage and create examples for rare cases — but use them to fill specific coverage gaps, review samples manually, keep synthetic data identifiable in the dataset version, and avoid feeding unverified model outputs back into training blindly.

🧩 Task

Interactive task: Pick the safest split strategy for each scenario.

Advanced 9 · Section 4

Feature engineering & feature stores

Consistency is the real goal: the same feature logic should behave the same in training and in production.

A feature is not just a column in a table. It is a signal the model can use to make a prediction or decision. A churn model might use features such as “number of support tickets in the last 30 days”, “contract age”, or “payment delays”; a fraud model might use “number of transactions in the last hour” or “new device”. Each of these features is a small business hypothesis: this signal may help the model make a better decision.

The central danger is training-serving skew: the model sees features during training that differ from the features it sees during production. The result can be confusing — the model performs well in offline evaluation and poorly after deployment, and the team blames the model or the market, but the real problem is that the model is being fed different data than expected. The practical rule: the feature logic used in training and production must be the same logic, or at least tested as equivalent.

Feature engineering is not merely “data preparation”. It is the process of deciding which business signals the model should be allowed to learn from.

You may be too early for a feature store if:

  • you have one or two models,
  • most predictions are batch-based,
  • features are simple and cheap to compute,
  • the same people build and deploy the models,
  • training and production use the same pipeline already.

You may be approaching the point where a feature store is useful if:

  • several teams reuse the same features,
  • production features differ from training features,
  • features are expensive to compute,
  • real-time predictions need server-side feature enrichment,
  • you need point-in-time lookups for training data.
Practical rule: Start with shared, versioned feature logic. Add a feature store when reuse, online serving, point-in-time lookup, or governance complexity becomes real — not just because the architecture diagram looks more mature.
Deep Dive: Features are where data becomes model behaviour

1. What is a feature?

A feature is an input signal used by a model. It can be:

  • Raw: a value used almost as it appears, such as age, price, or product category.
  • Transformed: a cleaned or normalized version of a raw value.
  • Aggregated: a summary over time, such as “average order value in the last 90 days”.
  • Derived: a signal calculated from several fields, such as “days since last purchase”.
  • Learned: a representation learned by another model, such as an embedding.

In foundation-model applications the idea of “feature” is broader: a retrieved document, an embedding vector, a prompt template, or a tool result can all act like features because they shape the model’s output. The language may change, but the principle remains: control the inputs that shape model behaviour.

2. Point-in-time correctness: using only what was known then

When you create training examples from historical data, each example should only use information that would have been available at that moment in time. This is especially important for rolling averages, recent activity counts, customer status, risk scores, and profiles that are updated over time. The question to ask: At the time the model would have made this prediction, would this feature value already have been known? If the answer is no, the feature introduces leakage — it may make the model look better in testing than it will be in real life.

3. Keeping feature logic consistent — and monitoring feature quality

There are three common approaches: put preprocessing inside the model (simple, but harder to reuse), use a shared, versioned transform function for both training and production (often enough for startups and SMEs), or use a feature store — a central system for managing, computing, storing, and serving features. Features can also break even when the model is unchanged: a source system changes field names, a sensor starts sending null values, a pipeline runs late. Monitor freshness, missingness, validity, distribution changes, schema changes, and cardinality. If performance drops and a key feature has silently changed, the first response may be to fix the pipeline — not to retrain the model.

🧩 Task

Interactive task: Decide if you need a feature store now, later, or not at all — and why.

Advanced 9 · Section 5

Model lifecycle & MLOps basics

Versioning, rollout patterns, and rollback are how you make AI safe to operate in real workflows.

The model lifecycle is a loop, not a line Data Train Validate Deploy Monitor monitoring feedsthe next data round
Versioning, rollout and rollback make a model safe to change. Monitoring closes the loop — what you learn in production becomes the next training round.

A model that works in development is not yet an AI product. It still needs to be packaged, deployed, monitored, updated, rolled back if necessary, and connected to the workflow where it creates value. This is the focus of the model lifecycle and MLOps.

MLOps is sometimes presented as a collection of tools. But for decision makers, it is better understood as a management discipline: How do we move models from experimentation into reliable operation without losing traceability, quality, and control?

Deployment is not the end of an AI project. It is the point where the model starts interacting with real users, real data, real costs, and real risk.

Deploying a model is risky because offline evaluation is never a perfect representation of production. For this reason, many teams use gradual rollout patterns:

  • Shadow deployment: the new model runs in parallel with the existing process, but its outputs do not affect the user or business decision — a safe way to observe real production inputs.
  • Canary release: the new model is exposed to a small portion of users, traffic, regions, or cases. If results are good, exposure increases gradually; if something goes wrong, the rollout stops or rolls back.
  • Blue-green deployment: two production environments exist — the current version and the new version. Traffic can be switched from one to the other, which gives a clean cutover and a clear rollback path.
  • Batch scoring: predictions are generated on a schedule and consumed by a dashboard, workflow, CRM, or ERP system. Batch scoring is easier to inspect, rerun, and debug, and easier to combine with human review.
Practical rule: Start with batch when the business process allows it. Move to online serving only when speed changes the outcome.
Deep Dive: From model file to managed AI product

1. The model lifecycle has more stages than “train and deploy”

A more realistic lifecycle: problem definition, data preparation, experimentation, evaluation, packaging, deployment, monitoring, and updating. Each stage creates artifacts — datasets, code, configurations, model files, evaluation reports, logs, and decision records. These artifacts are not administrative clutter; they are how the organization remembers what it built and why. Without this lifecycle view, teams often end up with “model islands”: one-off notebooks, undocumented deployments, unclear ownership, and models nobody fully understands a few months later.

2. Packaging and the model registry

A deployed model is rarely just a model file. The production artifact should include, or at least reference, everything needed to run the model consistently: preprocessing code, feature definitions, prompt templates, dependency versions, configuration and thresholds, and the evaluation report that justified deployment. A model registry connects the model to its context: What is this model supposed to do? Who owns it? Which dataset and code version created it? Which evaluation results justified deployment? What is the rollback path? If the only answer is “the model file is in storage”, the organization has a maintenance problem. For LLM-based systems, the deployment record should also capture prompt and system instruction versions, retrieval configuration, embedding model, tool definitions, and guardrail settings.

3. Continuous evaluation before continuous retraining — rollback is a product requirement

Retraining is not always the right first response. If performance drops because a source system broke, a field changed, or labels became inconsistent, automatic retraining may hide the root cause. A deployed model should first produce evaluation signals: samples of inputs and predictions, actual outcomes when they become available, performance by important segment, human overrides, and cost. And every production model should have a rollback plan decided before deployment, not during a crisis: return to the previous model version, turn the AI feature into “recommendation only” mode, route uncertain cases to human review, or fall back to a rule-based baseline.

🧩 Task

Interactive task: Pick a deployment pattern. You’ll see when it’s appropriate and what you must monitor.

Advanced 9 · Section 6

Monitoring & drift

Models don’t “stay good”. Inputs change, behavior changes, and performance shifts — monitoring is the safety net.

Models don't stay good — drift is normal acc. time → acceptable threshold drift detected → retrain retrained model
Inputs and behaviour change, so accuracy decays. Monitoring catches the dip at the threshold and triggers a retrain before users lose trust.

Once an AI or ML system is deployed, the work is not finished. In many ways, deployment is the point where the real test begins: the model now sees real users, real data, real workflows, real edge cases, and real business pressure. It may continue to perform well — or it may slowly become less useful without anyone noticing. The reason is simple: AI systems depend on patterns in data, and those patterns can change.

Customers change, products change, policies change, and user behaviour changes. The model may still run perfectly from a software perspective while becoming less useful from a business perspective.

“The model is online” is not the same as “the model is still working.” Monitoring is how you tell the difference.

Drift refers to situations where the data, relationships, or environment change after deployment:

  • Data drift / covariate shift: the inputs to the model change — a customer base changes, a new product category appears, a sensor starts producing different readings.
  • Label shift: the distribution of outcomes changes — the overall fraud rate increases, or the share of churned customers changes.
  • Concept drift: the relationship between inputs and outcomes changes — the same signal no longer means the same thing.
  • Feature drift: engineered features change in distribution or meaning — often caused not by the world changing, but by pipeline updates, schema changes, or changed business logic.
Practical rule: Not every drift requires retraining. First ask: is the world changing, did the data pipeline break, did the business process change, or did the model genuinely become outdated?

A practical monitoring plan should cover four layers. A starter plan could include:

  • System health: latency, errors, uptime, and cost.
  • Data health: freshness, missingness, schema changes, and volume.
  • Model behaviour: prediction distribution, output format, confidence, refusals, or guardrail triggers.
  • Business feedback: overrides, complaints, corrections, conversions, or outcomes when available.
  • Review rhythm: a weekly or monthly review of examples, not only dashboards.

Most importantly, monitoring needs ownership. Someone must be responsible for reviewing the signals and deciding what to do. A dashboard that nobody checks is not monitoring.

Deep Dive: Monitoring is how AI systems stay trustworthy

1. Monitoring versus observability

Monitoring tells you that something may be wrong: latency has increased, the number of missing values has doubled, predictions have become unusually extreme. Observability helps you understand what went wrong and why — the system is instrumented well enough that you can inspect logs, traces, metrics, inputs, outputs, and intermediate steps without having to guess. In AI systems with multiple components — data pipelines, feature logic, retrieval, prompts, model APIs, guardrails — observability becomes essential. And averages can hide problems: a model may perform well overall while failing for a specific product line, region, or customer type. When something goes wrong, the team should be able to inspect examples, not only dashboards.

2. Labels arrive late — proxy signals fill the gap

The most direct way to know whether a model is still good is to compare predictions with true outcomes. But in many business settings, the true outcome arrives late: a churn prediction may only be confirmed weeks later, a loan default months later. During the gap, teams need proxy signals: input distributions, feature freshness, prediction distributions, human overrides, complaints and escalations, guardrail triggers, latency and failure rates. Proxy signals do not prove that the model is correct, but they can reveal that something has changed and needs investigation.

3. Retraining triggers: scheduled, data-driven, or performance-driven

Scheduled retraining at fixed intervals is simple and predictable, but risks unnecessary retraining if nothing meaningful changed. Data-driven retraining is triggered when enough new data has arrived or input distributions have changed — but data may be new without being better. Performance-driven retraining is usually the most meaningful trigger, but it requires reliable ground truth and a delay-tolerant evaluation process. In practice, many organizations combine all three: scheduled review, data drift monitoring, and performance-based thresholds. Feedback loops add a caveat: the system changes the data it later learns from — if feedback is biased or incomplete, retraining on it may make the system worse.

🧩 Task

Interactive task: Select what you can realistically monitor. You’ll get a practical “starter monitoring plan”.

Advanced 9 · Summary

Key takeaways

What to remember

ML data management is different from classic analytics. In analytics, data usually explains what happened. In ML, data shapes how the system behaves. Training data, features, evaluation data, production inputs, and feedback all become part of the AI system.
Experiments should produce evidence, not just scores. A useful experiment records the hypothesis, dataset version, code/configuration, model or prompt version, evaluation method, results, and interpretation. Without this, teams cannot reliably compare, reproduce, or trust outcomes.
Training data teaches the model what to learn. More data is not automatically better. What matters is quality, coverage, label consistency, realistic splits, and protection against data leakage. A model trained on weak or misleading examples will learn weak or misleading behaviour.
Feature logic must be consistent from training to production. Features are business signals translated into model inputs. If feature definitions, time windows, preprocessing, or production logic differ from training, the model may fail even if the model itself has not changed.
A model is not production-ready just because it works in a notebook. Production AI needs packaging, ownership, deployment records, evaluation evidence, safe rollout patterns, monitoring, and a rollback plan. Deployment is the beginning of operational responsibility, not the end of the project.
Monitoring keeps AI systems connected to reality. Models can degrade because users, data, business processes, source systems, or market conditions change. Monitoring must cover system health, data health, model behaviour, business impact, and feedback loops.
Start lightweight, but start disciplined. Startups and SMEs do not need a full enterprise MLOps platform on day one. But they do need basic habits: dataset snapshots, experiment logs, evaluation records, feature definitions, model ownership, and monitoring signals.
Before the next AI investment, ask your team: Can we reproduce the dataset used for our most important model? What is running in production, why was it approved, and what is the rollback path? How would we notice — and what would we do — if the model quietly got worse?