Tools used
- get_user_preferences
- search_meals
- create_meal
- set_user_macro_targets
- search_foods
- get_food
- get_user_history
- remember
Procedure
Procedure
-
Constraint Identification: Use
get_user_preferencesand reviewget_user_historyto identify mandatory constraints:- Financial: Determine if the user requires a low-cost or "thrifty" approach.
- Cultural: Identify preferred eating patterns (e.g., Mediterranean, Mexican, Indian, Chinese/Japanese).
- Ingredient: Note allergies, religious restrictions, or specific food exclusions.
-
Establish Macro Baseline: Use
set_user_macro_targetsto define the target distribution. For budget-restricted plans, prioritize a 2,000 kcal baseline as per Thrifty Food Plan (TFP) evidence to maintain cost-effectiveness. -
Ingredient Selection via Nutrient-per-Unit-Cost: Use
search_foodsto identify high-value, nutrient-dense staples. prioritize:- Proteins: Legumes (lentils, chickpeas), seeds, ground turkey, and eggs for low-cost optimization.
- Produce: Carrots, potatoes, and cabbage as high-value nutrient-dense staples.
-
Cultural Protein Mapping: When building meals, swap generic proteins for culturally relevant sources using
search_foods:- Mexican Context: Prioritize black beans, ceviche, or pozole.
- Asian Context: Prioritize tofu, edamame, or sashimi.
- Indian Context: Prioritize dal (lentils), dahi (yogurt), or paneer.
- Middle Eastern Context: Prioritize fava beans, chickpeas, or tahini.
-
Cost-Neutral Reallocation: Review the user's recent logs via
get_user_history. If budget is a concern, replace processed food entries with whole-food alternatives (e.g., replacing processed snacks with whole fruit or seeds) to increase fiber and Vitamin A/C/E intake without increasing spend. -
Plan Construction: Use
create_mealto assemble the plan.- Apply "Fuzzy Logic" by ensuring 100% compliance with mandatory exclusions (allergies/culture) while allowing minor flexibility in non-essential ingredients to meet the primary macro targets.
- Balance the "Social Acceptability" constraint by ensuring the variety of foods does not deviate so extremely from the user's identified cultural pattern that it risks non-adherence.
-
Verification: Compare the final plan against the research-backed "FoodRx" model:
- Are legumes or seeds used to limit expensive red meat/dairy?
- Is the plan aligned with sustainable guidelines while meeting RDA?
-
Memory Update: Use
rememberto store specific cultural protein preferences or financial constraints for future planning cycles.