Abstract
Objective: This study explores the use of advanced Natural Language Processing (NLP) techniques to enhance food classification and dietary analysis using raw text input from a diet tracking app. Materials and Methods: The study was conducted in three stages: data collection, framework development, and application. Data were collected via the myCircadianClock app, where participants logged their meals in free-text format. Only de-identified food-related entries were used. We developed the NutriRAG framework, an NLP framework utilizing a Retrieval-Augmented Generation (RAG) approach to retrieve examples and incorporating large language models such as GPT-4 and Llama-2-70b. NutriRAG was designed to identify and classify user-recorded food items into predefined categories and analyzed dietary patterns from free-text entries in a 12-week randomized clinical trial (RCT: NCT04259632). The RCT compared three groups of obese participants: those following time-restricted eating (TRE, 8-hour eating window), caloric restriction (CR, 15% reduction), and unrestricted eating (UR). Results: NutriRAG significantly enhanced classification accuracy and effectively identified nutritional content and analyzed dietary patterns, as noted by the retrieval-augmented GPT-4 model achieving a Micro F1 score of 82.24. Both interventions showed dietary alterations: CR participants ate fewer snacks and sugary foods, while TRE participants reduced nighttime eating. Conclusion: By using AI, NutriRAG marks a substantial advancement in food classification and dietary analysis of nutritional assessments. The findings highlight the potential of NLP to personalize nutrition and manage diet-related health issues, suggesting further research to expand these models for wider use.
Competing Interest Statement
The authors have declared no competing interest.
Clinical Trial
NCT04259632
Funding Statement
This study was supported by the UMN CTSA Award UM1TR004405-01A1 from the National Center for Advancing Translational Sciences. Additional support came from National Institutes of Health grants R01DK124484 to LSC, and MRI support grants P41EB027061 and S10OD017974. Funding was also provided by the National Center for Complementary and Integrative Health of National Institutes of Health grant number R01AT009457 and U01AT012871, National Institute on Aging grant number R01AG078154, National Cancer Institute grant number R01CA287413, and National Institute of Diabetes and Digestive and Kidney Diseases R01DK115629. The project was also supported by the UMN Institute for Diabetes, Obesity and Metabolism Pilot and Feasibility grant program. The content is solely the responsibility of the authors and does not represent the official views of the National Institutes of Health.
Author Declarations
I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.
Yes
The details of the IRB/oversight body that provided approval or exemption for the research described are given below:
The study received ethical approval from the University of Minnesota Institutional Review Board (IRB STUDY00008545) and the Salk Institute Institutional Review Board (IRB 15-0003). All participants provided written informed consent prior to participation.
I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.
Yes
I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).
Yes
I have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.
Yes
The Chan Zuckerberg Initiative, Cold Spring Harbor Laboratory, the Sergey Brin Family Foundation, California Institute of Technology, Centre National de la Recherche Scientifique, Fred Hutchinson Cancer Center, Imperial College London, Massachusetts Institute of Technology, Stanford University, University of Washington, and Vrije Universiteit Amsterdam.