Northbeam Outfitters, a fictional retailer used in a new educational module from Deployed Labs, swapped a rules-based refund checker for a model-based one and ran a Friday demo with 20 sample tickets. All 20 passed. On Monday, the same ticket yielded two different answers an hour apart. By Friday, support had to manually recheck about 400 refunds, costing an illustrative $3,600 at $9 per recheck. Worse, several wrong approvals were written in a confident tone, causing agents to trust them blindly.
The Vending Machine vs. The New Hire
The core lesson from this case study is that ordinary code behaves like a vending machine: same input, same output, every time. An AI system behaves like a new hire: fast and broad, but requiring constant verification. This isn't a bug to patch; it is the fundamental nature of the technology. The article outlines six specific ways AI systems differ from traditional software, each breaking a habit developers rely on when shipping deterministic code.
Six Differences That Break Testing Habits
First, outputs vary. A normal function is exact, but a model may produce different wordings or labels for the same input. The counter is to test important cases multiple times and report the range, not a single run. Second, quality is a rate, not a proof. A model might be right 96 percent of the time, which breaks pass/fail sign-offs. You must set a bar before building, such as 95 percent accuracy, and accept that testing measures a rate, never a guarantee. Third, prompts, data, and retrieval are part of the program. Behavior lives in code, but also in the prompt and retrieved documents. Editing a help article can flip answers overnight, so treat retrieved text as untrusted input and version prompts like code. Fourth, the model changes under you. Providers update models, and data drifts. You must record which model version served each request and pin versions where possible. Fifth, cost and latency scale per request. Unlike cached functions, model calls cost money and take seconds. Budget per request, route easy cases to cheaper paths, and cache repeating answers. Sixth, failures are fluent. Ordinary software fails loudly with crashes. AI fails in calm, well-written paragraphs that are wrong. Verification must be built in, checking facts against sources and routing low-confidence cases to humans.
The Economics of Uncertainty
The case study runs the numbers to show why the switch happened despite the risks. Northbeam handles 10,000 refund tickets a month. The old rules checker covered only 62 percent (6,200 tickets) but was exact. The new model checker covers 97 percent (9,700 tickets), leaving only 300 for humans. However, the model is wrong on about 4 percent of its decisions, resulting in 388 wrong refunds a month. At an average of $40 per wrong refund, that is $15,520 in losses if undetected. The design solution is to audit a random 10 percent sample and escalate every decision over $100 or low-confidence cases to a person. This buys back certainty where the money is.
Key Takeaways
- AI systems are non-deterministic: always test distributions, not single instances.
- Quality is statistical: set accuracy bars and accept that testing never proves correctness.
- Prompts and retrieved data are code: version them and treat external inputs as untrusted.
- Model drift is real: pin versions and rerun tests after provider updates.
- Cost scales per request: cache answers and route simple cases to cheaper models.
- Fluent failures are dangerous: verify outputs against sources and use human escalation for high-stakes decisions.
The Bottom Line
Shipping AI without acknowledging its non-deterministic nature is not engineering; it is gambling. Developers must abandon the quest for absolute proof and instead design for statistical confidence, using human-in-the-loop systems to manage the inevitable variance.