Back

ChatGPT with Mixed-Integer Linear Programming for Precision Nutrition Recommendations

Alkeyeva, R.; Nagiyev, I.; Kim, D.; Nurmanova, B.; Omarova, Z.; Varol, H. A.; Chan, M.-Y.

2026-02-17 health informatics
10.64898/2026.02.14.26346312 medRxiv
Show abstract

BackgroundThe growing interest in applying artificial intelligence in personalized nutrition is challenged by the complex nature of dietary advice that must balance health, economic, and personal factors. Though automated solutions using either Linear Programming (LP) or Large Language Models (LLMs) already exist, they have significant drawbacks. LP often lacks personalization, whereas LLMs can be unreliable for precise calculations. ObjectivesTo develop and assess a model that integrates a Mixed Integer Linear Programming (MILP) solver with an LLM to generate personalized meal plans and compare it with standalone LLM and MILP models. MethodsThe proposed hybrid MILP+LLM model first uses an LLM (GPT-4o) to filter a unified food dataset (n=297), which combines regional Central Asian and global food items, according to the users profile. The filtered list of food items is then received by a MILP solver which identifies the set of top 10 optimal solutions. Finally, given this set of solutions, LLM chooses the most appropriate meal plan. The model was evaluated using five synthesized, clinically complex patient profiles sourced from Adilmetova et al. [4]. The performance of this hybrid model was compared against standalone MILP and LLM using 5-point Likert scale with Kruskal-Wallis and post hoc Dunns tests for Nutrient Accuracy, Personalization, Practicality, and Variety. ResultsFindings demonstrated that the proposed MILP+LLM model reached balanced performance achieving scores of more than 3.6 points in all criteria, with high scores in Nutrient Accuracy (3.96), Personalization (3.81), and Practicality (3.99). The standalone LLM model performed the weakest in all criteria, with statistically significant lower scores compared to the other two methods. The standalone MILP model performed best in Nutrient Accuracy (4.93) and in Variety (4.10) but lagged behind the MILP+LLM model in Practicality and Personalization. Kruskal-Wallis and Dunns tests showed MILP and MILP+LLM outperformed LLM across all criteria. MILP was more accurate (p<0.0001), while MILP+LLM model was more practical (p=0.021). ConclusionsThe findings suggest that integrating the LLM with the MILP solver creates a model that combines qualitative personalization with quantitative precision. This model produces comprehensive, reliable meal plans, addressing the limitations of using either model alone.

Matching journals

The top 6 journals account for 50% of the predicted probability mass.

1
PLOS ONE
4510 papers in training set
Top 11%
17.3%
2
BMC Medical Informatics and Decision Making
39 papers in training set
Top 0.2%
12.2%
3
JAMIA Open
37 papers in training set
Top 0.2%
6.7%
4
Scientific Reports
3102 papers in training set
Top 20%
6.2%
5
Journal of Medical Internet Research
85 papers in training set
Top 1.0%
4.8%
6
Computers in Biology and Medicine
120 papers in training set
Top 0.6%
4.3%
50% of probability mass above
7
International Journal of Environmental Research and Public Health
124 papers in training set
Top 1%
4.3%
8
DIGITAL HEALTH
12 papers in training set
Top 0.2%
3.6%
9
JMIR Public Health and Surveillance
45 papers in training set
Top 1.0%
2.6%
10
Cureus
67 papers in training set
Top 2%
2.1%
11
JMIR mHealth and uHealth
10 papers in training set
Top 0.2%
1.9%
12
PeerJ
261 papers in training set
Top 7%
1.7%
13
International Journal of Medical Informatics
25 papers in training set
Top 0.9%
1.6%
14
PLOS Digital Health
91 papers in training set
Top 2%
1.6%
15
Frontiers in Public Health
140 papers in training set
Top 5%
1.5%
16
JMIR Research Protocols
18 papers in training set
Top 0.9%
1.3%
17
Royal Society Open Science
193 papers in training set
Top 3%
1.2%
18
BMC Bioinformatics
383 papers in training set
Top 6%
1.1%
19
Biology Methods and Protocols
53 papers in training set
Top 2%
0.9%
20
Healthcare
16 papers in training set
Top 1%
0.9%
21
JMIR Medical Informatics
17 papers in training set
Top 1%
0.9%
22
Frontiers in Artificial Intelligence
18 papers in training set
Top 0.7%
0.8%
23
Frontiers in Digital Health
20 papers in training set
Top 1%
0.8%
24
BMC Public Health
147 papers in training set
Top 6%
0.7%
25
BMC Infectious Diseases
118 papers in training set
Top 5%
0.7%
26
Heliyon
146 papers in training set
Top 7%
0.7%
27
BMC Medical Research Methodology
43 papers in training set
Top 2%
0.7%
28
Archives of Public Health
12 papers in training set
Top 0.9%
0.6%
29
BMJ Public Health
18 papers in training set
Top 0.9%
0.6%