Allergen guide
Tree nuts in recipes — how Frittu checks and excludes them
Tree nuts are one of the most widely distributed allergens in cooking. They appear as whole nuts, ground pastes, flavoured liqueurs, and as processing aids in confectionery and chocolate — sometimes without the word “nut” appearing in the ingredient name at all. This page explains what Frittu's system does, specifically, when tree nuts are listed as an excluded ingredient in a user's profile.
Tree nuts in everyday cooking
The tree nuts most commonly encountered in recipes are almonds, cashews, walnuts, pecans, pistachios, macadamia nuts, hazelnuts, brazil nuts, pine nuts, and chestnuts. Each has a distinct culinary role: almonds appear ground in pastry, whole in salads, and as a base for marzipan; hazelnuts are roasted for desserts and blended into chocolate spreads; pine nuts are a structural ingredient in classical pesto; cashews are used in South and South-East Asian cooking as a thickener and in plant-based cream sauces.
Beyond whole or chopped nuts, tree nuts appear in processed forms that can make them harder to identify. Praline is a caramelised-nut confection used as a dessert garnish and cake filling. Marzipan is an almond-sugar paste used in European celebration cakes, petits fours, and stollen. Nougat typically contains almonds or pistachios bound in a sugar-egg-white base. Gianduja is a hazelnut-chocolate paste that forms the base of spreads such as Nutella and appears in ganache, mousse, and gelato.
Tree nuts also appear in beverages and condiments. Almond-flavoured liqueur (amaretto) is used in tiramisu, baking, and cocktails. Hazelnut liqueur (Frangelico) appears in dessert sauces and drinks. Nut butter — including almond butter, cashew butter, and walnut butter — appears in dressings, satay-style sauces, and baking. Trail mix and mixed nuts are snack ingredients that sometimes appear in granola, energy-bar, and muesli recipes.
How Frittu's allergen check works
When your profile lists tree nuts as an excluded ingredient, Frittu applies a two-layer check to every recipe it generates.
Layer 1 — prompt-side instruction. Before sending a generation request to Claude, Frittu builds an exclusion list from your allergen profile. For tree nuts, that list includes the individual nut names as well as their processed forms — praline, marzipan, nougat, gianduja, nut butter, mixed nuts, trail mix, pesto, amaretto, and frangelico. Claude receives these as a hard exclusion instruction and is directed to build the recipe without them.
Layer 2 — deterministic post-generation scan. After the recipe is returned, Frittu runs a server-side function that checks every ingredient name against a coded keyword list for tree nuts. If a recipe ingredient name matches a tree-nut keyword, the recipe is rejected and the generation is retried automatically before the recipe reaches you.
Interaction with the dairy check.Frittu's dairy allergen check uses a prefix-exception mechanism so that plant-based dairy alternatives — oat milk, coconut cream, rice milk — are not incorrectly flagged when only dairy is excluded. However, when tree nuts are also in the user's allergen profile, this exception is suppressed for nut-derived prefixes. When tree nuts are selected, “almond milk” and “cashew cream” are flagged by the tree-nut keyword check and the recipe is rejected — preventing a loophole where a nut-based dairy alternative would pass unchecked when both allergens are selected.
What this check does not cover. The check operates on ingredient names as generated. It does not cover cross-contamination that could occur during home preparation — shared equipment, oil used for cooking nut-containing foods, or ingredients a user adds themselves after receiving the recipe. If you prepare food for someone with a significant tree-nut sensitivity, kitchen cross-contamination controls remain your responsibility.
Hidden sources of tree nuts in cooking
Common hidden sources of tree nuts in cooking include the following — ingredients that contain tree nuts but may appear in a recipe without the word “nut” being immediately visible in the ingredient name.
Coverage scope. This page covers ingredients as they appear in Frittu's generated recipes. It does not cover cross-contamination from shared manufacturing equipment or preparation surfaces. Commercially packaged foods sometimes carry advisory labels about shared-facility processing — Frittu's check operates only on the ingredient names listed in the recipe it generates.
Frequently asked questions
How does Frittu's system check for tree nuts in a generated recipe?
Frittu uses a two-layer process. First, before generating a recipe, Claude is given an exclusion list derived from your allergen profile. For tree nuts, that list covers individual nut varieties as well as their processed forms — confectionery products like praline, marzipan, nougat, and gianduja; condiment forms like nut butter; snack forms like mixed nuts and trail mix; and nut-based ingredients like pesto and liqueurs that contain nuts. Claude receives these as a hard exclusion instruction and is directed to build the recipe without them. After the recipe is returned, a server-side function checks every ingredient name against a coded keyword list for tree nuts. Any match causes the recipe to be rejected and Frittu attempts to generate an alternative.
Does Frittu check for pesto when tree nuts are excluded?
Yes. "Pesto" is included in Frittu's tree-nut keyword list because classical pesto alla Genovese contains pine nuts as a core ingredient — not a garnish or optional addition. Pine nuts provide body, fat, and the characteristic mild sweetness that makes pesto distinct. Many commercial pesto products also contain pine nuts. Because the nut is integral rather than optional, "pesto" is treated as a tree-nut-containing ingredient in the same way that "soy sauce" is treated as a wheat-containing ingredient: the recipe is rejected and regenerated if pesto appears when tree nuts are excluded.
Why are liqueurs like amaretto and frangelico in the tree-nut keyword list?
Amaretto is an Italian liqueur traditionally produced from almonds or from the kernels of stone fruits such as apricots, which share aromatic compounds with almonds. Frittu's keyword list includes "amaretto" because it is an almond-associated ingredient that appears in baking, dessert sauces, and tiramisu recipes. Frangelico is a hazelnut liqueur produced in Italy; hazelnut is a tree nut. Both liqueurs appear frequently in dessert and baking recipes, and both are flagged by the tree-nut keyword check so that any recipe using them is rejected and regenerated when tree nuts are excluded from a user's profile.
If I exclude both tree nuts and dairy, how does Frittu handle almond milk?
Almond milk would be flagged under the tree-nut check. Frittu's dairy check uses a prefix-exception mechanism so that plant-based dairy alternatives — such as oat milk, coconut cream, and almond milk — are not incorrectly flagged when only dairy is excluded. However, when tree nuts are also selected, this exception is suppressed for nut-derived prefixes. Ingredient names like "almond milk" and "cashew cream" are then flagged by the tree-nut keyword check and the recipe is rejected and regenerated. Non-nut plant-based alternatives such as oat milk and coconut cream are unaffected and continue to pass. The two checks interact deliberately to prevent a loophole where a nut-based dairy alternative would pass unchecked when both allergens are selected.
What happens when a generated recipe triggers the tree-nut check?
The recipe is rejected before it is saved or shown to the user. Frittu retries the generation automatically. The rejection and retry happen server-side — the user sees only the final recipe that passed the check. If a generated recipe matches a tree-nut keyword it is rejected and Frittu attempts to generate an alternative; if none passes the check, no recipe is returned for that slot.
Try Frittu with your allergen list
Set your allergens once. Every recipe Frittu generates is then checked against them before it reaches you.
Download FrittuMore on how Frittu works