0:00Intro: MOFUSA Tech Academy
Welcome to MOFUSA Tech Academy. Beyond learning, towards mastery.
0:09A quiet Tuesday: the AI changed on its own
It's a quiet Tuesday. Nobody at Brightcart has changed a single line of code. Traffic is running on a backup model from an outside provider, while Brightcart's own model has planned maintenance. Then, at ten forty-two, one line on a dashboard jumps: the share of replies with broken formatting. The cause, discovered later: the backup provider had released an update that changed its output style. Because Brightcart was watching, an alert fired within minutes, traffic switched back to Brightcart's own pinned model, and customers barely noticed.
Without monitoring, broken order updates might have gone unnoticed for days. AI systems can change even when you don't touch them: models update, customers ask new things, documents change. Today: how to watch a live AI system, understand what it's doing, and keep its many parts working together. Season Five, Module Twenty-Two, stop two: monitoring, observability and orchestration.
1:16Monitoring vs observability
Two related ideas. Monitoring means watching the metrics you already know matter, against thresholds: is the slow-case latency above target? Did formatting failures spike? It answers questions you planned to ask. Observability means collecting enough detail, logs, traces and context, to answer questions you didn't plan for. Why have refund answers become longer for Spanish-speaking customers since Monday? A car's warning light is monitoring; the full diagnostic readout a mechanic can explore is observability. You need both.
1:54What to measure in a live AI system
What should a live AI system measure? The same promises as the scorecard from episode fifty-eight, now measured continuously. Quality, through proxies: formatting failures, how often each guardrail triggers, groundedness and helpfulness judged on a daily sample of real conversations, refusal and escalation rates, and how often the assistant says it doesn't know. User signals: ratings, the edits Sana's team makes in suggest mode, conversations abandoned midway, customers contacting support again within a day, resolution rates and satisfaction.
Speed: time to first token and total time, including the slow cases, and the time spent in each component. Cost: per request, and per resolved conversation, along with cache hit rates and how traffic splits across models. And health: errors, timeouts, fallbacks, failed tool calls, and retrieval searches that came back empty.
2:55Traces: following one request end to end
The most powerful observability tool is the trace: a record of everything that happened for one request, step by step. The gateway check; the input guardrails; the router's decision; the rewritten query; which passages retrieval found, with their scores; the tool calls with their arguments and results; the exact prompt version; which model and version answered, how many tokens it used and how long it took; and which output checks passed. When a customer complains about a wrong answer, a trace usually shows the cause in minutes: say, retrieval returned an outdated policy.
And every such failure can become a regression test. Traces contain sensitive information, so mask personal data, restrict who can see them, keep them only as long as needed, and honour deletion requests.
3:51Drift: when the world changes
AI systems face drift: the world changing underneath them. Input drift: when Brightcart launches a new range of smart kettles, customers start asking about Wi-Fi setup, a topic the documents don't cover, and empty retrieval results start rising. Output drift: replies slowly get longer, refusals creep up, or the tone shifts. And upstream changes: a provider updates a model, as in the hook; someone edits a policy document; or an embedding model is upgraded, which means every document must be re-indexed, because old and new vectors can't be compared.
To catch drift, compare this week's distributions, topics, lengths and refusal rates, with a baseline, and record the version of every model, prompt, document and index involved in every request.
4:47Alerts and incident response
Metrics need alerts, but not too many, or people start ignoring them. Set thresholds and rate-of-change rules on the metrics that matter, with severity levels: wake someone up now, or review in the morning. Build automatic safety responses: the gateway's ability to switch models, as in the hook; circuit breakers that stop calling a tool that keeps failing; switching to a safe template; routing more conversations to people. And practise incident response. Detect, at ten forty-two. Mitigate, by switching back to the pinned model, four minutes later.
Diagnose, with traces showing the provider's version change. Fix, by pinning the model version and adding a formatting test to the regression suite. Learn, with a blameless review and an updated runbook that says who's on call and how to roll back a prompt, a model, an index or a tool.
5:48Orchestration: wiring the pieces together
Finally, orchestration: the layer that wires all the components together into a reliable workflow. It defines the steps, which ones run in parallel, how requests are routed, what happens when a step fails or times out, when to retry, and when to wait for a human's approval. You can build this with an orchestration framework, which offers ready-made pieces for retrieval, tool-calling loops, memory and tracing, and speeds up prototyping, or with your own code, for full control and transparency. Frameworks can hide prompts and add layers that make debugging harder, so whichever you choose, insist on a few principles: every step versioned and traced, timeouts everywhere, write actions that can't happen twice, and prompts, model choices and thresholds kept as configuration, separate from code.
A quick note: names, prices and rankings in AI change fast. Everything on screen was accurate when this video was made, but some of it may have changed by the time you're watching.
6:54Try it yourself: an alert that ignores noise
Normally, about one percent of the day's sixteen hundred and sixty-seven conversations have a formatting failure. Where should the alert threshold be? Too low, and it fires on random noise; too high, and real problems slip through. Pause.
With this many conversations, day-to-day noise is about a quarter of a percentage point. Setting the alert at three times that above normal, about one point seven percent, means false alarms are rare, while a real problem, like a prompt change that breaks the format, is caught within a day. The same thinking as the evaluation gates in episode sixty.
7:40Try it yourself: reading a trace
Here's a trace of one request. The gateway takes a hundredth of a second, the input guardrail four hundredths, retrieval eighteen hundredths, reranking fifteen hundredths, waiting in the queue three tenths, and prefill twelve hundredths. The first word appears at eight tenths of a second. Which single fix would help most? Pause.
The queue, at three tenths of a second, followed by retrieval. Not the model at all. Without a trace, the team might have spent weeks optimising the model. With one, they add serving capacity at peak times and look at speeding up the search index.
8:28Try it yourself: a cost spike
On Tuesday, the cost per conversation jumps. Comparing traces before and after reveals the cause: a prompt change accidentally pasted the full returns policy into every request, two thousand extra tokens. What does that add per month? Pause.
A hundred million extra input tokens, about a hundred dollars a month at our illustrative price, for no improvement in quality. The fix is to revert the change, and to add a prompt-length check to the evaluation pipeline, so it can't happen silently again.
9:09Spotting drift in the category mix
Drift isn't always about the model. One week, the share of returns tickets rises from twenty percent to thirty-two. The cause is in the real world: a batch of kettles with faulty lids. The team checks the assistant's quality on the new wave of returns, makes sure any special policy for that batch is in the index, and adjusts expectations for routing and staffing. Monitoring connects the AI system to what's happening in the business.
9:40Privacy in logs and traces
Traces are powerful, and that makes them dangerous. A complete trace can contain customers' names, addresses and messages. So Brightcart masks personal data before anything is logged, limits who can view traces, keeps detailed traces only for a set period, and records the identifiers of retrieved documents rather than their full text where it can. Observability must never become a privacy leak.
10:07A blameless incident review
When something goes wrong, Brightcart writes a short, blameless review. What happened: for forty minutes, order-status replies said "unknown", because the courier changed its data format. The impact: about seventy customers escalated. How it was detected: the tool-error alert. The root cause: no automatic test of the courier's response format. And the actions: add that test, add a sensible fallback message, and add the scenario to the sandbox. The goal is to fix the system, not to blame a person.
10:42Pause & Predict: framework or plain code?
Should Brightcart build its pipeline with an orchestration framework, or with plain code? Pause and think about the prototype, and then about production. Either can work. Frameworks are quick for prototypes and come with many connectors. Plain code can be easier to debug and control as the system grows. What matters more than the choice: every step must be traceable and testable, and switching models must be possible without a rewrite. Choose the tool that lets you see and control what's happening.
11:19Try it yourself: an error budget
Brightcart's objective is that ninety-five percent of conversations see their first word within a second, measured over thirty days. With fifty thousand conversations a month, how many slow ones are allowed? Pause. Two thousand five hundred: that's the error budget. If it's nearly used up by the middle of the month, the team pauses risky changes, like switching models or rewriting prompts, and focuses on reliability until things recover. An error budget turns "how reliable should we be?" into a clear, shared rule for when to move fast and when to be careful.
12:03A daily quality pulse
Latency and cost are easy to measure every second; quality takes more care. Every day, a random sample of about one percent of conversations is scored by the validated judge for groundedness, helpfulness and tone, while the cheap automatic checks run on every single conversation. Each metric gets a line on the dashboard with a seven-day average and alert bands, and every week the team reads the lowest-scoring conversations together. Quality is monitored continuously, just like speed.
12:37Myth vs Fact
Myth: if we didn't change anything, the system can't have changed. Fact: model providers update their models, customers change what they ask, and documents and indexes get edited. Version everything, and watch continuously.
12:54Recap
Let's recap. Monitoring watches known metrics; observability lets you answer new questions. In production, track quality proxies, user signals, speed, cost per resolved conversation and system health. Trace every request through every component, with personal data protected. Watch for drift in inputs, outputs and upstream models, documents and indexes. Respond to incidents by detecting, mitigating, diagnosing, fixing and learning. And orchestrate the components with versioning, tracing and timeouts built in. One sentence to remember: if you can't see it, you can't trust it, so trace every step and watch every promise.
13:40Next: designing user feedback
Mission complete. Brightcart can now see its assistant working, minute by minute, with dashboards, judged samples, full traces, drift detection, alerts with automatic fallbacks, and a runbook for when things go wrong. One loop remains open. Customers and staff are constantly telling the system things, in ratings, edits, complaints and follow-up questions. How do we collect that feedback well, and turn it into a better assistant? The penultimate episode of the course: designing user feedback. See you on the map.