Abstract
Accurate nutrient profiling is essential for health management but is often hindered by the complexity of meal descriptions. Most meal plans list "compound ingredients"—dishes like "Beef Stroganoff"—which must be decomposed into basic components for precise tracking. This study evaluates the performance of three Large Language Models (LLMs)—GPT-4o, Llama-3 (70b), and Mixtral (8x7b)—in automating this decomposition process. While Llama-3 and GPT-4o demonstrate high accuracy, significant gaps remain in identifying "hidden" ingredients like oils and seasonings, highlighting the need for specialized refinements in nutritional AI.
Introduction
Nutrient profiling is a cornerstone of managing chronic diseases such as diabetes and hypertension. However, the transition from a meal description to a structured nutritional database is a significant hurdle. Meal plans typically consist of compound ingredients that require manual breakdown into basic components (e.g., flour, butter, onions) before they can be cross-referenced with databases like the USDA FoodData Central. This manual process is labor-intensive and prone to error.
This paper investigates whether LLMs can serve as "digital nutritionists" by automating the identification and decomposition of these complex dishes. By bridging the gap between natural language meal descriptions and structured data, LLMs could revolutionize personalized nutrition tracking.
Methodology
The researchers developed a systematic workflow to test the capabilities of three prominent LLMs: GPT-4o, Llama-3 (70b), and Mixtral (8x7b). The process began with the generation of 15 diverse meal plans using GPT-4o, encompassing 101 total ingredients.
As shown in Figure 1, the workflow involved:
- Identification: Models identified compound ingredients within the generated plans.
- Decomposition: These ingredients were broken down into basic components.
- Validation: Results were cross-referenced with the USDA FoodData Central repository via API.
- Evaluation: Performance was measured against a "ground truth" established by professional nutritionists using metrics such as Accuracy and F1-score.
Key Results
The comparative analysis revealed distinct performance tiers among the models. Llama-3 (70b) emerged as the top performer, slightly outperforming the proprietary GPT-4o, though the difference was not statistically significant ($p > .1$).
As illustrated in Figure 4, Llama-3 (70b) achieved an F1-score of 0.894 and an accuracy of 0.893. GPT-4o followed with an F1-score of 0.842 and accuracy of 0.835. In contrast, Mixtral (8x7b) performed significantly worse ($p < .01$), particularly struggling with complex items like hummus.
Discussion: The "Seasoning Gap"
A critical finding of this study is the "Seasoning Gap." Despite high overall performance, all models frequently overlooked "invisible" ingredients essential for accurate nutritional profiles. While models were adept at identifying primary proteins and vegetables, they often missed cooking oils, salt, and sugar.
Interestingly, while Mixtral had the lowest overall accuracy, it was the most likely to include basic seasonings (12.9% of the time compared to GPT-4o’s 9.7%). This suggests that different training biases influence how models perceive recipe "completeness." Without accounting for these hidden fats and sodium sources, the resulting nutritional data remains insufficient for medical-grade applications.
Conclusion and Future Work
LLMs show immense promise in automating the first steps of nutritional analysis. The parity between open-weights models like Llama-3 and proprietary models like GPT-4o suggests a viable path for specialized healthcare applications.
However, to reach "medical grade" precision, future work must address the omission of essential cooking elements. Potential strategies include implementing Chain-of-Thought prompting to force models to consider cooking methods and integrating direct caloric and macronutrient estimation into the pipeline. Ultimately, these models could support users with specific medical needs where ingredient precision is a matter of safety.
Summary updated