Overview
The AI Chat feature connects you with Smarty, your intelligent virtual nutrition assistant powered by advanced AI. Through natural conversation, Smarty helps you generate personalized meal plans, modify existing meals, search for recipes, and answer nutrition questions.Conversational AI: Unlike rigid forms or menus, Smarty understands natural language. Just type what you need as if you’re talking to a human nutritionist.
What Smarty Can Do
Smarty is equipped with powerful capabilities to manage your nutrition journey:Generate Weekly Plans
Create complete 7-day nutrition plans based on your profile, goals, and preferences.
View Current Plan
Retrieve and display your active meal plan with all nutritional details.
Modify Specific Meals
Replace individual meals in your plan while maintaining nutritional balance.
Suggest Alternatives
Get alternative recipe suggestions when you don’t like a planned meal.
Search Recipes
Find recipes matching specific criteria (ingredients, calories, diet type, etc.).
Update Preferences
Change your dietary restrictions, tastes, or preferences conversationally.
View Profile Summary
Review your current profile settings and nutritional targets.
Answer Questions
Get nutrition advice, explanations, and guidance on healthy eating.
How to Use the AI Chat
Access the Chat
Click on 🤖 Intelligent Nutrition Assistant in the sidebar to open the chat interface.
Start a Conversation
Type your request in the message input at the bottom of the screen. Be as specific or general as you like.Examples:
- “Generate a meal plan for me”
- “Show me my current plan”
- “Find me a high-protein breakfast recipe”
- “Replace tomorrow’s lunch with something vegetarian”
Review Smarty's Response
Smarty processes your request and responds with helpful information, suggestions, or actions taken.
Smarty may access multiple tools behind the scenes (database queries, ML models, recipe search) to fulfill your request.
Key AI Capabilities
1. Weekly Plan Generation
How It Works
How It Works
When you ask Smarty to generate a plan, the AI:
- Retrieves your profile (goals, preferences, restrictions)
- Calculates daily calorie and macro targets
- Uses machine learning to select appropriate recipes
- Distributes meals across 7 days and your chosen meal frequency
- Ensures nutritional balance and variety
- Saves the plan to your account
- “Create my weekly meal plan”
- “Generate a new plan for me”
- “I need a fresh meal plan starting Monday”
2. Recipe Search by Criteria
How It Works
How It Works
Smarty can search the recipe database using natural language criteria:Search by:
- Ingredients (“recipes with chicken and broccoli”)
- Calories (“low-calorie desserts under 200 calories”)
- Macros (“high-protein, low-carb meals”)
- Diet type (“vegan dinner ideas”)
- Meal type (“quick breakfast recipes”)
- Multiple criteria (“gluten-free lunch under 400 calories”)
3. Meal Modification
How It Works
How It Works
Don’t like a specific meal in your plan? Ask Smarty to change it:
- Specify which meal you want to replace (day and meal type)
- Optionally provide criteria for the replacement
- Smarty uses AI to find a suitable alternative
- The plan updates automatically
- “Replace Wednesday’s dinner”
- “Change tomorrow’s breakfast to something with eggs”
- “Swap Friday lunch for a vegan option”
4. Recipe Swap Suggestions
How It Works
How It Works
Smarty can suggest alternatives for any recipe using a KNN (K-Nearest Neighbors) machine learning model:
- You request a swap for a specific recipe
- The ML model finds nutritionally similar recipes
- Smarty presents alternatives matching your preferences
- You can accept or request another suggestion
5. Profile & Preference Updates
How It Works
How It Works
Update your dietary information conversationally:Examples:
- “Add gluten allergy to my restrictions”
- “I don’t like mushrooms anymore”
- “Change my goal to weight maintenance”
- “Update my diet type to pescatarian”
6. Current Plan Retrieval
How It Works
How It Works
Ask Smarty to show your active meal plan:
- Displays all meals for the week
- Shows nutritional breakdown by day
- Includes recipe names and macro totals
- “Show me my current plan”
- “What’s on my meal plan?”
- “What am I eating this week?“
7. Profile Summary
How It Works
How It Works
Get an overview of your profile settings:
- Current goals and targets
- Active dietary restrictions
- Preferred diet types
- Biometric information
- Taste preferences
- “Show my profile”
- “What are my current nutrition targets?”
- “What are my dietary restrictions?”
Conversation Features
Persistent History
Chat history is saved locally for 24 hours, providing context for multi-turn conversations.
Natural Language Understanding
Smarty understands intent, not just keywords. You can phrase requests in many different ways.
Contextual Responses
Smarty remembers the conversation flow, allowing for follow-up questions and refinements.
Tool Integration
Behind the scenes, Smarty uses 7+ specialized tools to handle different types of requests.
Message Interface
Message Types
- User Messages
- Smarty Messages
- Typing Indicator
- Proposal Cards
Your messages appear on the right side of the chat with a distinct style. Each message shows a timestamp.
Proposal Cards (Recipe Swaps)
When Smarty suggests a recipe swap, you’ll see an interactive card:Swap Recipe SuggestionOriginal Recipe (calories) → Suggested Recipe (calories)[Confirm] [Request Another]
- Confirm: Accept the suggestion and update your plan
- Request Another: Ask for a different alternative
Example Conversations
Generating Your First Plan
Generating Your First Plan
You: “Hi Smarty, I need to create my meal plan”Smarty: “I’d be happy to help you create a personalized weekly meal plan! Based on your profile, I’ll generate a 7-day plan with [X] meals per day, tailored to your [goal] and [diet type] preferences. One moment…”Smarty: “Your weekly meal plan has been created! It includes [X] calories per day with balanced macronutrients to support your [goal] goal. You can view it in the My Plan section.”
Searching for Specific Recipes
Searching for Specific Recipes
You: “Find me high-protein vegetarian lunches under 500 calories”Smarty: “I found 12 vegetarian lunch recipes that are high in protein and under 500 calories. Here are the top options:
- Lentil & Quinoa Bowl - 380 kcal, 24g protein
- Greek Chickpea Salad - 420 kcal, 18g protein
- Tofu Stir-Fry with Vegetables - 450 kcal, 22g protein …”
Modifying a Meal
Modifying a Meal
You: “I don’t like Tuesday’s dinner. Can you change it to something with fish?”Smarty: “I’ll replace Tuesday’s dinner with a fish-based recipe that fits your nutritional targets…”Smarty: “Done! I’ve replaced your Tuesday dinner with Grilled Salmon with Asparagus (480 kcal, 42g protein). The macros are very similar to your original meal.”
Updating Preferences
Updating Preferences
You: “Add dairy-free to my restrictions please”Smarty: “I’ve updated your profile to include dairy-free as a dietary restriction. Future meal plans will exclude dairy products. Would you like me to regenerate your current plan to reflect this change?”
Viewing Your Plan
Viewing Your Plan
You: “What am I eating this week?”Smarty: “Here’s your current meal plan:Monday (2,100 kcal)
- Breakfast: Oatmeal with Berries - 350 kcal
- Lunch: Chicken Caesar Salad - 480 kcal
- Dinner: Baked Salmon with Vegetables - 520 kcal …
AI Technology Stack
Smarty is powered by:- LangChain: For natural language understanding and tool orchestration
- LangGraph: Manages conversational state and tool routing
- Ollama: Provides local LLM inference for privacy
- KNN ML Model: Powers recipe similarity and swap suggestions
- FastAPI Backend: Handles tool execution and database queries
All AI processing happens server-side, ensuring fast responses even on lower-end devices.
Chat Persistence
24-Hour History
Conversations are stored in your browser’s local storage for 24 hours.
Auto-Cleanup
After 24 hours of inactivity, the chat history automatically clears.
User-Specific
Each user has their own isolated chat history based on their user ID.
Manual Refresh
Refresh the page to start a fresh conversation if desired.
Use Cases
First-Time Plan Creation
First-Time Plan Creation
After completing your profile, chat with Smarty to generate your first personalized meal plan. The AI considers all your preferences automatically.
Quick Recipe Discovery
Quick Recipe Discovery
When you’re craving something specific or need inspiration, ask Smarty to search for recipes matching your mood or available ingredients.
On-the-Fly Modifications
On-the-Fly Modifications
Life happens! If you can’t eat a planned meal, quickly swap it through the chat without navigating multiple screens.
Nutrition Education
Nutrition Education
Ask Smarty questions about nutrition, macros, or healthy eating. The AI provides informative responses based on best practices.
Progressive Refinement
Progressive Refinement
Start with a general request, then refine it through conversation:
- “Show me dinner ideas”
- “Make them vegetarian”
- “Under 600 calories”
- “With high protein”
Weekly Plan Reviews
Weekly Plan Reviews
Ask Smarty to show your plan and discuss potential improvements or variations for future weeks.
Tips for Best Results
Limitations & Considerations
Processing Time: Complex requests (like generating a full weekly plan) may take 10-30 seconds. You’ll see a typing indicator while Smarty works.
Recipe Database: Recommendations are limited to recipes in the SmartEat AI database (90,000+ recipes).
Related Features
- Dashboard: View and track the meals Smarty plans for you
- My Plan: See your complete weekly plan and make visual changes
- Profile Setup: Update the preferences Smarty uses for recommendations
Smarty is Learning
SmartEat AI continuously improves based on user interactions and feedback. Your conversations help make Smarty smarter!
