Simple definition#
AI engineering is the discipline of building applications on top of foundation models that someone else has usually trained. Instead of collecting data and training a model first, you start from a model that already works, then adapt it — with prompts, context, tools, fine-tuning — and wrap it in the product, evaluation and operations it needs.
The shift is from “can we build a model?” to “can we build a reliable product with this model?”
Why this is a distinct discipline#
Three things made AI engineering grow out of machine-learning engineering:
- Models became general-purpose. One model can summarise, classify, extract, translate, write code and plan. A team no longer needs a model per task.
- Models became a service. Strong models are available behind an API, so a small product team can ship AI features without an ML research group.
- The bottleneck moved. When anyone can call the same model, the advantage lies in evaluation, context, data, user experience and operations — the engineering around the model.
AI engineering vs ML engineering#
| Concern | Traditional ML engineering | AI engineering with foundation models |
|---|---|---|
| Starting point | Your data, then train a model | An existing model, then adapt it |
| Model adaptation | Feature engineering, training | Prompting, retrieval, tools; fine-tuning when needed |
| Model size | Often small, cheap to serve | Large; inference cost and latency dominate |
| Outputs | Closed (a label, a score) | Open-ended (text, code, actions) — much harder to evaluate |
| Evaluation | Accuracy against a labelled test set | Rubrics, AI judges, human review, online feedback |
| Data work | Labelling and features | Curating instructions, examples, preferences; synthetic data |
| Interface | Usually invisible (a score in a pipeline) | Often conversational; the UX is the product |
The two converge in practice: a production AI team still needs ML skills for fine-tuning, dataset engineering and inference optimisation.
AI engineering vs full-stack engineering. Because so much work is now product and interface work, AI engineering has moved closer to full-stack engineering. The common workflow has inverted: build the product first, then invest in data and models once the product shows promise — the opposite of the classic ML order.
The three layers of the AI engineering stack#
flowchart TB
subgraph APP["Application development"]
A1["Prompt and context engineering"]
A2["Evaluation"]
A3["AI interface and UX"]
end
subgraph MOD["Model development"]
M1["Fine-tuning and post-training"]
M2["Dataset engineering"]
M3["Inference optimisation"]
end
subgraph INF["Infrastructure"]
I1["Model serving"]
I2["Data and compute management"]
I3["Monitoring"]
end
APP --> MOD --> INF
| Layer | What happens here | Read more |
|---|---|---|
| Application development | Prompts, context construction, evaluation, the user interface | Prompt engineering, Evaluating AI systems |
| Model development | Fine-tuning, dataset engineering, inference optimisation | Fine-tuning in depth, Dataset engineering, Inference optimisation |
| Infrastructure | Serving, compute, data, monitoring | Inference and serving, LLMOps |
Most enterprise teams spend the majority of their time in the top layer. The lower layers become relevant as scale, cost or customisation grows.
What foundation models are used for#
Use cases cluster into a handful of archetypes. Knowing the archetype tells you how hard evaluation will be and how much risk is involved.
| Archetype | Examples | Typical difficulty |
|---|---|---|
| Coding | Code completion, test generation, migration, code review | Output is checkable (does it compile, do tests pass?) |
| Image and video production | Marketing assets, product images | Subjective quality; brand and IP risk |
| Writing | Drafting emails, reports, product descriptions | Subjective; tone and factuality |
| Education | Tutoring, quiz generation, explanation | Correctness and pedagogy |
| Conversational bots | Customer support, internal help desks, companions | Open-ended; safety and escalation |
| Information aggregation | Summarising documents, meetings, research | Faithfulness to sources |
| Data organisation | Extraction from documents, classification, tagging | Structured; measurable against labels |
| Workflow automation | Agents that complete multi-step tasks | Highest risk; actions have side effects |
Enterprises usually start with internal, lower-risk use cases (knowledge search, drafting, extraction) before external ones, because mistakes are cheaper and the data is under their control.
Planning an AI application#
1. Why build it at all?#
Rank the motivation by how much risk it addresses:
| Motivation | What it implies |
|---|---|
| Existential — competitors using AI could make you obsolete | Highest priority; consider building core capability in-house |
| Opportunity — higher productivity, lower costs, more revenue | Normal business case; buying is often cheaper and faster |
| Exploration — you do not know where AI fits yet | Small, time-boxed R&D; learn before committing |
Then ask whether you must build it yourself. If an off-the-shelf product already does it well, building is a cost, not an advantage. See build, buy or embed.
2. What role does AI play?#
Three questions shape requirements more than any model choice:
| Question | Options | Consequence |
|---|---|---|
| Is AI critical or complementary? | Product fails without it vs works without it | Critical AI needs higher accuracy and fallbacks; complementary AI can tolerate more errors |
| Is AI reactive or proactive? | Responds to a request vs offers help unprompted | Reactive needs low latency; proactive can run in batch but must clear a higher quality bar, or it becomes noise |
| Is AI dynamic or static? | Updates continuously with user feedback vs updated with releases | Dynamic needs per-user data, privacy controls and feedback loops |
And the role of humans: does AI generate a draft a human approves, handle easy cases and escalate hard ones, or act alone? The answer drives the human-in-the-loop design and the risk controls.
3. Is it defensible?#
When you build a thin layer on top of a general model, two threats appear:
- Competitors can copy it — the entry barrier is low for them too.
- The model can absorb it — a feature that exists because the model is weak at something disappears when the next model is not.
Durable advantages come from proprietary data and feedback (a data flywheel), distribution (being where users already work), workflow integration and domain-specific evaluation that competitors do not have.
4. What does success look like?#
Set expectations in business terms first, then translate them into a usefulness threshold — how good the system must be before it is worth shipping.
| Metric group | Example for a support assistant |
|---|---|
| Business | Share of tickets resolved without a human; handling time; CSAT |
| Quality | Correct, grounded and policy-compliant answers on the evaluation set |
| Latency | Time to first token, time per output token, total time |
| Cost | Cost per conversation, per resolved ticket |
| Other | Fairness, explainability, auditability |
5. Plan milestones around the last mile#
Practical consequences:
- Measure the baseline first. Evaluate off-the-shelf models on your task before committing to a plan. If a model already solves 30% of cases, the plan is different from one that solves none.
- Re-plan after evaluation. It is normal to discover that reaching the threshold costs more than the use case returns — and to stop.
- Budget time for the tail. Plan explicit milestones for 80% → 90% → 95%, not one “ship” date.
6. Plan for maintenance#
The field moves fast. Models get cheaper and better, APIs converge, and providers change prices or disappear. A decision that is optimal today may be wrong in six months.
- Keep models swappable behind a gateway.
- Keep evaluation automated so a model change is a test run, not a project.
- Re-run the build vs buy analysis periodically.
Common mistakes#
Review questions#
How does AI engineering differ from ML engineering? AI engineering adapts existing foundation models (prompting, retrieval, fine-tuning) instead of training models from scratch, deals with open-ended outputs that are harder to evaluate, faces larger inference costs, and puts much more weight on the interface and product. The workflow often starts with the product and adds data and model work later.
What are the three layers of the AI engineering stack? Application development (prompts, context, evaluation, interface), model development (fine-tuning, dataset engineering, inference optimisation) and infrastructure (serving, compute, data and monitoring).
What is a usefulness threshold and why set one? The minimum quality, latency and cost at which the application is worth putting in front of users. It prevents shipping too early and gives evaluation a concrete target.
Why do AI projects underestimate effort? Foundation models make early progress fast, so demos look nearly finished. The remaining gap — edge cases, hallucinations, integration and reliability — takes most of the time, and each improvement gets harder.
How do you make an AI product defensible? Through proprietary data and user feedback, distribution, deep workflow integration and domain-specific evaluation — not through a thin wrapper that competitors or the next model can replicate.
Summary#
- AI engineering builds products on foundation models; the system around the model is the work.
- The stack has three layers: application development, model development, infrastructure.
- Plan by asking why, what role AI and humans play, how it stays defensible, and what threshold makes it useful.
- Measure a baseline early, plan for the last mile, and keep models swappable for maintenance.
References#
- Chip Huyen, AI Engineering: Building Applications with Foundation Models, O’Reilly, 2025 — chapter 1.
- Eloundou et al., GPTs are GPTs: An Early Look at the Labor Market Impact Potential of LLMs, 2023.
- Apple, Human Interface Guidelines: Machine learning.