Skip to main content
POST
Get ML Recommendation
This specific endpoint is not directly implemented. Recipe recommendations are provided through the chat interface and the swap meal endpoint.

How Recommendations Work

SmartEat AI uses a machine learning model to provide personalized recipe recommendations. The system uses:
  • K-Nearest Neighbors (KNN) algorithm for similarity matching
  • Nutritional profile matching based on calories, protein, carbs, and fat
  • Diet type filtering (vegan, vegetarian, high-protein, low-carb, etc.)
  • Meal type compatibility (breakfast, lunch, dinner, snack)
  • User preference learning from your profile tastes and restrictions

Recommendation Features

1. Smart Meal Plan Generation

When you request a meal plan through the chat interface, the AI:
  1. Analyzes your profile (goals, macros, preferences)
  2. Selects recipes that match your nutritional targets
  3. Ensures variety across the week
  4. Respects your dietary restrictions and preferences
  5. Balances meal types according to your meals-per-day setting

2. Recipe Similarity Matching

The ML model finds similar recipes based on:
calculation
Calculates distance in a scaled feature space of calories, protein, carbohydrates, and fat content
filter
Ensures recommended recipes match your selected diet types (e.g., vegan, high-protein)
constraint
Only recommends recipes suitable for the target meal slot (breakfast, lunch, dinner, snack)
filter
Prevents recommending recipes already in your current meal plan

Getting Recommendations

You can get personalized recommendations through:

Via Chat Interface

Request via Chat

Via Swap Endpoint

For direct recipe swapping, use the Swap Meal Recommendation endpoint.

ML Model Architecture

Feature Space

The recommendation engine operates in a scaled feature space:
Feature Scaling

Similarity Calculation

K-Nearest Neighbors

Example Recommendation Flow

Response Schema (Conceptual)

If this endpoint were implemented, it would return:
array
Array of recommended recipes

Notes

  • The ML model is loaded on application startup for fast inference
  • Recommendations are personalized based on your complete profile
  • The system learns from your preferences over time
  • Use the Swap Meal endpoint for direct recipe substitutions