index / notes

The $300k data stack a coffee shop cannot afford.

· writing

Here's how AI is working in small business - A coffee shop kept running out of oat milk. Five years ago, fixing that with data was a $300k engineering project. Here's what it takes now.

The shop owner in the Midwest had a simple but expensive problem: some mornings - he'd open at 7am be out of oat milk by 8am. Three times a week. His inventory system was walking to the back room and counting. He was sitting on all the data needed to prevent it (register sales, invoices, recipes) and none of it was talking to any of it.

This is the most common data problem in the world, and until very recently it was economically unsolvable for a business his size. Not technically unsolvable. Economically. Let's walk through what the standard playbook would have demanded.

The pre-AI bill of materials for this problem:

Document processing

  • His purchase history lives in PDF invoice dumps from distributors, a wholesale marketplace's order exports, and photographed receipts. That's an OCR pipeline (Textract or similar), plus a human review loop for the misreads, plus custom parsing per vendor format. Every distributor formats invoices differently. There are companies whose entire product is this one bullet point.

ETL and a warehouse

  • Register exports, sheet-based recipes, count logs: different shapes, different grains, different update cadences. So: ingestion jobs, an orchestrator, a warehouse, transformation models. Fivetran, Airflow, Snowflake, dbt. Four logos before anyone has answered a question.

Entity resolution

  • The same distributor appears in his records under four spellings. The same milk is a "case" in one document and a "carton" in another (12 cartons to a case, and nothing tells you that). Item matching across vendor catalogs is a genuinely hard problem that large retailers staff whole teams for.

A forecasting model

  • The playbook says demand forecasting means ML: feature pipelines, a training loop, someone arguing about whether it should be gradient-boosted trees or something with attention.

A BI layer and the people

A dashboard tool, plus the roles: data engineer, analytics engineer, data scientist, a fractional PM. Six to nine months. Low six figures if it goes well.

No coffee shop on earth buys that. Which means this entire class of business, which is to say most small businesses, has been running on gut feel not because the data isn't there but because the stack to use it cost 100x what the problem is worth.

Here's the part the playbook gets wrong: the model was never the hard part

The correct forecasting model for a coffee shop is not ML. It's an accounting identity that predates the printing press:

qty used = opening count + purchased − closing count

Periodic inventory. Merchants have run on it for five centuries. Applied to a modern shop it does things purchase-history averaging structurally cannot do. It distinguishes buying from using, and that gap is the entire problem.

It showed the owner was buying oat milk slightly slower than he was selling it, which is invisible in purchase averages and is precisely the slow leak that ends in an 8am runout. It caught a milk running at roughly double the rate the counts implied, because a mid-month restock was hiding inside a net number.

It validates itself: for one milk we computed consumption two fully independent ways (invoices plus counts on one side, recipes times register sales on the other) and both said 2.0 cases a week. When two methods that share no inputs agree exactly, you're allowed to trust the system. When they disagree, you flag it and go look.

That's first-principles forecasting. No training data required.

Second insight from the same identity: recipes are a bill of materials. A latte is a manufactured product with known inputs. Register sales times recipe quantities equals ingredient consumption, for every ingredient at once, including the ones with no invoice trail at all (this owner buys his dairy at the grocery store). One engine, and suddenly beans, cups, matcha and chai are all measured.

Roughly 90% of drink sales covered without asking him for a single new document. Priced against his real invoices, it's watching call-it-$80k a year of ingredient spend.

So what did AI actually replace? Not the thinking. The headcount.

Everything on that bill of materials, the OCR, the per-vendor parsers, the entity resolution, the units reconciliation, the transformation code, is work AI now does conversationally, against the client's real messy files, in days. The four-logo pipeline collapses into "read these invoices and reconcile them against these counts." The specialist roles collapse into one person who knows what question to ask. What's left, and what AI does not replace, is the judgment: knowing the five-century-old identity beats an ML model here, noticing that a number feels 12x wrong, deciding the answer must trace to a real document before it ships.

And one product decision follows from all of it.

The deliverable was never a dashboard. The deliverable is a sentence: "Order 7 cases of oat milk by Thursday. About $300." A sentence needs a delivery mechanism, not a BI tool. Dashboards are what you build when you haven't decided what the answer is. We ping the staff a couple of days before the stock out.

When you know the answer, you just send it.

The economics of this whole category have flipped. The businesses that run the physical world (cafes, kitchens, shops, the long tail that could never justify a data team) are now servable. Not with a cheaper version of the big-co stack. With arithmetic, their own documents, and someone who starts from first principles instead of from a reference architecture.

The stack and models are not the moat. Knowing which equation matters and how to shape a usable solution is.

#AIagents #Smallbusiness #SMBs

Originally published on LinkedIn, July 3, 2026.

← all notes