Dev.to AI πŸ€– Ai πŸ‘ 2 πŸ“– 4 min read

It passed the demo on Friday. It failed on Monday.

Northbeam Outfitters is a made up retailer. Its team swapped a rules based refund checker for a model based one and tested it once, on a Friday, with 20 sample tickets. All 20 passed. On Monday the same ticket got two d

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

On Monday the same ticket got two different answers, an hour apart. By Friday, support had rechecked about 400 refunds by hand, at a made up cost of $9 per recheck: 400 times $9 is $3,600. Worse, a few wrong approvals were written in a warm, certain tone, so agents trusted them.

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

Ordinary code is a vending machine: same coins in, same chocolate bar out, every time. An AI system is a new hire: fast, broad, and in need of checks. That is not a flaw to patch. It is the nature of the thing.

There are six ways AI systems differ from ordinary software. Each one breaks a habit you built over years of shipping code, and each one has a counter.

1. Outputs vary. A normal function gives the same result on the same input, every time. A model may give two wordings, two labels, or two decisions. That breaks exact match tests, single demo runs, and debugging by replaying one case. Instead, design for a distribution: test each important case several times and report the range, not one run, and log the prompt, retrieved text, and model version with every output so an odd result can be studied. You can narrow the spread with settings and tighter prompts, but you cannot remove it.

2. Quality is a rate, not a proof. A sort function is right or wrong. A model feature is right 96 percent of the time, on the cases you tested, this month. That breaks "it passed testing, ship it" and pass or fail sign off. Instead, keep a fixed test set of real cases with known good answers, score every change against it, and set a bar before you build, such as at least 95 percent correct and no severe errors. Testing measures a rate. It never turns a model into a proof.

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. That breaks "we changed no code, so nothing changed": editing a help article the system retrieves can flip answers tonight. Instead, version prompts and key documents like code, review changes, test them, and keep the old version ready to restore. Treat retrieved text as untrusted input, since anyone who can edit a source document can steer the system.

4. The model changes under you. Providers update models, and your own users and data drift too. That breaks "it worked at launch" as a lasting guarantee, and it breaks blaming your last deploy for every behaviour change. Instead, record which model version served each request, pin a version where the provider allows it, and rerun your test set on a schedule and after any provider change.

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. That breaks calling the smart thing everywhere, retrying freely, and sending whole documents "just in case". Instead, budget per request and per user, route easy cases to cheaper paths, and cache answers that repeat.

6. Failures are fluent. 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. That breaks trusting output because it sounds sure, and it breaks letting users be the only check. Instead, build verification in: check facts against a source, validate formats in code, and route low confidence or high stakes cases to a person.

Now run the numbers. Northbeam handles 10,000 refund tickets a month. The old rules checker was exact on what it covered, but it covered only 62 percent: 6,200 decided by rules, 3,800 left to humans. The model checker gives an answer on 97 percent: 9,700 decided, only 300 needing a human first. That is a real win, and it is why the team switched. But the model is wrong on about 4 percent of its decisions: 9,700 times 0.04 is 388 wrong refunds a month. At an illustrative average of $40 per wrong refund, that is $15,520 a month if nothing catches them. So the design buys back certainty where the money is: audit a random 10 percent sample by hand, 970 reviews, and escalate every decision above an illustrative $100, plus every low confidence one, to a person before payment. Audits sample fresh decisions weekly. 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.

Failures arrive in design reviews as stories, not labels. "It worked in the demo, so it works" is difference one: one run shows one point in a range. "We changed no code, so behaviour cannot change" is differences three and four. "The answer sounds right, so it is right" is difference six: fluency is not evidence, so verify against a source. "AI calls are just API calls" is difference five: each one costs money and seconds. "More testing will prove it correct" is difference two: testing measures a rate, never a proof.

The decision rule to carry out of this: for every AI feature, name which of the six differences can hurt it most, and design that counter first. Routers exist because of cost. Guardrails exist because failures are fluent. The eval loop exists because quality is statistical.

The full interactive chapter is free at https://deployedlab.dev/lessons/arch-01-how-ai-systems-differ. 79 chapters are free with no signup, and the full bundle is $5 a month or $39 a year at deployedlab.dev.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.