Deployed Lab

Module 1 · Designing AI systems · Chapter 01 · Free

How AI systems differ from ordinary software

19 min1 clickable picture1 hands-on lab1 predict, 2 quick quizzes, 5-question final quiz5-min video review
In 30 seconds

The picture: ordinary software is a vending machine. An AI system is a new hire: fast, broad, and in need of checks.

What this chapter gives you
The cold open

Northbeam Outfitters is a made up retailer. Its team swaps a rules based refund checker for a model based one and tests it once, on a Friday, with 20 sample tickets. All 20 pass.

Nothing was buggy. The team designed for ordinary software, and this was not it.

The plan for this chapter
  1. Differences 1 and 2: outputs vary, and quality is a rate, not a proof.
  2. Differences 3 and 4: prompts and data are program, and the model moves.
  3. Differences 5 and 6: every call costs, and failures sound fluent.
  4. The picture, then a refund checker worked in numbers.
  5. A lab: match six failure stories to the difference behind each.

Next: the first difference, and why a single test run proves so little.

Step 1: Nondeterminism, the same input can give a different output

Run a normal function twice on the same input and you get the same result. Run a model twice and you may get two wordings, two labels, or two decisions.

Think of a dice roll inside a calculator. Where the picture breaks down:

Next: if outputs vary, correctness becomes a rate.

Step 2: Quality is statistical, you measure it, you never prove it

A sort function is right or wrong. A model feature is right 96 percent of the time, on the cases you tested, this month.

Next: what counts as "the program" is wider than you think.

Step 3: Prompts, data and retrieval are part of the program

In ordinary software, behaviour lives in code. In an AI system, behaviour also lives in the prompt, the examples inside it, and the documents the system retrieves at run time.

Retrieval basics are in the RAG chapter of the AI engineering course. Chapter 5 of this course builds on it.

Next: even if you change nothing, the model itself can move.

Step 4: The model changes under you

Providers update models. A new version may answer the same prompt a little differently, and your own users and data drift too: new products, new slang, new kinds of request.

Next: the meter is running on every single request.

Step 5: Cost and latency scale per request

A cached function call costs almost nothing and returns in microseconds. A model call costs money and takes seconds, and a long input costs more than a short one.

Next: the last difference, and the one that hurts trust most.

Step 6: Failures are fluent, so verification is a design layer

Ordinary software fails loudly: an error, a crash, a blank field. A model fails in a calm, well written paragraph that happens to be wrong.

These six differences are the reasons the patterns in Modules 2 and 3 of this course exist. Routers exist because of cost. Guardrails exist because failures are fluent. The eval loop exists because quality is statistical.

Predict first:

Fluent failures do not announce themselves. Without sampling, checks, or escalation, the 4 percent is paid out silently and found late, when it costs more.

Next: the picture that ties the six differences together.

Step 7: The picture, one request through an AI system

Press Next to walk one request. Notice where each difference shows up.

One request through an AI system A request and retrieved documents go into a model. The model returns one output from a range. A verification layer checks it before the user sees it, while cost and drift act on every step. Requestplus documents Modelversion can drift A rangeof outputs Verifychecks and audits Usersees one answer
  1. The user request arrives with retrieved documents. Those documents are part of the program, so their wording steers the answer.
  2. Each call spends money and seconds. The model version serving today may differ from last month.
  3. The same request could have produced a different answer. You are designing for the range, not one lucky run.
  4. Checks, sampling audits, and escalation catch fluent errors before they cost money or trust.
  5. The user cannot see the range or the error rate. Your design carries that knowledge for them.

Next: the refund checker, with the arithmetic done in the open.

Step 8: Worked example, rules versus model on 10,000 tickets

Northbeam Outfitters (made up) handles 10,000 refund tickets a month. All figures in this example are illustrative.

1. The rules checker. Exact on what it covers, but it covers only 62 percent: 10,000 × 0.62 = 6,200 decided by rules. The other 3,800 go to humans.

2. The model checker. It gives an answer on 97 percent: 10,000 × 0.97 = 9,700 decided. Only 300 need a human first.

3. The error bill. The model is wrong on about 4 percent of its decisions: 9,700 × 0.04 = 388 wrong refunds a month. At an illustrative average of $40 per wrong refund, that is 388 × $40 = $15,520 a month if nothing catches them.

4. The design response. Audit a random 10 percent sample of model decisions by hand: 970 reviews. Escalate every decision above an illustrative $100, plus every low confidence one, to a person before payment.

5. The run to run problem. The same ticket can score differently on a rerun, so audits sample fresh decisions weekly, and the test set reruns after any model or prompt change.

The model wins on coverage and loses on certainty. The design keeps the coverage and buys back certainty with audits and escalation, aimed where the money is.

Next: the lab, where you sort failures by their cause.

Step 9: Hands-on lab, match the failure to the difference

Why this exercise: in real design reviews, failures arrive as stories, not labels. Naming the cause points straight at the fix.

Do this:

  1. On paper, write the six differences as a checklist (illustrative starter below) and keep it beside you.
  2. Do the matching exercise. For each story, pick the difference that best explains it.
  3. For any you miss, reread that step of this chapter, then try again.
Design checklist (illustrative)
1. Outputs vary        -> test runs, ranges, logging
2. Quality is a rate   -> fixed test set, a set bar
3. Data is program     -> version prompts and docs
4. Model drifts        -> pin, rerun tests, monitor
5. Cost per call       -> budgets, routing, caching
6. Fluent failures     -> verify, audit, escalate

Lab: Failures arrive in design reviews as stories, not labels, and naming the cause points straight at the fix. This lab runs in your browser and needs JavaScript enabled.

What to notice

Next: a field note, then the mix-ups.

Field note, November 2026

Teams new to AI systems often discover these differences in order: a flaky demo, then a missing eval, then a surprise bill. Keeping a small fixed test set and a per request cost log from week one is common advice in production practice. Treat that as a shared habit, not a measured statistic.

Mix-ups to avoid

Chapter quiz

Five questions. Score 70% or more to mark this chapter complete.

Review this chapter in 5 minutes

Watch the whole chapter recapped: the six differences, designing for a distribution, the refund coverage tradeoff, and audits that buy back certainty.

Decision rule: for every AI feature, name which of the six differences can hurt it most, and design that counter first.

Review

Glossary

Nondeterminism
The same input can give different outputs. Example: two labels for one claim on two runs.
Distribution
The range of outputs a system gives over many runs. Example: 90 percent label A, 10 percent label B.
Eval
Scoring a system on a fixed set of cases with known good answers. Example: 500 real questions, rescored weekly.
Retrieval
Fetching documents at run time to include in the prompt. Example: the returns page pulled into a support answer.
Drift
Behaviour shifting over time as models, users, or data change. Example: scores sliding over two months.
Escalation
Routing a case to a person instead of deciding automatically. Example: refunds above a set amount.
Sampling audit
Human review of a random slice of decisions. Example: checking 10 percent of model refunds.
Verification layer
Checks between the model output and the user. Example: matching a cited policy against its source.

Next: "The reference architecture every AI product shares".