Problem breakdown · No. 050 · December 6, 2026
Allergen charts go stale when the supplier substitutes a product
An independent kitchen's allergen chart is accurate on the day it is written. Then a distributor swaps one brand of sauce for another, and the chart starts lying without anyone touching it.
The problem
Most independent restaurants keep allergen information as a printed matrix or a binder: dishes down one side, allergens across the top. A chef builds it once, often when a menu launches, from the labels on the products in the walk-in.
The chart goes wrong without anyone editing it. A distributor is out of stock and ships a substitute: a different brand of mayonnaise, a curry paste that now contains sesame, bread from a bakery that shares a line with tree nuts. The case arrives, gets put away, and the recipe is unchanged as far as the cooks know. The server who reads the binder to a guest with an allergy is now reading old information.
The cost is not small: a guest reaction, a lawsuit, a closed dining room. In the US, sesame became the ninth major allergen, and the UK and EU track fourteen, so the surface keeps growing. Recipe costing and inventory tools exist, but they model ingredients as generic items like "mayonnaise", not as a specific product with a specific label. The substitution happens at the receiving door, and no tool is watching that door.
Constraints
- Budget is a small monthly fee at most, and nobody will pay for a consultant to set it up.
- Staff are cooks and managers, not data entry clerks. Anything slower than snapping a photo at receiving will be skipped.
- Recipe data mostly lives in someone's head, a spreadsheet, or laminated prep cards.
- Invoices arrive as paper, PDFs or distributor portals, with product codes that differ between vendors.
- Labels are the legal source of truth, and "may contain" statements matter as much as the ingredient list.
- Trust is everything: one wrong "safe" answer ends the product, so the system must never be the final authority on safety.
System design
The core is a recipe graph: dishes contain components, components contain ingredient slots, and each slot is bound to a specific product with a confirmed allergen profile. A dish's allergens are the union of everything beneath it. This is plain deterministic code, and it should stay that way because it must be explainable line by line.
The data flow:
- Intake: an invoice or delivery photo is parsed into line items. An LLM is useful here, mapping messy vendor descriptions to known products and flagging anything it cannot match.
- Substitution check: deterministic code compares received products against what each slot expects. A new or different product opens a review.
- Label extraction: the cook photographs the substitute's label. A model extracts ingredients, declared allergens and "may contain" text into structured fields, each tied to the exact quoted label text.
- Confirmation: a chef approves the extraction on a phone. Nothing propagates until a human signs off.
- Propagation: the graph recomputes, produces a diff of which dishes gained or lost an allergen, and regenerates a dated, versioned chart.
The model reads labels and invoices. It never decides whether a dish is safe.
Trade-offs
The design needs recipes entered once with real structure, which is the most expensive part of adoption. I think that is acceptable, because a chart without that structure cannot be kept correct by anyone.
It misses purchases that never hit an invoice, like a cash run to the grocery store. A receiving photo covers some of that gap, not all.
The union is conservative and will over-flag, especially with "may contain" statements. A chart that says no more often than strictly necessary costs some covers. A chart that says yes wrongly costs far more.
What I would build first
I would skip invoice parsing at first. Import recipes from a spreadsheet, let a chef bind each ingredient to a product by photographing its label, and generate the matrix from that graph.
Then add one loop: at receiving, a cook photographs any unfamiliar product. The model extracts the label, the chef confirms, and the system texts a diff such as "Chicken katsu now contains sesame" with a reprinted chart.
If one kitchen catches a single substitution in two weeks that the binder would have missed, the case for the rest is made.
When a safety fact depends on a physical product, track the product rather than the recipe name, and let deterministic code propagate changes that a human has confirmed.