0:00Intro: MOFUSA Tech Academy
Welcome to MOFUSA Tech Academy. Beyond learning, towards mastery. And welcome to Season Four: building with foundation models.
0:09From training models to building with them
Ten years ago, if Brightcart wanted an AI that answered customer questions, it would have needed a team of specialists, months of data collection, and a model trained from scratch. Today, a small team can connect a powerful pre-trained model to Brightcart's policies and order system in a matter of days. And then they spend most of their time on a harder question: are its answers actually good, safe and affordable? That shift created a new discipline: AI engineering. For the next two seasons, we'll build Brightcart's AI assistant, step by step, the way it's done in industry.
Today: what an AI engineer actually does, and the map of everything we'll build. Season Four, Module Fourteen: what AI engineering is. First stop: the AI engineering stack.
1:05Why AI engineering exists
Three forces created AI engineering. Scale made general-purpose models remarkably capable, as we saw with scaling laws. Those models became available as a service, through an API or a download. And that lowered the barrier: you no longer need to train a model to build an AI product. The result has been an explosion of AI applications, and a new bottleneck. Getting a demo working is now easy. Making it reliable, safe and affordable for real customers is hard. That's the AI engineer's job.
1:43ML engineering vs AI engineering
How is this different from the machine learning of Seasons One and Two? Classic machine learning engineering usually means collecting labelled data, designing and training a model, and producing a label or a number, which we can score with accuracy or error. AI engineering usually starts from a model someone else trained, and adapts it to the task. Its outputs are open-ended: a paragraph, a reply, an image, an action. "Is this answer good?" is much harder to measure than "is this label right?", so evaluation becomes the central challenge.
And because the models are huge, the speed and cost of every single response become major concerns. But nothing from the earlier seasons goes to waste. Data quality, honest evaluation, leakage, probability and cost functions all matter as much as ever.
2:34The three layers of the AI stack
It helps to picture AI engineering as a building with three floors. The top floor is application development: writing instructions and prompts, giving the model the right context, designing the interface, evaluating the results, and adding safety guardrails. This is where most AI engineers spend most of their time. The middle floor is model development: fine-tuning models, preparing training data, and optimising how models run. Training a foundation model from scratch happens here too, but only a few organisations do it.
The ground floor is infrastructure: serving models to users, managing computing hardware, monitoring, data pipelines and security. Over the next two seasons, we'll work our way down: evaluation and prompting in Season Four, then retrieval, agents, fine-tuning, data, inference and architecture in Season Five.
3:33Prompt, retrieve or fine-tune: the adaptation ladder
To make a foundation model do what you need, there's a ladder of techniques. At the bottom, the cheapest and fastest: prompting, simply changing the instructions. Next, giving the model the right information at the moment it answers, called retrieval-augmented generation. Then, tools and agents, letting the model look things up and take actions. And at the top, fine-tuning, actually changing the model's weights with your own data. The rule of thumb: climb only as high as you need, and measure at every step. For Brightcart, the right tone might need only a good prompt; correct policy answers need retrieval; order status needs a tool; and fine-tuning might only make sense later, if at all.
4:21Product first: the prototype-and-measure loop
Because models are available from day one, AI engineering often flips the traditional order. Instead of collecting data, then training a model, then building a product, teams start with the product idea, build a quick prototype using prompts, and then invest heavily in measuring how good it really is. The workflow becomes a loop: define what success looks like; prototype quickly; build an evaluation set and measure; improve with prompting, retrieval, tools or fine-tuning; release to a small group of users, gather feedback, and measure again.
A working demo is the beginning, not the end. The gap between a demo and a dependable product is where most of the real work lies.
5:09The Brightcart assistant: project brief
Let's write the brief for the project we'll build across the next two seasons: Brightcart's AI assistant. Users: customers in the website chat, and later by phone. Jobs: answer policy questions, check order status, handle damaged items and returns, and hand over to Sana's team when needed. Success means correct answers grounded in Brightcart's real policies, problems actually resolved, happy customers, safe refusals, a sensible cost per conversation, and quick responses. Constraints: never invent policies, protect customer data, always say it's an AI, and escalate safety issues and large refunds to a human.
We'll assume about fifty thousand requests a month, a number we'll use for cost estimates. Every module from here on fills in another part of this blueprint.
6:04Who does what on an AI team
Building an AI product is a team effort. AI engineers focus on prompts, retrieval, evaluation and integration. Machine learning engineers handle fine-tuning and model internals. Software engineers build the product around it. Product managers define what success means. And, crucially, domain experts, like Sana's support team, define what a good answer actually is, and review the results. In a small company like Brightcart, one person may wear several of these hats.
6:38Pause & Predict: classic ML or a foundation model?
Four problems for Brightcart. Forecasting next week's orders. Flagging fraudulent transactions. Summarising long complaint emails. And routing tickets into twelve categories. Which need a foundation model? Pause. Forecasting and fraud detection work on numbers and tables, where classic machine learning from Season One is usually faster, cheaper and easier to explain. Summarising emails is a natural job for a foundation model. Routing tickets could go either way: start with a foundation model to move quickly, then, once you've collected thousands of labelled examples, a small trained classifier might do it for a fraction of the cost.
AI engineering adds a new tool; it doesn't replace the old ones.
7:35Try it yourself: reading latency like an engineer
Here are twenty response times from Brightcart's prototype. Most sit between one and one and a half seconds, but two are slow: four point eight and six point two. What's the typical wait, and what does the slowest five percent experience? Pause.
The median, the middle of the sorted list, is about one point two seconds. The ninety-fifth percentile is four point eight: one customer in twenty waits four times longer than typical. The average, one point six four, hides both stories. That's why AI engineers track percentiles, not just averages: the slow tail is where customers give up.
8:20The prototype trap
Foundation models make the first demo dangerously easy. On day one, Dev's prototype answers ten hand-picked questions beautifully, and everyone cheers. Then real tickets arrive: misspellings, three questions in one message, angry customers, orders the system can't find, and policy edge cases nobody thought of. A demo proves that something is possible. It doesn't prove that it's reliable. Getting from one to the other is most of the work, and it's what the rest of this season is about.
8:54From vibe checks to evidence
In classic machine learning, you had a test set and a single accuracy number. With open-ended text, it's tempting to judge by vibes: read five replies, and say "looks great". But vibes miss problems, and they can't tell you whether a change made things better or worse overall. AI engineering replaces vibes with evidence: hundreds of real, anonymised tickets, scored against a clear checklist, re-run after every change. The next module builds the measuring tools, and the one after builds the full pipeline.
9:30Tokens are the new unit of cost
In AI engineering, cost is counted in tokens. With fifty thousand requests a month, eight hundred tokens in and two hundred out, Brightcart's assistant processes forty million input tokens and ten million output tokens every month. Every word in the instructions is paid for on every single request. So engineers have levers: shorter instructions, fewer examples, caching repeated text, smaller models for easy requests, and sensible limits on reply length. We'll pull every one of these levers in this season and the next.
10:08A model is a dependency
Treat a foundation model like any other critical dependency, but one that can change its behaviour. Versions get updated, rate limits apply, prices move, and services occasionally go down. So Brightcart's app talks to models through a thin gateway module. It pins model versions, sets timeouts and retries, keeps a fallback model ready, and monitors quality continuously, so a silent change in behaviour is caught by the numbers, not by an angry customer.
10:40The AI engineer's toolkit
What skills does an AI engineer need? Solid software engineering: APIs, testing, deployment. Evaluation, which is the heart of this season. Data skills: collecting, cleaning and labelling examples. Product sense: knowing what's worth building. And security and responsibility. You don't need to train a model from scratch to be an AI engineer. But understanding how models are trained, which you've learned in the first three seasons, will make you a far better one, because you'll know why they behave as they do.
11:16Dev's first week
Here's how Dev's first week on the assistant should look. Monday: agree the brief and success metrics with Meera. Tuesday: collect two hundred real tickets, anonymise them, and write reference answers with the support agents. Wednesday: build the first prompt with an order lookup, and run the evaluation for a baseline score. Thursday: fix the three most common failure types, and measure again. Friday: demo it to the team with the numbers, including what still fails. Measure first, then improve.
11:51Pause & Predict: which reply is "correct"?
A customer bought a lamp on the second of May and asks on the twentieth whether they can still return it. The policy allows thirty days. Reply A says yes, until the first of June, with a link. Reply B says they're within the thirty-day window and explains where to start. Reply C says returns are accepted within ninety days. Which are correct? Pause.
A and B are both correct, with completely different wording. C sounds just as confident, but it states the wrong policy. In classic machine learning, there's one right label. Here, there are many right answers, and wrong ones that sound right. That's why evaluation becomes the central challenge of AI engineering.
12:43Myth vs Fact
Myth: AI engineering is just calling an API. Fact: the API call is the tip of the iceberg. Underneath are evaluation, retrieval, guardrails, cost and speed, monitoring, data pipelines, user feedback and security. That's what turns a clever demo into a product people can trust.
13:06Recap
Let's recap. AI engineering emerged because capable foundation models became available as services. It focuses on adapting models rather than training them, on open-ended outputs, and on evaluation, with cost and latency as major concerns. The work spans three layers: application, model and infrastructure. Adaptation climbs a ladder from prompting to retrieval, tools and fine-tuning. And the workflow is product-first, built around a loop of prototyping, evaluating and improving. One sentence to remember: start from a capable model, and earn trust through evaluation.
13:47Next: AI use cases and planning a product
Mission complete. We know what an AI engineer does, we've mapped the stack, and Brightcart's assistant has a brief. But before building anything, a smart team asks harder questions. Is this the right problem? Is AI even needed? What could go wrong, and how will we know if it's worth it? Next: AI use cases, and how to plan an AI product. See you on the map.