Food Allergies and AI Meal Planning: How Rizin Screens Every Meal Before You See It
By Rizin AI Team · August 9, 2026 · 9 min read · Nutrition
For the 32 million Americans living with food allergies, 'AI-generated meal plan' sounds like a recipe for disaster — and with most apps, it is. Rizin uses machine-enforced pre-filtering (not prompt suggestions) plus ingredient-level token intelligence that knows satay is peanut, calamari is shellfish, but almond milk is not dairy. Here's exactly how the system works.
Published: August 9, 2026. This article describes Rizin's allergen-filtering architecture as it exists today. It is educational, not medical advice. If you have a severe or life-threatening food allergy, you should always verify every meal's ingredients yourself — no automated system should be your only check.
The problem with "just tell the AI not to include peanuts"
Thirty-two million Americans live with at least one food allergy. For many of them, a single exposure isn't inconvenient — it's an emergency room visit. So when AI-powered meal planning arrived, the pitch sounded promising: finally, a personalized plan that can adapt to your dietary restrictions automatically.
The reality inside most apps is shakier than the pitch. The standard approach is a prompt suggestion: the system includes something like "the user is allergic to peanuts, do not include peanuts in any meals" in the instructions it sends to the language model. The LLM reads that instruction and complies — usually. But language models are probabilistic systems. They follow instructions at a statistical level, not an absolute one. On a bad day, or when the instruction gets pushed down by a long context, a meal with peanut sauce appears in your plan and no warning fires.
That is not a safety system. That is a polite suggestion made to software that occasionally ignores polite suggestions.
Rizin's approach is architecturally different — and this article explains exactly how it works.
Layer 1: The hard pre-filter that runs before the LLM
When Rizin generates or refills your meal plan, your allergen list is applied as a machine-enforced filter on meal candidates before the AI ever selects them. The LLM is not asked nicely to avoid your allergens — it never sees meals containing them in the first place.
Here is what that means in practice. Your allergen profile is stored on your account. When the system assembles a pool of candidate meals for your plan, any meal that contains a flagged allergen token is excluded from that pool before the selection step runs. The AI chooses from what remains. There is no step where the AI could accidentally select an allergen-containing meal, because allergen-containing meals are not in its selection pool.
This is the difference between a lock and a polite sign on the door. The pre-filter is the lock.
Layer 2: Ingredient-level token intelligence
A naive allergen filter would just search for the word "peanut." That approach creates two categories of failure: misses (satay doesn't say peanut) and false alarms (peanut butter is flagged for dairy allergy). Both erode trust. Misses are dangerous; false alarms make the system cry wolf until users tune it out.
Rizin's filter works at the ingredient-token level with a curated compound-expansion map. When you set an allergen, the filter doesn't just match on that word — it expands to a structured set of known ingredient-level tokens associated with that allergen, including common dish names that imply the ingredient even when the ingredient isn't named directly.
Some examples of how this plays out in practice:
| Allergen profile | Correctly flagged | Correctly not flagged |
| Peanut allergy | Peanut butter, satay, pad thai with peanut sauce, groundnut stew | Almond butter, tree nut mix, tahini |
| Tree nut allergy | Almond butter, walnut oil, pesto (pine nuts), marzipan | Peanut butter (legume, not tree nut), coconut (separated class) |
| Dairy allergy | Butter, cream, milk, whey protein, ghee, casein | Peanut butter, almond milk, cocoa butter, coconut milk, oat milk |
| Shellfish allergy | Shrimp, calamari, crab, lobster, prawn, oyster sauce | Fish (separate allergen class), fish sauce from anchovies |
| Gluten / celiac | Bread, pasta, flour, soy sauce (unless tamari), barley, malt | Rice, oats (unless malt-barley co-processed), corn |
The precision on the false-alarm side matters as much as the recall on the detection side. "Peanut butter contains dairy" or "almond milk contains dairy" are false positives that make an allergy filter useless. Eliminating them is what makes warnings worth paying attention to when they do appear.
Layer 3: Visible verification you can trust
Rizin doesn't just filter silently — it shows you the result. Every meal in your plan displays a clear status: "No listed allergens detected" on meals that passed the filter. This is deliberately visible, not buried in a settings page, because a safety check you can see is one you can actually verify and trust.
The status message is also dynamic in one important direction: if you add a new allergen to your profile after your plan already exists, meals that were generated under your old profile receive a clear warning state — they are flagged as needing review until they are regenerated under the new constraints. Stale meals that predate your updated allergen profile are never silently presented as safe. You see the warning and can trigger a regeneration.
This matters because allergen profiles change. A new diagnosis, a child's allergy added to a family plan, a sensitivity that has worsened — the system tracks when your profile changed and surfaces the uncertainty rather than assuming the old meals are still fine.
Layer 4: Photo logging catches allergens at the plate level too
Your meal plan is one source of food. The other is everything you actually eat outside of it — a restaurant meal, a colleague's birthday cake, something grabbed from a food truck. This is where photo logging adds a second allergen check independent of the plan.
When you log a meal by photo, Rizin's AI breaks the plate into individual items. Each detected item is then checked against your allergen profile. Items that match your allergens receive a per-item allergen badge in the review screen — before you confirm the log. You see the warning while you are still deciding whether to eat the meal, not after.
The same token intelligence that powers the plan filter powers the photo log check: satay chicken flags for peanut allergy, calamari flags for shellfish, a cream sauce flags for dairy. The check runs at the item level, not the meal level, so you can see exactly which component triggered the warning and make a decision about it specifically.
Voice logging works the same way: describe your meal, Rizin transcribes and itemizes it, and allergen badges appear on any item that matches your profile before you confirm.
The honest section: what no automated system can guarantee
Rizin's allergen filter is genuinely more robust than a prompt suggestion. It is not a substitute for your own judgment, and we would rather say that plainly than let you assume otherwise.
A few limits that are worth being honest about:
- Cross-contamination is invisible to software. A meal that contains no allergen ingredients can still be contaminated if it was prepared on shared equipment, in shared fryers, or in a kitchen where allergens are present. No AI can detect or warn about cross-contamination risk. For anyone with severe anaphylactic allergy, manufacturer labels and restaurant staff remain the only reliable check for this.
- Novel dish names can slip through. The filter works from a curated token set. An unusually named dish or a regional ingredient name that isn't in the map can produce a false negative — the dish contains your allergen, but the name doesn't match a known token. Rizin is designed to fail-closed (flag when uncertain rather than silently pass), but the map is not exhaustive of every possible dish in every cuisine.
- User-added custom meals bypass the filter. If you manually log a meal or add a food item directly, the filter is not applied to your entry. It applies to AI-generated and AI-analyzed content.
- The photo log check depends on correct food identification. If the AI misidentifies a dish — reads tahini paste as hummus, for example — the allergen check runs on the wrong food. This is why the review screen matters: it shows you the identified items before anything is logged, so you can correct a misidentification before it affects your allergen check.
We build the filter to over-warn rather than under-warn. A false positive (a safe meal flagged for review) costs you a few seconds. A false negative on a severe allergy can cost far more. That design choice is intentional, and it is why the warning threshold is set conservatively.
For anyone with a severe or anaphylactic allergy — celiac disease, peanut, tree nut, shellfish — the filter is a helpful safety layer, not a replacement for reading labels, asking restaurants about preparation, and carrying epinephrine if your allergy is life-threatening. Transparency about this is the only way the system can be genuinely trusted.
Who this is built for
The allergen filter was built with specific populations in mind:
- Celiac disease and non-celiac gluten sensitivity. Gluten is embedded in dozens of foods under ingredient names that don't say "wheat" — barley, malt, durum, spelt, farro, many soy sauces. The filter maps these. Gluten-free is one of the most-set dietary profiles in Rizin, and the pre-filter has been calibrated extensively for it.
- Peanut and tree nut allergies. These are among the most common severe food allergies and among the most linguistically varied — peanuts appear as groundnuts, arachis, mixed nuts, and inside countless named dishes without the word "peanut." The compound expansion map for this allergen class is one of the most extensive.
- Dairy allergy and lactose intolerance. The filter distinguishes between dairy (lactose + casein/whey proteins) and plant-based products that get called "butter" or "milk" (almond milk, oat milk, cocoa butter, coconut milk). This is one of the most common false-alarm patterns in naive allergen filters, and we have worked to eliminate it.
- Egg allergy. Less linguistically complex than peanut or dairy, but eggs appear in many dishes that don't name them explicitly (mayonnaise, some sauces, many baked goods). The filter handles these by token expansion rather than relying on the ingredient being named directly.
- Shellfish allergy. The filter separates shellfish (shrimp, crab, lobster, calamari, oyster) from fish, which are different allergen classes that often get conflated. Shellfish allergy does not imply fish allergy, and the filter reflects that distinction.
How to set up allergen filtering in Rizin
During onboarding, Rizin asks about dietary restrictions and allergies as part of your profile. You can set your allergen list there, or update it at any time in your profile settings after onboarding. Once set, the filter applies immediately to any new plan generation and to all subsequent photo and voice meal logs.
If you add an allergen mid-plan, existing meal plan entries receive the warning state described above. You can trigger a meal plan refresh from the Nutrition screen to regenerate meals under your updated constraints.
For detailed setup, the Adaptive Nutrition feature page covers how your dietary profile connects to your nutrition plan. If you want to see how photo logging and allergen detection work together in real use, the Photo & Voice Meal Logging page walks through the review flow. The free Calorie Scanner tool is also a good place to see how the AI food identification works before signing up.
If you have questions about a specific allergy combination or want to understand how a particular ingredient maps in the filter, our AI coach is the fastest way to ask — it has full context on your profile and can explain what is and is not flagged for your allergen list.
Related reading: our 30-meal AI calorie scanner accuracy test covers how accurate the food identification underlying the photo log actually is, with full methodology and honest failure cases.
Frequently Asked Questions
Can AI meal planners handle food allergies safely?
It depends entirely on the architecture. An AI meal planner that adds your allergen to a prompt and asks the LLM to avoid it is running a probabilistic instruction — not a safety system. A well-built system uses a hard pre-filter that removes allergen-containing meals from the selection pool before the AI chooses from them. Rizin uses the second approach: your allergen list is a machine-enforced filter, not a prompt suggestion. That said, no automated system can detect cross-contamination risk or catch every novel ingredient name — for severe allergies, the filter is a safety layer, not a replacement for reading labels and asking about preparation.
Does Rizin work for celiac disease?
Yes. Gluten is one of the most extensively mapped allergen classes in Rizin's filter, because gluten appears under many ingredient names (barley, malt, spelt, durum, farro, most soy sauces) that don't include the word "wheat" or "gluten." The filter expands to cover these. Meals generated for a celiac or gluten-free profile are pre-filtered to exclude gluten-containing ingredients. Cross-contamination risk — which is the major concern for celiac disease in shared kitchens and commercial facilities — cannot be detected by software, so that check still falls to you when eating outside the home.
How does Rizin handle "hidden" allergens like peanuts in satay or shellfish in calamari?
The filter works from a compound expansion map, not a simple ingredient name match. Dish names that imply allergen-containing ingredients are mapped to their relevant allergen tokens. Satay maps to peanut. Calamari maps to shellfish. Pad thai with peanut sauce maps to peanut. Oyster sauce maps to shellfish. This is a curated map, not exhaustive of every dish in every cuisine, but it covers the most common cases where an allergen is implied by the dish name rather than spelled out as an ingredient.
What happens to my meal plan if I add a new allergy after it's already been generated?
Meals generated before you added the new allergen receive a clear warning state — they are flagged as potentially unsafe for your updated profile until they are regenerated under the new constraints. They are never silently presented as safe. You can trigger a meal plan refresh from the Nutrition screen to regenerate your plan with the updated allergen exclusions applied from the start.
Try Rizin free for 7 days — set your allergen profile during onboarding and your meal plan is pre-filtered from day one. No credit card required.
Read the full article on Rizin →