AI Assistant
Generate meal plans, get food suggestions, and swap items with AI-powered assistance.
MealStack's AI Assistant helps you build meal plans faster by generating culturally appropriate Indian meals based on your client's profile, targets, and dietary preferences. Every AI output is a draft — you review, edit, and approve before anything is applied.
AI features require a Starter plan or above. Free plans don't include AI access. You can purchase additional AI credit packs from Settings → AI.
How it works
The AI uses a two-phase approach:
- Phase 1 — AI composes real meals using its culinary knowledge (e.g., "Roti + Dal + Sabzi + Curd")
- Phase 2 — The system matches food names to your food database (IFCT, USDA, or custom) and calculates actual nutrients
The AI never sees your food database directly. It suggests meals as a nutritionist would, then the system finds the closest matching foods.
Preview workflow
Every AI generation follows a preview → review → accept flow:
Trigger generation
Click any AI action — "Generate Day's Meals", a sidebar action pill, or "Fill with AI" on a meal slot.
Review the preview
The preview replaces the meal content area and shows:
- Every proposed meal with food names, gram weights, and calories
- A nutrient bar matching the standard builder bar (calorie ring + macro bars)
- Deviation warnings if macros are significantly off target
- A notice if accepting will replace existing items
Edit individual items
Before accepting, you can:
- Remove items — hover any item and click ✕ to exclude it. Nutrient totals update live.
- Change mismatched foods — when the AI suggested "Roti" but the system matched "Bread roll", a "Change" button appears. Click it to search for the correct food inline.
Accept or discard
- Accept — applies the preview items to the plan
- Discard — closes the preview with no changes
- Regenerate — generates a fresh preview with a new AI call
AI sidebar panel
The AI tab in the builder sidebar (✨ icon) provides plan-level AI actions:
| Action | What it does |
|---|---|
| Fill empty days | Generates meals for all days that have no items |
| Boost protein | Regenerates the active day with high-protein focus |
| Reduce carbs | Swaps carb-heavy items for lighter alternatives |
| Optimize for goal | Adjusts the plan based on the client's goal (weight loss, muscle gain) |
| Add variety | Suggests alternatives for repeated foods across days |
Actions are contextual — they appear based on the current plan state and nutrient gaps.
Custom instructions
The input field at the bottom of the sidebar lets you type free-form instructions:
"Include South Indian breakfast options, avoid raw salads, prefer home-cooked meals"
The AI incorporates these instructions when generating meals.
Generating a full day
When a day has no items, a centered CTA appears:
Fill this day with AI Generate meals for Monday based on Navin's targets and preferences
Clicking this generates a preview. You'll see the proposed meals before anything is saved.
Filling a single meal
For individual meal slots, use the "Fill with AI" button below "Add food or recipe" (visible when the meal is empty), or find it in the meal's ⋯ dropdown menu.
AI food suggestions
When you open the food search panel and there's a significant nutrient gap (>30% below target for any macro), AI suggestions appear automatically at the top:
- Shows 3 suggested foods with portions and calories
- Each suggestion explains why it was chosen (e.g., "High protein, fills 40% of remaining gap")
- Click + to add directly to the meal
- Suggestions collapse when you start typing a search query
AI swap
Hover over any food item in a meal to see the ✨ swap icon. Click it to get 3 AI-suggested alternatives:
- Alternatives are in the same food category (beverage → beverage, protein → protein)
- Each shows calories, protein, and a brief reason
- Click "Swap" to replace the item in-place
Unmatched food resolution
When AI generates a day's meals, some food names may not match anything in the database. MealStack handles this automatically:
Auto-created AI foods — For most unmatched items, MealStack auto-creates a custom food with AI-estimated nutrients and includes it in the preview. These appear with a blue "AI Food" badge, distinct from regular database-matched items (violet dot). The auto-created food is saved to your practice's custom food database, marked as unverified.
Manual fallback — In the rare case auto-creation fails (e.g., network error), the item appears in an "unmatched" section with three options:
- Swap — search for a similar food in the database
- Create — open the Quick Food Creator pre-filled with the AI food name
- Skip — remove the item from the preview (click ✕)
When you swap an AI-suggested food to a database food, MealStack remembers the mapping. Next time AI suggests the same food name, it matches instantly — no more "unmatched" for that item. This learning is scoped to your practice.
Visual indicators in the preview
The AI day preview uses three distinct colors to show match quality:
| Indicator | Meaning |
|---|---|
| 🟣 Violet dot | Matched from food database (high confidence) |
| 🟡 Amber dot + "Change" | Matched but name differs significantly — review recommended |
| 🔵 Blue dot + "AI Food" | Auto-created with AI-estimated nutrients — verify after saving |
AI nutrient estimation
When creating a custom food (from the food database page, the quick creator, or the full form), click Estimate with AI to have AI estimate nutritional values from just the food name.
AI returns:
- 16 commonly measured nutrients — energy, protein, carbs, fat, fiber, sugars, calcium, iron, potassium, sodium, zinc, vitamin A, folate (B9), vitamin B12, vitamin C, vitamin D
- Suggested portion sizes (e.g., "1 katori — 150g", "1 piece — 50g")
- Dietary type classification (veg/non-veg/egg/vegan)
- Confidence level — High (well-known foods), Medium (regional/homemade), Low (unusual items)
- Source note — what reference the estimate is based on (e.g., "Based on IFCT 2017 values for grilled chicken")
In the quick creator, the 5 key macros are shown in the form while the remaining 11 nutrients (minerals + vitamins) are saved automatically behind the scenes. In the full custom food form, all 16 nutrients populate the grid directly.
This is free (0 credits) and works in both the quick creator and the full custom food form. A violet disclaimer banner shows the confidence level and source note so you can judge the estimate quality before saving.
AI in PDF exports
When a meal plan contains AI-generated items, MealStack automatically adds a disclaimer to the PDF export: "Some items in this plan were generated with AI assistance. Nutritional values are estimates and may vary." This is appended to your existing disclaimer text (if any) and ensures transparency with clients. You can disable this in Settings → AI Assistant using the "AI disclaimer in PDF exports" toggle.
Credit cost indicators
Every AI action button shows its credit cost inline — a small ⚡ icon with the number of credits, or "Free" in green for zero-cost actions. This gives you full transparency before clicking.
Usage and limits
AI usage is tracked per organization using a weighted credit system that resets with your billing cycle.
Credit costs per action
| Action | Credits | Notes |
|---|---|---|
| Food suggestions (in search panel) | Free | Auto-loads, unlimited |
| AI swap suggestions | Free | Encourages plan refinement |
| Nutrient estimation (custom foods) | Free | Encourages complete food data |
| Fill a single meal | 1 credit | |
| Generate a day (preview) | 1 credit | Regenerating the same day costs another credit |
| Generate multi-day plan | 1 credit per day | A 7-day plan costs 7 credits |
| Generate a recipe | 1 credit | Full recipe with ingredients, steps, and tags |
Suggestions and swaps are free — use them as much as you want to explore options. Credits are only consumed when generating new meals.
Monthly allowance by plan
| Plan | Monthly credits |
|---|---|
| Free | 0 |
| Starter | 200 |
| Pro | 1,000 |
| Clinic | 5,000 |
View your usage in the AI sidebar header or in Settings → AI.
Bonus credit packs
If you exceed your monthly allowance, you can purchase additional credit packs from Settings → AI. Bonus credits are valid for 12 months and are used automatically when your plan allowance runs out.
Privacy and safety
AI suggestions are drafts for practitioner review. Always verify the output before sharing with clients.
- No PII sent to AI — client names, emails, and phone numbers are never included in AI prompts
- Zero data retention — AI providers process data with no storage
- Dietary safety — every AI suggestion is checked against the client's allergies, intolerances, and dietary preference before being shown
- Org-level consent — AI must be enabled at the organization level (DPDP compliance)