AI engineering
From model to system: what production AI actually needs
Production AI needs dependable inputs, explicit interfaces, bounded failure paths and evidence that changes improve the task. Start with the user outcome and its constraints, then design the system around the model—not the other way around.
Define the system boundary
A model supplies a capability; a product has to turn that capability into a dependable interaction. Google’s production-ML guide places model code alongside data collection, verification, serving and monitoring. That broader view matters whether the model makes a prediction or generates an answer. A useful design question is not simply whether the model can respond, but what must happen before and after that response.
Consider a hypothetical document assistant. Its job might be to answer from material a person is authorised to read, identify supporting passages and acknowledge missing evidence. A fluent answer alone does not satisfy that contract. Define the intended result, excluded actions and acceptable waiting time together. These boundaries give engineering decisions a purpose and make later evaluation less dependent on subjective impressions.
Make inputs and interfaces explicit
Google Cloud’s MLOps guidance distinguishes ordinary code testing from the additional validation needed for data and models. Its examples primarily concern predictive ML, but the engineering question also applies to a generative application: are the inputs the system receives compatible with what its downstream components expect? A changed field, missing document or stale retrieval index deserves an explicit handling path.
Treat boundaries between components as contracts. Validate required fields, preserve source identifiers and define how errors travel through the application. Record the model, prompt configuration and relevant data version together when reproducibility matters. This does not require training a model yourself. It requires knowing which pieces changed when a previously useful interaction starts producing a different result.
Design the unhappy path
An upstream service can time out, retrieval can return irrelevant material and a model can produce an unusable response. Decide what the user sees in each case. A retry should have a limit; a repeated operation should not accidentally repeat a consequential action. Sometimes the appropriate result is a partial answer, a request for clarification or a handoff—not another attempt at confident completion.
Observability should help distinguish these cases. AWS’s Machine Learning Lens separates model performance from endpoint and compute health, and recommends lineage back to versioned inputs and artifacts. Build on that distinction: record enough information to locate the failing stage without indiscriminately retaining sensitive content. A fast, available endpoint can still deliver the wrong result; a good model can still sit behind an unreliable application.
Release with evidence
A change should face the task it is intended to improve. Compare candidate behaviour with the current baseline, including difficult cases and relevant input groups. Google Cloud’s guidance combines model validation with deployment checks and controlled online validation. Translate that principle into a release process appropriate to the application rather than assuming that every system needs the same elaborate pipeline.
After release, watch response times, errors and resource consumption alongside task-quality signals. Define who investigates a regression and how a previous configuration can be restored. Monitoring is not a substitute for evaluation, and evaluation is not a promise that production will never surprise you. Together they create a feedback loop in which failures can become specific engineering work instead of unexplained changes in how the AI feels.
