My Grandmother's Recipes Broke Our Language Model
"A glass of flour" and "as much as it takes" are perfectly clear to an Italian cook and baffling to a machine.
Our company wanted to build a small internal tool that could take handwritten family recipes from employees and turn them into structured data: ingredients, quantities, steps, timing. The idea came from a marketing campaign about traditional cooking, and I volunteered my grandmother Nives's recipe notebook as a test case. It has about 140 recipes written between 1958 and 2004, in pencil and blue ink, in a mix of Italian and Bolognese dialect.
It was a humbling test case.
The quantities problem
The first issue was measurement. My grandmother rarely used grams. Her quantities included:
- "un bicchiere" — a glass, which in her kitchen meant a specific small water glass of about 180 ml.
- "q.b.", short for "quanto basta", meaning "as much as it takes".
- "un pugno" — a fist, as in a fistful.
- "il peso di due uova" — the weight of two eggs, used as a unit for butter and sugar.
The language model we used would confidently convert "un bicchiere" to 250 ml, a standard cup, which is wrong for her. For "q.b." it sometimes invented a number, which is worse than leaving it blank.
The dialect problem
About a fifth of the recipes contained dialect words. "Sfoglia" is standard Italian for rolled pasta sheet, but she also wrote words that do not appear in any standard dictionary. The model either skipped them or translated them into something plausible and wrong. One word for a type of pork fat became "bacon" in the output, which would ruin a dish.
What we built instead
After two weeks of frustration, we changed the goal. Instead of producing a finished structured recipe, the tool now produces a draft with every uncertain item highlighted.
Concretely, we asked the model to output each ingredient with three fields: the original text exactly as written, its best interpretation, and a confidence label of high, medium, or low. Anything low gets shown to a human with a question. "Un bicchiere" now triggers "Which glass? Approximate volume?" instead of a silent conversion.
We also built a small glossary per family. Once someone tells the tool that "bicchiere" means 180 ml in their family, it uses that for every recipe from that notebook.
How it performed
On my grandmother's notebook, the first version got ingredient quantities right about 58 percent of the time. With the uncertainty flags and a family glossary of 23 entries, about 94 percent of the final structured recipes were correct after one round of human answers. The human work took my mother and me one evening and a bottle of wine.
Precision can be the wrong goal
The deeper lesson for me is that some information is not imprecise by accident. "As much as it takes" is not a missing number. It is an instruction to taste, to look, to feel the dough. Converting it to "15 grams" loses the most important part.
The best thing the model learned to do was ask.