How an ingredient declares what it contains
The single most consequential decision in an allergen data model is how many states an allergen can be in, and the common answer of two is wrong in a way that is genuinely dangerous.
Key takeaways
- Three states: contains, may contain, unknown. A blank is never a negative.
- ’May contain’ is a manufacturer’s precautionary statement, not a maybe.
- Compound ingredients nest; the declaration has to follow the tree down.
- A dish rolls up to the strongest state present across its ingredients.
- One unknown ingredient makes the dish’s statement incomplete, and it should say so.
Three states
| State | What it means | How it renders |
|---|---|---|
| Contains | The specification declares this allergen | Named, unambiguously |
| May contain | A precautionary statement from the manufacturer | Named, distinctly from contains |
| Unknown | No current specification, or it does not address this allergen | Named as unknown, never blank |
| Does not contain | A current specification explicitly excludes it | Blank is acceptable |
The fourth row is the only one where a blank is honest, and it requires a current specification that actually addresses the allergen. An ingredient whose specification predates the current allergen labelling requirements, or which simply does not mention celery, is unknown for celery rather than free of it.
That distinction produces more unknowns than most people expect when a system is first populated, and that is the system working. A matrix that was all blanks and is now thirty per cent unknown has not got worse; it has become honest, and the unknowns are a work list.
May contain is not a maybe
“May contain nuts” is a statement by a manufacturer that their process cannot exclude cross-contamination. It is not uncertainty about the recipe and it is not something a kitchen can resolve by asking. It carries forward to any dish using that ingredient and it must be reported as what it is.
Collapsing it into either contains or does not contain loses real information in both directions: treating it as contains removes dishes unnecessarily, and treating it as absent removes a warning the manufacturer thought was necessary.
Compound ingredients
- Compute
- App integration
- Security & identity
- Analytics
- Front-end & mobile
How deep it goes
A dish uses a sauce; the sauce uses a stock base; the stock base uses a seasoning blend; the seasoning blend contains an anti-caking agent. Four levels is not unusual and the allergen can be at the bottom.
Maintaining that by hand across forty dishes is possible in principle and does not survive a supplier change, which is precisely the situation where accuracy matters most. The recursion is the part of this system that is genuinely hard to do without software.
The dish-level statement
A dish with any unknowns has an incomplete statement, and that fact belongs at the top of it rather than in a footnote. A member of staff answering a question needs to know immediately whether they are working from complete information.
Chasing the unknowns
The unknown list is the system’s main ongoing output. Each one is a specification to request from a supplier, and requesting them is straightforward: most suppliers have the document and will send it.
Ranking by how many dishes an unknown ingredient affects makes the chasing efficient. One missing specification on a widely-used stock base can be responsible for half the unknowns on a menu, and one email resolves it.
Next: the change nobody sees.
All posts