FOUNDATIONSCHAPTER 01

Why AI engineers exist

A model that works in a demo fails on the hundredth customer, and someone has to close that gap: the role is not a researcher who trains models, and not a backend engineer who wires an API

35 MINAI ENGINEERUPDATED 2026-11-21
PREDICT

A support assistant built on a hosted model API is demoing well after two weeks. Which piece of work is most likely to decide whether it is still working six months later?

Job titles lag the work. For years a company that wanted to use machine learning hired people who could train models. Then models became something you rent: you send text to an API and get text back. The swyx essay “The Rise of the AI Engineer” (June 2023) argued that this created a distinct role between product engineering and research, and Chip Huyen’s book AI Engineering (2025) treats the discipline as building applications on top of foundation models that someone else trained. This chapter does not ask you to take their word for it. It shows the problem the role solves, who else could solve it and why they often do not, and what the work looks like, so that you can decide whether you want it or whether to hire for it.

The gap between a demo and a feature

A language model does something useful on the first try. That is the trap. Three things go wrong between the demo and the hundredth customer.

The behaviour is sampled. The same question can produce different answers on different runs, and the model is fluent when it is wrong. The course chapter on what an LLM is explains why. A traditional test asserts that an input gives one output. A model-backed feature gives a distribution of outputs, so the honest statement about it is a rate: right on 93 of 100 realistic questions, not “it works”. Nobody can write that sentence without cases to count.

Nobody owns the evidence. The people who build the demo try a handful of questions they thought of. The people who would find the failures, customers, are not asked until launch. The Air Canada case is the public version of the consequence: the tribunal asked whether the airline had taken reasonable care over the accuracy of what its chatbot said, and an eval set and a measured error rate are what such care looks like in practice. That second step is our inference, not the tribunal’s wording.

The ground moves under you. The model is versioned, repriced and eventually retired by someone else. The prompt is a piece of code, and in most first versions it lives in a string literal that anyone can edit. The course chapter on prompt management covers the mechanics. The point here is that a feature on a hosted model has a dependency that changes without your release, and somebody must notice.

None of the three is a research problem. A researcher could not fix them, because the model is fine. They are engineering problems about measurement, change and limits, and they appear in every company that ships a model-backed feature.

What the role is

The AI engineer builds features on models that others trained, and is responsible for whether those features are right often enough, cheap enough and safe enough. This track breaks the work into four jobs.

  1. Choose. Decide whether a model is the right tool at all, and if so which one, at what cost per task. A keyword rule that is right 90% of the time at no cost may beat a model at 96% at fifty times the price. See choosing a model and tokens, context and cost.
  2. Give it what it needs. Context, retrieval and tools: what the model sees, what it may call, and what it may change. See the API and tool use.
  3. Measure. An eval set, a rubric, a rerun on every change. See building an eval set. Of the four, this is the job that most separates the role from its neighbours.
  4. Hold the limits. Cost per successful task, latency, abuse and injection, and what happens when the model is wrong. See guardrails and injection.

The title says engineer for a reason. Most of the code is ordinary: services, queues, data access, tests. What differs is that the component at the centre cannot be specified exactly, so the engineering around it is about evidence and tolerances instead of assertions.

Not a researcher, not a backend engineer

Companies that misread the role usually hire a near neighbour. Each neighbour is excellent at something that is not this job.

Role Starts from Produces Judged on Hired for this job, you get
Research scientist An open question about what models can do A new method, a trained model, a paper Advances in capability A thoughtful design for a model nobody needed to train
ML engineer A dataset and a model you will train A trained model, served at some latency Accuracy and cost of your own model A training pipeline where an API call would do
Backend engineer A specification Deterministic code with tests Correctness and uptime A clean integration, shipped, with no measure of the answers
AI engineer A business task and a hosted model A feature with measured quality, cost and guardrails Quality in production, cost per successful task The feature, plus the evidence it is right

Two clarifications. First, the backend engineer is the strongest of the near neighbours, which is why training one is a serious option and why the Decide at the end of this chapter is a real choice. The gap is not skill; it is the habit of treating a sampled output as something to count. Second, the data roles, analyst, scientist, analytics engineer, ML engineer, have their own map in the Data track, in the chapter on why data roles exist, Why data roles exist. The map of AI roles draws the boundary on the AI side.

What an AI engineer owns, and what they do not

Owns Does not own
The eval set and its upkeep, built with the people who know the right answers What a correct answer is: the sales desk decides what price is right
Prompts and context under version control, with a change log The product decision about what to promise; see AI products
Tool design and permissions: what the model may read and change The threat model alone; see AI and agent security
The cost and latency budget per task Independent testing of the release; see testing AI features
Monitoring in production and the rollback Training models, in most companies
The response when a model changes, is repriced or is retired Company-wide AI policy; see AI and the engineering organisation

The first row is the one that surprises people. An engineer cannot know whether a distributor was quoted the right carton price; the person on the sales desk can. The AI engineer’s skill is turning that person’s judgement into labelled cases a machine can run, and finding out whether two such people agree. If the engineer decides what correct means, the eval set measures the engineer’s guess.

QA and the AI engineer overlap on purpose. The builder’s evals are fast, run on every change and encode what the builder understands. An independent tester tries to break the feature with cases the builder did not imagine. You need both for the same reason code needs both authors and reviewers.

Where practitioners disagree

Is it a separate job, or a skill every software engineer will have? The swyx essay and Huyen’s book argue for a distinct role. You will also meet teams that give AI features to ordinary product engineers and add no title. Both work when someone is accountable for measurement. The failure is the team where everybody uses the API and nobody is responsible for the rate.

Evals before the feature, or after you have learned what breaks? Hamel Husain’s “Your AI Product Needs Evals” argues that the evaluation system is the part that lets you iterate. The opposing worry is real: you cannot write good cases for a feature whose failures you have not seen. A common rule of thumb, not a standard, is a small set before the first demo, around twenty cases, and a rule that every failure found later becomes a case. The next chapter, AI engineering philosophies, takes this tension apart.

How much machinery? Anthropic’s “Building effective agents” advises finding the simplest solution possible and adding complexity only when it clearly improves measured outcomes. Others reach for agent frameworks first. The two views meet at measurement: without an eval, you cannot tell whether the extra machinery helped.

Fine-tune early or late? Most practitioners try prompting and retrieval first, and fine-tune when a measured gap remains. See fine-tuning. The disagreement is about how much measuring you need before you decide, not about whether to measure.

Is this the job for you?

You will spend a lot of time reading what a system actually said. Not dashboards: transcripts. Ten to twenty a day is a reasonable habit in the first months. If reading outputs for subtle wrongness sounds tedious, the role will be too.

You will be the person who says “I do not know yet, and here is how I will find out”, often to someone senior who wanted a yes. You need to be comfortable with a statement such as “right on 91% of cases, with the misses concentrated in two intents” instead of “it works”.

You will watch your work depend on things you do not control. A vendor’s model changes, a price moves, a model is retired on a date the vendor sets. The satisfaction is in the system you built to notice and respond.

Signs it may suit you: you enjoy building evidence, you like both code and language, and you would prefer a measured partial answer to a confident full one. Signs it may not: you want deterministic systems, you want to work on new models rather than with them, or you need your output to be finished rather than maintained.

The ladder, in this track’s titles: Junior AI Engineer or Software Engineer on an AI team at Foundations, building parts of a feature with guidance; AI Engineer or Applied AI Engineer at Practitioner, owning a feature from scope to production; Senior or Staff AI Engineer, or AI Tech Lead, owning shared pieces across teams and the response to model changes; Head of AI or Director of AI Engineering, owning the function, vendors and risk position.

Day to day

A Foundations-level AI engineer sits in a product team and works on part of a model-backed feature. An AI engineer’s week takes the calendar apart; here is the outline.

Every day. Read a sample of real conversations or outputs from the previous day, ten to twenty, and mark each right, wrong or unclear. Check the cost and error dashboards for anything that moved. Pick up small tasks: a new eval case from yesterday’s failure, a tool description that confused the model, a fix to how context is assembled.

Every week. A failure review with the people who know the domain, such as support or the sales desk: what went wrong, whether it is a prompt, context, tool or model problem, and whether the case is now in the eval set. A change review where every edit to a prompt or tool is shown with its before and after eval scores. A short look at the vendor’s changelog and deprecation notices.

Every release. Run the full eval set, compare with the last release by slice and not only by overall score, and write down what changed and why. Confirm the rollback works.

Every quarter. A cost review against the budget, a look at whether a cheaper model passes the same evals, and a check of the deprecation calendar so that a retirement date never arrives as news.

The meetings that matter are the weekly failure review and the release gate, because that is where the evidence meets the people who can act on it. The habit that matters is writing: a change log, a case with its reason, a result with its numbers. An engineer whose knowledge lives in memory has no answer when someone asks why the score dropped.

BY ORG SIZE
STARTUPunder 30 people

There is no AI team and there should not be one yet. One engineer owns the feature as part of their job, perhaps two days a week, and the risk is not a missing title but missing measurement. Fix that with twenty real questions in a spreadsheet, a rule that every failure joins the list, and a person named as owner. A dedicated hire makes sense when AI features multiply or the cost of a wrong answer, money or health, rises. Until then, the definition of the role matters more than the headcount.

SCALE-UP30 to 300

The function is being built, often by one or two people serving several teams. The danger is two failures at once: each team builds its own prompts, keys and spend, and one specialist becomes a gate every feature queues behind. A good first AI engineer spends the first quarter on shared evidence, an eval habit, versioned prompts and a cost view, and coaches product engineers to run them. The open argument is whether AI engineers are embedded in teams or form a pool, and it is worth having openly.

ENTERPRISE300 and up

The role exists, with a ladder, managers and relationships with legal, risk and vendors. The problems are scale and politics: dozens of assistants nobody can list, several vendors with different retirement dates, a risk committee that wants a person to approve every answer, and procurement that chose a platform before anyone defined the job. An AI engineer here spends more time on shared platforms, review boards and evidence for auditors, and has to protect time for reading outputs. Influence runs through the platform owner and the risk function.

ARTEFACT Write a role definition ~45 MIN
YOU PRODUCEOne-page AI engineer role definition

Template

# AI engineer role definition: <company, feature>
Owner · Date · Review by: <date>

## The problem
<Two sentences, one number: the work this feature takes over or the failure it prevents.>

## What the role owns
- <The feature's quality, as a rate>
- <The eval set and who supplies the right answers>
- <Prompts, context and tools, under version control>
- <Cost, latency, monitoring, rollback>

## What the role does not own
- <Decision> — <who owns it>

## Build on a model, or train one
<One sentence: why a hosted model plus context and tools is enough here.>

## First ninety days: outputs
1. <e.g. 30 labelled cases, agreed with the domain owner>
2. <e.g. a first version, run against them>
3. <e.g. a cost per task and a rollback>

## How we will know it works
- Quality: <rate> on <cases>, threshold <n%>, set before the run
- Cost: <per task>
- Never: <things the feature must not do>
- Trace: <what is logged so any answer can be explained>
- When wrong: <who adds the failure to the eval set, and by when>

## Works with
<People and teams, and what each supplies.>

## Review
<Date, and the evidence that would change this definition.>
WORKED EXAMPLE

Tallowmere is an online pharmacy in Ibadan: 40 people, nine engineers, about 520 deliveries a day. Customers keep asking on WhatsApp where their order is. (All figures here are illustrative except the size.)

The problem. About 90 customers a day ask where an order is, about three minutes each, 4.5 hours of staff time a day.

Owns. The accuracy of a WhatsApp assistant that answers order-status questions from the order system; a set of 60 real questions with right answers agreed with customer care; the prompt and tool descriptions in version control; cost, monitoring and a switch that turns the assistant off.

Does not own. Whether a medicine is safe to take (a pharmacist, always: the assistant hands over and never advises); what the delivery promise is (operations); the customer-data policy (the chief executive and the engineer who knows the order service).

Build or train. A hosted model with one read-only tool is enough; there is nothing to train.

First ninety days. 30 labelled cases by week two; a first version run against them by week four; cost per conversation and a working off-switch by week eight.

Works if. At least 95 of a weekly sample of 100 conversations are right; no clinical advice in any; every reply logs the order number, tool result and prompt version; each wrong reply found in the weekly sample becomes a case within a week, added by the engineer; under ₦40 a conversation, about ₦108,000 a month at 90 a day. Staffing. Forty per cent of one engineer, which at a loaded ₦18m a year is ₦7.2m. Review. After 90 days, on the weekly samples.

Now you

You are advising Crustwell, the packaged food and drink company: 2,200 staff, head office in Lagos, about 180 distributors who prepay before stock is released. Its sales-support desk answers about 400 order and price questions a week, by phone and WhatsApp, at about six minutes each. The price list has about 60 products, with discounts that differ by distributor, changes monthly and lives in the ERP, which Nguumbur, a backend engineer on the finance-systems team, can query through an internal API. Indira, the head of IT, wants a WhatsApp assistant for those questions. She has asked HR to open a machine-learning researcher post at about ₦45m a year. Complication: last month the desk quoted a distributor the previous month’s price, and the invoice is disputed. The sales director wants the assistant live before festive-season ordering starts in eight weeks. Write the role definition for whoever builds it. Do not decide who to hire; Indira needs the definition first.

Self-check

DECIDE

Indira, Crustwell's head of IT, wants an assistant on WhatsApp for distributors' order and price questions: about 400 a week, six minutes each, 40 hours of desk time. Prices come from the ERP and differ by distributor; a wrong price becomes a disputed invoice. Festive-season ordering starts in eight weeks. Model fees would be about ₦1.2m a year (illustrative), so the staffing choice dominates the cost. She has a request open for a machine-learning researcher at about ₦45m a year. Nguumbur, a finance-systems backend engineer, knows the ERP and is interested. An AI engineer would cost about ₦36m a year, and a vendor assistant about ₦24m a year (both illustrative). Which do you recommend?

READING
  1. POST
    The Rise of the AI Engineer swyx (Shawn Wang), 2023

    The essay that popularised the title. Read it for the argument that building on models is a distinct discipline, and then decide how much of it still holds.

  2. BOOK
    AI Engineering: Building Applications with Foundation Models Chip Huyen, 2025

    The clearest book-length account of how AI engineering grew out of ML engineering and where it differs, from someone who has done both. Read: Chapter 1, Introduction to Building AI Applications with Foundation Models; the section on the rise of AI engineering.

  3. POST
    Your AI Product Needs Evals Hamel Husain, 2024

    A practitioner's account of why the evaluation system is what lets a team iterate on a model-backed product, with an example from a real assistant.

  4. POST
    Building effective agents Anthropic, 2024

    Advice to find the simplest solution that works and add complexity only when measurement shows it helps. The source for the simplest-thing philosophy this track returns to.

  5. POST
    What We Learned from a Year of Building with LLMs (Part I) Eugene Yan, Bryan Bischof, Charles Frye, Hamel Husain, Jason Liu, Shreya Shankar, 2024

    Six practitioners on the tactics of building with models, including evals and monitoring. It shows what the daily work looks like once the demo is over.

  6. DOC
    Moffatt v. Air Canada, 2024 BCCRT 149 British Columbia Civil Resolution Tribunal, 2024

    The published decision in which an airline was held responsible for its chatbot's answer. Read the reasoning on who is accountable for what an automated tool tells a customer.

All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.
NEXT: AI engineering philosophies: evals first, the simplest thing that works, the model will change →