From Notebook to Dependency: Where Data Science Ends and AI Engineering Begins
From Notebook to Dependency: Where Data Science Ends and AI Engineering Begins
- Details
- Category: ML Systems & MLOps
Data Science and AI Engineering overlap, but they are not interchangeable. The difference becomes visible when a model stops being an analytical result and becomes a dependency that other systems, teams, or customers rely on.
A data scientist may demonstrate that a useful signal exists, define how it should be measured, and estimate whether it generalizes beyond the training sample. An AI engineer must make that signal available under operational constraints: data contracts, interfaces, latency, deployment, observability, recovery, and long-term ownership.
This is not a universal definition of two job titles. Organizations use titles such as data scientist, machine learning engineer, applied scientist, AI engineer, and research engineer differently. The more reliable boundary is not the title of the person doing the work. It is the responsibility attached to the artifact.
The main argument of this article is that the transition from Data Science to AI Engineering occurs when an analytical result becomes an operational capability. At that point, model quality remains necessary, but it is no longer sufficient.
The boundary appears when the model becomes a dependency
Consider a model that estimates the probability that a customer will cancel a subscription.
In a notebook, the project may answer three central analytical questions:
- Is churn predictable from the available data?
- Does the model generalize beyond the training sample?
- Can the predictions support a useful business decision?
These are substantial questions. A model should not be operationalized before they have credible answers.
A production system introduces another class of questions. The team must determine where prediction inputs come from, whether every feature is available at prediction time, and which interface exposes the result. It must also define latency, versioning, deployment, monitoring, recovery, and incident ownership.
The analytical model does not answer these questions. The surrounding system must.
The distinction can be summarized as follows:
Data Science reduces uncertainty about the decision. AI Engineering makes the resulting capability repeatable, consumable, and operable.
Role titles are an unreliable taxonomy
It is tempting to define the boundary through tools.
A data scientist uses notebooks, pandas, statistics, and scikit-learn. An AI engineer uses containers, APIs, orchestration systems, model registries, and monitoring tools.
This distinction is too superficial. A data scientist may build a reliable training pipeline, while an AI engineer may perform exploratory analysis and model comparison. A senior practitioner may own the complete path from problem formulation to production operation.
The boundary is better described through responsibilities.
| Area | Primary question | Main failure risk |
|---|---|---|
| Problem formulation and analysis | What decision should the model support, and does useful signal exist? | Optimizing a measurable target that does not represent the real decision. |
| Model validation | Does the signal generalize under the intended conditions? | Reporting optimistic or decision-irrelevant metrics. |
| System integration | Can the capability be consumed reliably? | Undefined interfaces, unavailable features, or inconsistent transformations. |
| Production operation | Can the capability be observed, maintained, and recovered? | Silent degradation and unclear incident ownership. |
The responsibilities overlap. The distinction lies in which risks become part of the work.
The notebook can be correct and still be insufficient
A notebook can contain valid analysis, correct code, and a well-performing model while remaining unsuitable for production.
This is not a criticism of notebooks. They are effective tools for exploration because they support rapid iteration, visual inspection, and narrative analysis. Those same properties become liabilities when execution order, hidden state, local files, or manually prepared data are required to reproduce the result.
The training data cannot be reconstructed
The notebook may load a local file called training_final_v7.csv, while the process that created it remains undocumented. The model artifact can be recreated from that file, but the file itself cannot be reliably reconstructed from source systems.
Reproducibility requires more than storing the final dataset. The team must preserve the data snapshot or query, transformation code, configuration, dependencies, and target definition that produced the training examples.
Feature availability differs between training and prediction
A feature can be highly predictive because it was calculated after the event the model is supposed to predict. A feature may also exist in an analytical warehouse but be impossible to compute within the latency required by the product.
In both cases, the offline model uses information that the production system cannot reproduce at the required decision time.
The evaluation metric does not represent the production objective
A model may improve ROC-AUC while providing no improvement at the threshold or ranking depth used by the product. It may also be too slow, poorly calibrated, or unstable in a commercially important segment.
These failures do not imply that the analysis was incorrect. They show that analytical validity and system readiness are different properties.
A weak handoff turns assumptions into hidden dependencies
A common workflow separates the project into two phases. A data scientist develops a model and passes a notebook or serialized artifact to an engineering team. The engineering team then rewrites or packages the model for production.
This workflow can succeed when the interface is stable and both teams share the same assumptions. It becomes risky when the handoff contains only a model file, source code, and one offline metric.
The production team must then reconstruct decisions that were implicit during analysis. These may include the target definition, observation window, feature timing, exclusion criteria, decision threshold, and conditions under which the model should not be used.
The solution is not to eliminate specialization. It is to make analytical and operational contracts explicit before the implementations diverge.
The useful question is what the system must guarantee
Instead of asking whether a task belongs to a data scientist or an AI engineer, ask:
What capabilities must exist before this analytical result can become a dependable system?
A production candidate can be described through a capability vector:
$$\mathbf{c} = \left[ r, d, i, m, b, o \right]$$
where \(r\) represents reproducible training, \(d\) a validated data contract, \(i\) a stable prediction interface, \(m\) monitoring, \(b\) rollback or recovery, and \(o\) named operational ownership.
For a set of mandatory capabilities \(M\), a simplified readiness condition is:
$$Ready = \mathbf{1} \left\{ c_j = 1 \text{ for every } j \in M \right\}$$
This formulation is deliberately stricter than an average score. Reliable monitoring should not compensate for a missing data contract. Excellent latency should not compensate for the absence of a recovery path.
The vector is not a formal classification of professions. It is a way to inspect the system boundary.
Three stages are more useful than two job labels
Instead of forcing every task into either Data Science or AI Engineering, it is more useful to distinguish three artifact stages.
| Stage | What has been demonstrated | What remains unresolved |
|---|---|---|
| Analytical prototype | A signal, method, or decision rule appears useful under controlled evaluation. | Reproducibility, interfaces, deployment, monitoring, and ownership may be incomplete. |
| Production candidate | The analytical logic has been packaged and tested against intended system constraints. | Operational behavior still requires staged deployment and prospective validation. |
| Operational system | The capability is deployed, observed, recoverable, and assigned to an owner. | Drift, incidents, changing requirements, and model evolution must be managed continuously. |
This distinction prevents a common mistake: describing a model as production-ready merely because it can be exported or placed behind an HTTP endpoint.
Serving a prediction is one capability. Operating a prediction system is a larger responsibility.
A readiness check
The following Python example represents several production capabilities explicitly. It does not classify a person's profession. It classifies the maturity of one project artifact.
The example uses only the Python standard library.
from dataclasses import dataclass, fields
@dataclass(frozen=True)
class ProjectReadiness:
reproducible_training: bool
validated_data_contract: bool
prediction_interface: bool
latency_budget: bool
monitoring: bool
rollback_plan: bool
named_owner: bool
def missing_capabilities(self) -> list[str]:
return [
field.name
for field in fields(self)
if not getattr(self, field.name)
]
def stage(self) -> str:
missing = set(self.missing_capabilities())
production_blockers = {
"validated_data_contract",
"prediction_interface",
"monitoring",
"rollback_plan",
"named_owner",
}
if not self.reproducible_training:
return "analytical prototype"
if missing & production_blockers:
return "production candidate"
return "operational system"
project = ProjectReadiness(
reproducible_training=True,
validated_data_contract=True,
prediction_interface=True,
latency_budget=True,
monitoring=False,
rollback_plan=False,
named_owner=True,
)
print(f"stage={project.stage()}")
print(f"missing={project.missing_capabilities()}")
The following output was produced by executing the code:
stage=production candidate
missing=['monitoring', 'rollback_plan']
What the readiness check shows
The example project has reproducible training, a data contract, a prediction interface, a latency budget, and a named owner. It is more than a notebook experiment.
It is still classified as a production candidate because monitoring and rollback are missing. The project may be able to serve predictions under normal conditions, but it cannot yet answer two operational questions: how degradation will be detected and how the team will recover from a harmful deployment.
An arithmetic score would produce five completed capabilities out of seven. That result is less useful than identifying the two missing controls.
The exact capability set depends on the application. A batch reporting model may not need a millisecond latency budget. A safety-critical model may require additional controls for human review, access management, auditability, and fail-safe behavior.
Production readiness begins with a data contract
Models depend on data more deeply than conventional software functions depend on their arguments.
A function may fail visibly when an input has the wrong type. A model may continue returning plausible numbers when a column changes meaning, a category mapping shifts, or a feature becomes stale.
A production data contract should cover three groups of requirements:
- Structure: field names, types, ranges, allowed categories, and missing-value rules.
- Time: event-time semantics, freshness limits, and the latest valid timestamp for each feature.
- Ownership: source systems, responsible teams, access restrictions, and behavior when data are unavailable.
Data validation should occur during training, evaluation, and serving because each stage can fail differently.
Validating that a feature is present in the training dataset does not prove that it will be available before the production decision. This is a temporal contract, not only a schema contract.
Feature timing must survive the move to production
Suppose a churn model uses the number of support interactions recorded during the seven days after a cancellation request. The feature may be present in historical data and strongly associated with churn.
It cannot be used for a prediction made before the cancellation request.
Every production feature should have three explicit properties:
- the time at which the prediction is requested,
- the latest timestamp allowed for the feature value,
- the transformation used in both training and prediction.
The implementations should share transformation logic where practical or be tested against equivalent records. Otherwise, differences in missing-value handling, time zones, numerical precision, or category mappings can create training-serving skew.
The interface is part of model behavior
Once predictions are consumed by another component, the model has an interface. It may be a synchronous API, a batch table, an event message, or a library called inside another service.
Each interface introduces different constraints. An API must define response schemas, timeouts, concurrency, and fallback behavior. A batch pipeline must define completion deadlines, partitions, backfills, and duplicate handling. An event-driven system must define retries, ordering, and idempotency.
A useful prediction output may include three types of information:
- the score or decision produced by the model,
- the model version and prediction timestamp,
- validation, fallback, or uncertainty metadata needed by the consumer.
Without this context, downstream teams receive a number without enough information to interpret or audit it.
Offline evaluation must reflect the production decision
Data Science often owns the first rigorous definition of model quality. That responsibility remains relevant after the model enters engineering work.
A production system should not promote a candidate solely because it improves a convenient global metric. Evaluation should reflect the actual decision threshold, error costs, segment stability, calibration requirements, and latency constraints.
I would require three comparisons before promotion:
- comparison with a simple analytical or business baseline,
- comparison with the current production model or policy,
- comparison across decision-relevant segments and operating points.
A slower model with slightly higher ROC-AUC may be worse for an interactive application. A globally stronger model may be worse for a regulated or commercially important segment. A model with improved offline accuracy may not change the downstream decision at all.
A strong handoff is an executable contract
A handoff document should describe the assumptions that must remain true outside the notebook.
handoff = {
"project": "customer-retention-v3",
"data": {
"snapshot": "2026-07-training-v3",
"feature_schema": "retention-features-v5",
"freshness_limit_hours": 24,
},
"decision": {
"target": "conversion_within_30_days",
"primary_metric": "expected_net_value_at_10_percent",
"production_baseline": "retention-policy-v2",
},
"operation": {
"mode": "daily_batch",
"fallback": "use_previous_valid_scores",
"model_owner": "retention-data-science",
"service_owner": "ml-platform",
"rollback_model": "retention-model-v2",
},
}
This object is not a complete production specification. Its value is that it exposes assumptions that are often left implicit.
A useful handoff should make three things testable:
- whether the expected data and feature versions exist,
- whether the production decision uses the documented target and metric,
- whether ownership, fallback, and rollback are available in the deployed system.
A document that cannot be checked will eventually become stale.
Testing expands beyond model metrics
A production ML system needs tests for data, models, software, and operations.
| Test layer | Example checks | Failure detected |
|---|---|---|
| Data and features | Schema, freshness, missingness, temporal availability, training-serving equivalence | Invalid input, leakage, or feature skew |
| Model and decision | Baseline comparison, segment performance, calibration, policy value | Statistical regression or decision-quality degradation |
| Software and operations | Integration, serialization, load, deployment, alerting, and rollback tests | Implementation, environment, or recovery failure |
The ML Test Score proposed by Breck and colleagues organizes production readiness around tests for features, data, models, and monitoring. The exact checklist should be adapted to the application, but the underlying principle remains useful: production confidence should come from explicit checks rather than from the reputation of the model or team.
Monitoring requires an action policy
A dashboard is not an operational process.
Monitoring becomes useful when a measured condition is connected to an interpretation, an owner, and an action.
A practical monitoring design should cover three layers:
- System health: latency, errors, throughput, and dependency failures.
- Data and model behavior: schema violations, feature freshness, score distributions, and segment coverage.
- Decision quality: delayed outcomes, business-policy performance, and unintended effects.
For each signal, the team should define an expected range, an alert condition, an owner, and a first response. Without those elements, monitoring produces observations but not operational control.
Distribution drift should not automatically trigger retraining. A feature distribution can change without harming the decision, while decision quality can degrade without a large marginal shift in any individual feature.
Rollback is part of the system design
Rollback is sometimes treated as an infrastructure concern added after model development. In practice, it also affects analytical and interface choices.
A recovery plan should answer three questions:
- Which previous model, deterministic rule, or cached output is safe to restore?
- Are its required features and interface still available?
- How will decisions made during the incident be identified and reviewed?
A model that requires a new feature pipeline may be difficult to roll back if the old path has been removed. A schema migration may make previous artifacts incompatible with the current service. A decision threshold stored outside the model may be forgotten during recovery.
Rollback should therefore be exercised as an end-to-end capability rather than inferred from the existence of an older model file.
Ownership must include the decision
Production ownership is often divided across several teams.
| Responsibility | Possible owner |
|---|---|
| Target, evaluation, and model quality | Data Science with product and domain stakeholders |
| Data pipelines, serving, and infrastructure | Data Engineering, AI Engineering, ML Engineering, or platform teams |
| Business policy and incident decisions | Product or operational owner with a defined incident lead |
A service owner may guarantee that predictions are delivered within a latency target while having no authority to decide whether they remain statistically useful. A model owner may detect degradation while lacking the ability to disable the consuming workflow.
The incident process must connect technical delivery, model quality, and business decisions.
The same person can work in both modes
Data Science and AI Engineering are areas of responsibility, not mutually exclusive professional identities.
In a small team, one person may formulate the problem, build the model, implement the service, configure monitoring, and respond to incidents. In a larger organization, those tasks may be distributed across specialized teams.
A combined role is more realistic when three conditions hold:
- the system has manageable analytical and operational complexity,
- the practitioner has sufficient statistical and software-engineering competence,
- the organization provides reusable infrastructure and realistic ownership expectations.
Specialization becomes more useful when the system has strict reliability requirements, complex data dependencies, frequent retraining, regulated decisions, or several consuming products.
The objective is not to maximize the number of roles. It is to ensure that every important risk has a competent owner.
The strongest workflow keeps both modes connected
A strict separation between analysis and engineering can create local optimization.
Data Science may optimize a model that is expensive to serve. AI Engineering may simplify a pipeline in a way that changes feature semantics. Product teams may interpret a score differently from the target used during training.
A stronger workflow maintains three feedback paths:
- production constraints influence feature and model selection before the architecture is frozen,
- analytical assumptions influence data, interface, and monitoring design,
- production failures become new tests, evaluation cases, and model-development requirements.
A model change should also be reviewed as a system change. A new artifact can alter latency, memory use, feature requirements, score distributions, and downstream decisions.
A practical transition sequence
I would organize the transition from analysis to operation into three phases.
- Validate the decision. Define the target, establish a baseline, evaluate generalization, and confirm that the required features are available at decision time.
- Build the production candidate. Make training reproducible, define data and prediction contracts, implement tests, and prepare deployment and rollback.
- Operate and improve the system. Monitor technical and decision quality, assign ownership, validate prospectively, and convert incidents into regression tests.
The phases are iterative. Production constraints may force changes to the model, while model behavior may require changes to the system architecture.
The production interpretation is more conservative
A promising offline result supports further investment. It does not by itself justify operational dependence.
Before deployment, I would require evidence in three areas:
- Analytical validity: the target matches the decision, features are available at the correct time, and the model improves a relevant baseline.
- System readiness: data, interfaces, deployment, monitoring, and recovery have been tested.
- Operational ownership: the model, service, and business policy have named owners and a shared incident process.
This standard is stricter than asking whether the model works in a notebook. It should be stricter because the consequences have changed.
An experiment can fail privately. A production dependency fails through other people's workflows.
Key takeaways
- Data Science and AI Engineering are overlapping responsibilities rather than universally standardized job titles.
- The boundary appears when an analytical artifact becomes a dependency with a contract, operating constraints, and an owner.
- Production AI requires both valid analysis and reliable engineering; neither can compensate for the absence of the other.
Sources
- Sculley, D., Holt, G., Golovin, D., et al. (2015). Hidden Technical Debt in Machine Learning Systems. Advances in Neural Information Processing Systems, 28, 2503-2511.
- Breck, E., Cai, S., Nielsen, E., Salib, M., and Sculley, D. (2017). The ML Test Score: A Rubric for ML Production Readiness and Technical Debt Reduction. IEEE International Conference on Big Data, 1123-1132.
- Huyen, C. (2022). Designing Machine Learning Systems: An Iterative Process for Production-Ready Applications. O'Reilly Media.