Skip to main content

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. SmartEat AI Chat Interface
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

1

Access the Chat

Click on 🤖 Intelligent Nutrition Assistant in the sidebar to open the chat interface.
2

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”
3

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.
4

Continue the Conversation

Chat is conversational - you can ask follow-up questions, request modifications, or explore related topics.The conversation history is preserved for context.

Key AI Capabilities

1. Weekly Plan Generation

When you ask Smarty to generate a plan, the AI:
  1. Retrieves your profile (goals, preferences, restrictions)
  2. Calculates daily calorie and macro targets
  3. Uses machine learning to select appropriate recipes
  4. Distributes meals across 7 days and your chosen meal frequency
  5. Ensures nutritional balance and variety
  6. Saves the plan to your account
Example prompts:
  • “Create my weekly meal plan”
  • “Generate a new plan for me”
  • “I need a fresh meal plan starting Monday”

2. Recipe Search by Criteria

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”)
Smarty returns a list of matching recipes with nutritional information.

3. Meal Modification

Don’t like a specific meal in your plan? Ask Smarty to change it:
  1. Specify which meal you want to replace (day and meal type)
  2. Optionally provide criteria for the replacement
  3. Smarty uses AI to find a suitable alternative
  4. The plan updates automatically
Example prompts:
  • “Replace Wednesday’s dinner”
  • “Change tomorrow’s breakfast to something with eggs”
  • “Swap Friday lunch for a vegan option”

4. Recipe Swap Suggestions

Smarty can suggest alternatives for any recipe using a KNN (K-Nearest Neighbors) machine learning model:
  1. You request a swap for a specific recipe
  2. The ML model finds nutritionally similar recipes
  3. Smarty presents alternatives matching your preferences
  4. You can accept or request another suggestion
This feature is also available directly in the My Plan interface.

5. Profile & Preference Updates

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”
Smarty updates your profile and confirms the changes.

6. Current Plan Retrieval

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
Example prompts:
  • “Show me my current plan”
  • “What’s on my meal plan?”
  • “What am I eating this week?“

7. Profile Summary

Get an overview of your profile settings:
  • Current goals and targets
  • Active dietary restrictions
  • Preferred diet types
  • Biometric information
  • Taste preferences
Example prompts:
  • “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

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
The card updates in real-time as you interact with it.

Example Conversations

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.”
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:
  1. Lentil & Quinoa Bowl - 380 kcal, 24g protein
  2. Greek Chickpea Salad - 420 kcal, 18g protein
  3. Tofu Stir-Fry with Vegetables - 450 kcal, 22g protein …”
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.”
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?”
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 …
Would you like details on any specific day or meal?”

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

After completing your profile, chat with Smarty to generate your first personalized meal plan. The AI considers all your preferences automatically.
When you’re craving something specific or need inspiration, ask Smarty to search for recipes matching your mood or available ingredients.
Life happens! If you can’t eat a planned meal, quickly swap it through the chat without navigating multiple screens.
Ask Smarty questions about nutrition, macros, or healthy eating. The AI provides informative responses based on best practices.
Start with a general request, then refine it through conversation:
  • “Show me dinner ideas”
  • “Make them vegetarian”
  • “Under 600 calories”
  • “With high protein”
Ask Smarty to show your plan and discuss potential improvements or variations for future weeks.

Tips for Best Results

Be Specific: The more details you provide, the better Smarty can help. Instead of “change my meal,” say “replace Thursday’s lunch with a vegan option under 500 calories.”
Use Natural Language: Don’t worry about exact commands. Smarty understands conversational phrasing.
Ask Follow-Up Questions: If a response isn’t quite what you wanted, refine your request in the next message.
Leverage Context: Smarty remembers recent conversation, so you can refer back to previous topics.
Check Your Profile: Ensure your profile is up-to-date for the most accurate recommendations.

Limitations & Considerations

Profile Required: Smarty needs a completed profile to generate plans and make personalized recommendations.
Internet Connection: The chat requires an active internet connection to communicate with the AI backend.
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).
  • 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!

Build docs developers (and LLMs) love