Blog
Forty batches and a deadline
Everybody has heard that AI needs enormous amounts of data. Then a batch plant asks for help, and the whole history of the product fits on one sheet of paper.
The arithmetic
Millions of numbers, forty facts
The engineer who showed me the data was apologetic about it. Forty batches. That was every batch of the product ever made at that site, and the question was why some of them gave a poor yield, and the answer was wanted before the next campaign.
Now, forty batches is not a small file. Each batch ran for the better part of a day, with a couple of hundred instruments logged every few seconds. There were millions of numbers in it. A newcomer looks at that and says: plenty of data.
It is the most natural mistake in the business. The question is about yield, and there are forty yields. One per batch. The millions of readings are forty long descriptions of forty events, and no amount of detail in the descriptions makes the events more numerous. If I interview forty people for six hours each I know a great deal about those forty, and I still have a sample of forty.
And a flexible model, given two hundred instruments and forty outcomes, will find a pattern. That is guaranteed. With that many candidates something will line up with the bad batches by pure chance: the jacket temperature at minute 212, say. The model will report it with a straight face. It would do the same with forty coin tosses.
The method
Spending forty batches carefully
So what do you do? You stop behaving as though data were cheap, and treat each batch the way a poor man treats a banknote.
You begin by asking the people who run the process what they suspect. This is not a courtesy. With little data, knowledge has to do the work that volume does elsewhere. A chemist who says the trouble is likely in the heat-up, or in how long the charge sat before the catalyst went in, has cut two hundred candidates to five. Five ideas and forty batches is a fair fight.
Next you boil each batch down. A day of readings becomes a short list of things that mean something: the time to reach temperature, the peak of the exotherm, how long the hold really lasted, the area under a curve. Each of those is a sentence a process engineer could argue with, which is exactly the property you want.
You use a simple model. A straight line, a shallow tree. Simple models are bad at memorizing, and when you have forty examples that is a virtue. And you test the only honest way there is with so few: hide one batch, fit on the other thirty-nine, predict the hidden one, and repeat until each has had its turn in the dark. If the finding survives that, it may be real. If it falls apart, better it falls apart on a spreadsheet.
Then you say how sure you are, in plain words, and it will not be very. "Batches with a slow heat-up tended to yield less; the evidence is suggestive and not conclusive" is a sentence a statistician can stand behind. It is less exciting than a dashboard. It is also true.
The forty-first
The cheapest data is the batch you plan
The best move comes last, and people forget it is allowed. You are not stuck with the forty.
The old batches were not run to answer your question. They were run to make product, by operators doing their best to make every batch the same, so the thing you are curious about hardly varied. But there is a campaign coming. If the suspicion is heat-up rate, then in the next few batches the heat-up can be set a little faster in some and slower in others, on purpose, inside the limits the process allows. A handful of batches run with intent will tell you more than forty that merely happened.
That takes agreement from production and from quality, and in a regulated plant it takes paperwork. It is still the bargain of the century. This is everyday work in pharmaceutical manufacturing, where batches are costly, few, and each one documented to the last valve.
So the apology was not needed, and I said as much. Forty batches is not too little to work with. It is only too little to be careless with.