A system that tested well in the spring can be wrong on a growing share of its work by the autumn, and nothing in it may raise an alarm. Nobody broke it: the world it was built for moved, and it did not. For a model trained on past examples this is the normal course of things, not one vendor's defect. A test score describes the model and the test data together, so it carries over only to data that looks like the test; and a deployed model keeps answering as the world moves on, with no error to say it is out of its depth. Those two facts tell you what to ask before you approve one, what to watch after, and what keeping it right will cost.

Thesis: A learned model's test score is a property of the test as much as of the model: it counts only if the test looked like your data, and after launch the model, left to itself, answers every case, familiar or not, with no error when the world moves, so its quality is known only from what happened to its decisions. Written rules fail differently: they hold on the cases someone wrote down, and because their coverage is a list they can be built to say when they have no rule.


A Score Is a Property of the Test

Take one job. An accounts-payable team at a mid-sized manufacturer must send each supplier invoice to the right approver: the cost-centre manager for a maintenance contract, the plant controller for raw materials, a director above a spending limit. Suppose it builds a classifier, a program that sorts each invoice into one of a fixed set of labels, here the approvers. Training shows it last year's invoices with the approver each ended up with and adjusts its internal numbers until it reproduces those choices as closely as it can. Nobody wrote "maintenance contracts go to the cost-centre manager"; training fitted that pattern, and many others, to the history.

A model can fit its examples too well. Google's machine learning course defines overfitting as a model that matches, in effect memorises, its training set so closely that it fails on new data: it has stored that invoice 88213 went to the plant controller, instead of a pattern that carries over to the next invoice from that supplier. The way to tell is to hold some invoices back from training and compare the model's routes for them with what really happened. The training score says how well it fits what it saw; the held-out score says how well it generalises. A wide gap between them is the usual signature of overfitting.

How the model was fitted (illustrative numbers) Score on its training invoices Score on held-out invoices
Too simple: routes by amount alone 60% 58%
About right 95% 94%
Memorised: in effect one entry per past invoice 100% 71%

The held-out score is still not your answer. The same Google page says a score carries over to new data when the examples do not influence each other, the data does not change much over time, and the training examples are statistically similar to the test examples and to the real-world data the model will meet. That last clause is the one a buyer must check: a vendor's training and test sets can match each other closely and both be unlike your invoices. NIST's AI Risk Management Framework (January 2023) asks for the same, test sets "representative of conditions of expected use". Only a test on your data shows that a score fits it.

When Next Year Arrives

A deployed model does not learn from being used; it changes only when someone retrains it. Google's course calls training once and serving the same model for a while static training: such a model has no way to take in new data as it arrives (static versus dynamic training). Continual retraining keeps a model closer to current data, but it is a pipeline someone has to build, feed with labels and watch.

Meanwhile the world moves. This is drift: the data a model meets moves away from the data it learned from, and its quality can fall with nothing in the model reporting it. Google's example is a model trained on flower purchases from July and August that worked for months, then made poor predictions around Valentine's Day; even a statically trained model, the course advises, needs its input data watched for change. In May 2020 MIT Technology Review reported models in inventory management, fraud detection and marketing struggling because "normal has changed". Google's Rules of Machine Learning warns of a close cousin, silent failures: when an input goes stale, behaviour stays reasonably good and decays gradually, and such failures are more common in machine learning than in other systems.

Nor is the model's own confidence a reliable alarm. A 2019 benchmark by Ovadia and colleagues found that along with accuracy, the quality of a model's uncertainty "consistently degrades with increasing dataset shift" (drift, in this post's word). Being better calibrated on the original test set (a model that says it is 90% sure being right about 90% of the time) did not usually mean being better calibrated on shifted data.

Two Ways to Build One Job

The same job can be built as written rules: tables someone maintains (supplier to cost centre, cost centre to approver, amount thresholds that escalate) and a match against the purchase order when there is one. Every decision traces to the row that made it, and an auditor can read the whole system in an afternoon. The two builds answer the same question, but they hold in different places and fail differently.

Written rules Learned model
Where its behaviour comes from People wrote it Fitted to past examples
Where it holds On the cases someone wrote down On cases like its examples
On a case nobody foresaw Can be built to stop and say "no rule matched" Answers anyway, from the patterns it was fitted to
Can you list its errors in advance? Largely: read the rules No: they show up only in outcomes
What fixes it Edit a rule New labelled examples and a retrain

Try It: Next Year's Invoices

Without JavaScript, the table tells the same story. The numbers are illustrative: one month's batch of 200 invoices, with neither system maintained (no table edits, no retraining), to show how each decays when left alone.

What has changed since training Rules: routed right Rules: routed wrong Rules: sent to a person Model: routed right Model: routed wrong
Test day: held-out invoices from last year 170 0 30 188 12
Month 3: an acquisition brings new suppliers 140 0 60 165 35
Month 6: a large supplier changes its invoice layout 140 0 60 140 60
Month 9: two cost centres move to new approvers 115 25 60 115 85

Read the columns, not the totals. The rules send the new suppliers to a person, which costs time but is visible. The model routes every invoice, so a dashboard of routed invoices shows 200 each month while its share right falls from 94% to under 58%. At Month 6 the rules hold because here they read supplier and order number from structured portal fields (rules that read them off the page would take a hit too); the model was fitted to the look of last year's invoices. At Month 9 the rules go wrong too: nobody updated the approver table. Written rules go stale, but a stale rule sits in one row and is fixed by one edit; the model needs newly labelled invoices and a retrain.

The rules send an unforeseen case to a person only because someone wrote "if nothing matched, send it to a person": a design choice, not a property of rules. Without it, a new supplier goes to a default approver without a word. A learned model has no list to check against; a confidence threshold or an unfamiliar-input check leans on its sense of what is familiar, which the benchmark above found grows less reliable as the data moves. The dependable no-match path is a rule in front of the model.

Four Questions Before You Approve

Everything above comes down to four questions for any learned system, bought or built, each with an answer you can check. For the invoice classifier, good answers look like this.

  1. What was it trained on? Named data, period and label: two years of our own routed invoices without a purchase order, each with its final approver. "A large proprietary dataset" is not an answer.
  2. How was it tested? On held-out examples, with both scores side by side. A small gap says it generalises; a wide one says it overfitted, or that the held-out set was drawn differently.
  3. Does the test data look like ours? Our own recent invoices, from the suppliers and in the layouts we have now.
  4. How will we notice when that stops being true? An outcome signal with a threshold agreed before launch, a watch on inputs, an owner for both, and a retraining trigger.

The fourth is the easiest to leave blank, because on launch day nothing has moved yet.

The Hybrid in Practice

Here is one design that answers all four (the company and every figure in this section are invented for the example).

The routing splits three ways. A purchase-order invoice from a supplier with a row in the routing table is routed by rules: the order names the cost centre and approver. One whose supplier has no row goes to a person: the no-match path. An invoice with no purchase order, about a fifth of the volume, goes to a classifier trained on two years of such invoices, which launched on a held-out score of 94% on the company's own invoices from the latest quarter. Last, a delegation-of-authority rule checks that the chosen approver may sign for that cost centre and amount, and escalates if not: approval authority is known and stable, so it stays written down.

Then the company acquires a competitor, and three hundred of its suppliers start invoicing with no routing rows. Their purchase-order invoices queue for a person, slow and visible. Their other invoices reach a classifier that has never seen these suppliers, and it routes them anyway.

The team had built watching for each part before launch: for the rules, the no-match path and a named owner for each table; for the model, a weekly report with two lines. One watches inputs: the share of model-routed invoices from suppliers absent from its training data. The other measures outcomes: an approver who receives the wrong invoice forwards it, the workflow tool records every forward, and so each forward is a label produced free by the people doing the work. The report counts the forward rate by supplier group against a threshold agreed at launch.

The input line jumped in the first week, before any outcome existed: the early warning. The forward rate crossed its threshold in the second, showing real wrong routes, not just unfamiliar suppliers. A wrongly chosen approver with enough authority may simply approve, though, so the forward rate is a floor on the error rate, and the team also checks a small monthly sample by hand.

Each part is fixed where its behaviour comes from. Finance adds routing rows for the new suppliers as each is verified. A rule in front of the model sends the acquired suppliers' invoices without a purchase order to a person; the forwarded invoices, now carrying the right approver, join the training set, and the rule comes out only when the retrained model passes a held-out test on those suppliers. When a reorganisation later moves two cost centres, the same report catches the model, and the approver table's owner updates the rules.

Google's Rules of Machine Learning adds the question that sets the schedule: how much does performance degrade if the model is a day old, a week old, a quarter old? The answer says how often to look and to retrain.

When the Opposite Wins

"Then just write rules." Often, yes. Rule #1 of Google's Rules of Machine Learning is not to be afraid to launch without machine learning, because machine learning requires data. If the cases are known and stable, each decision must be explained to an auditor or a customer, and there is no labelled history, rules are the defensible build. Invoices that match a purchase order often need no model at all.

But rules lose when the cases will not stay listed. The same guide's Rule #3 warns that a complex heuristic is unmaintainable and advises moving to machine learning once you have data, because a learned model is easier to update and maintain. One stale row is easy to fix; a thousand interacting rows are not. Free-text invoices without a purchase order, from hundreds of suppliers, grow a rule per exception until nobody can say what the set does; a model trained on how people actually routed them usually copes better.

"The labels and the monitoring cost more than the model saves." Sometimes. A learned system needs a steady supply of correct answers. They are cheap when a correction already happens in the workflow, as the forward does, and expensive when someone must be paid to produce them. If your people make no such correction, count that cost before launch; it may be the argument for rules.

"Large language models make all this obsolete." Half right. A model trained on a large share of public text handles far more kinds of input than one company's classifier, so the edge of "cases like its examples" sits much further out, but it does not disappear. Its data ends at a knowledge cutoff, it never saw your invoices or approvers, and when it is wrong it is wrong fluently, with no error message (What an LLM Actually Is explains why). A hosted model can also change when its provider ships a new version. The four questions apply unchanged, and again at each version.


What to Do Next

  • Ask where its behaviour comes from: written by people, fitted to examples, or both, and which part does which.
  • Put the four questions to any learned system before you approve it, and accept only answers you can check.
  • Keep the known, stable part as rules (approval authority, purchase-order matching), build a no-match path into every rules system, and name an owner for every table.
  • Measure outcomes and watch inputs, not volumes or the model's confidence. Count the correction your people already make (a forward, a reversal, an override); it shows only some of the errors.
  • Budget for labels and retraining as an operating cost, with a retraining trigger agreed before launch.

Related: What Training Puts in the Weights shows what training does inside a language model. Check the Work Before It Lands applies the same idea, check outcomes rather than reports, to agents. Overfitting, held-out tests and drift are defined above; other terms are in the glossary.