GPT-4o in Nutrition for Inpatients Undergoing Post-Stroke Rehabilitation: Identifying Dietary Errors, Exploring Expert-AI Rationale Differences, and Structuring AI-Expert Collaboration
- 15 October 2025
- journal article
- Published by Taylor & Francis in Journal of the American Nutrition Association
- Vol. 45 (4) , 310-321
Abstract
Inpatients undergoing stroke rehabilitation experience high malnutrition rates, requiring strict dietary management. However, manual and time-pressured dietary provision can cause errors in diet composition, highlighting the need for innovation. Therefore, we aimed to evaluate whether GPT-4o can accurately identify dietary errors in hospital-based stroke rehabilitation menus, analyze differences in AI vs. expert rationale for decisions, and explore AI's potential role in clinical workflows through a structured collaboration framework. A TRIPOD-compliant validation study analyzing 264 hospital-based menus designed for stroke rehabilitation inpatients requiring specialized diets (e.g., dysphagia, diabetes). GPT-4o's dietary compliance classifications were assessed using a structured 0-error, 1-error, and 2+ error framework, with expert dietitians as ground-truth in a rehabilitation hospital nutrition department, where expert dietitians selected menus from existing clinical practices for inpatients on specialized diets. AI-expert agreement, overall accuracy, sensitivity, and specificity in dietary error classification were assessed. AI vs. expert justifications were analyzed thematically to identify differences in decision rationale. Cohen's Kappa (95% CI) measured inter-rater reliability. Overall accuracy, sensitivity, and specificity were calculated using a 3 × 3 confusion matrix, comparing AI classifications (0-error, 1-error, 2+ error) to the expert-labeled ground truth. Thematic analysis categorized AI vs. expert justifications for flagged dietary errors. Out of 264 menus (1,000+ food items), 26 (9.8%) had discrepancies. Among these, 57.7% (15 cases) were PAS-based dysphagia diets, followed by diabetic (19.2%, 5 cases) and allergen-related (15.4%, 4 cases) diets. The remaining two cases involved low-sodium and low-fat diets. Cohen's Kappa: 0.892 (95% CI: 0.845-0.939, p < 0.001). 0-errors: Sensitivity 94.3%, specificity 100%; 1-error: Sensitivity 86.2%, specificity 96.6%; 2+-errors: Sensitivity 97.8%, specificity 92.6%. Thematic analysis revealed GPT-4o followed strict rule-based interpretations, whereas dietitians incorporated patient tolerance and food preparation considerations. GPT-4o demonstrated high accuracy but over-flagged violations, supporting its role as a prescreening tool with expert collaboration.Keywords
This publication has 34 references indexed in Scilit:
- Can ChatGPT provide appropriate meal plans for NCD patients?Nutrition, 2023
- The credibility of dietary advice formulated by ChatGPT: Robo-diets for people with food allergiesNutrition, 2023
- Prevalence of Malnutrition Diagnosed with GLIM Criteria and Association with Activities of Daily Living in Patients with Acute StrokeJournal of Stroke and Cerebrovascular Diseases, 2021
- Frequent and personalized nutritional support leads to improved nutritional status, activities of daily living, and dysphagia after strokeNutrition, 2021
- Implementation interventions to promote the uptake of evidence-based practices in stroke rehabilitationCochrane Database of Systematic Reviews, 2020
- Association Between Malnutrition and Outcomes in Patients With Severe Ischemic Stroke Undergoing RehabilitationArchives of Physical Medicine and Rehabilitation, 2020
- Use of the Penetration-Aspiration Scale in Dysphagia Research: A Systematic ReviewDysphagia, 2019
- Primary ‘dehydration’ and acute stroke: a systematic research reviewJournal of Neurology, 2018
- ESPEN guideline clinical nutrition in neurologyClinical Nutrition, 2018
- Nutritional Improvement Correlates with Recovery of Activities of Daily Living among Malnourished Elderly Stroke Patients in the Convalescent Stage: A Cross-Sectional StudyJournal of the Academy of Nutrition and Dietetics, 2016