Mitigating Prediabetes: Building and Testing a Software-Enabled Recommendation Engine
Ashna Ganeshalingam, Avni Ganeshalingam
Webber Academy
Grade 9
Presentation
Problem
This study was inspired by the diagnosis of our father’s prediabetes. His efforts to avoid the onset of diabetes through diet and exercise has motivated us to learn whether his efforts are truly impactful. According to the CDC, diabetes is the seventh leading cause of death in the world. In 2021, 537M adults had diabetes worldwide, and this figure is expected to increase to 783M by 2045. Health spending on treating diabetes is estimated at $966B USD in 2021, which is 322% more than the spend on cardiovascular disease, which is the leading cause of death in the world. Moreover, it is estimated there are 96 million prediabetics in the world1. If managed properly in the prediabetic phase, the occurrence of diabetes could potentially be reduced. The purpose of this project is to first, build a software-enabled recommendation engine that can assist prediabetics in mitigating postprandial glucose spikes to eventually prevent the onset of diabetes. Scientific research exists that indicates certain recommendations carried out pre-meal or post-meal can have a positive impact on postprandial glucose spikes. The second purpose of this project is to test the recommendation engine, “Smart Sugar Buddy”. This study includes conclusions drawn from over 300 data points.
Scientific Question: Can a real time software-enabled recommendation engine reduce post-prandial glucose levels?
Method
This study has two main components. The first, is to build the recommendation engine and, the second is to test the recommendation engine. Building the Recommendation Engine (Smart Sugar Buddy) Initial Phase: The app that is being created focusses on data collection and storage, and notification management. The goal is to build a meal logging app that will:
- Collect Data through the following user inputs:
a. Input of health data (ie. age, gender, weight, height, current medications) b. Input/Time of meals (ie. glycemic index of meals) c. Input/Time of pre-meal recommendations d. Input/Time of post-meal recommendations e. Input of realtime blood glucose levels (automatically inputted into the app by measurement through a continuous glucose monitor). 2. Store this Data for use in training the recommendation system for personalized recommendations. The system will be able to correlate which recommendations that were followed to how much the glucose spike diminished by. As a result, with use over time, the user will be able to conclude which recommendations are the most effective. 3. Notify the User to: a. Input his meals: By way of a photo that uses AI to recognize food and carbohydrate amount. b. Input the Pre-Meal Recommendation he followed c. Input the Post-Meal Recommendation he followed The following are recommendations that will be tested in the app:
| Pre-Meal Recommendation | Post-Meal Recommendation |
|---|---|
| Consume Protein prior to meal | Exercise after the meal |
| - Walk | |
| - Yoga | |
| - Weight Lifting | |
| Consume Fiber prior to meal (ie. Metamucil) | Consume Apple Cider Vinegar after the meal |
| Consume Apple Cider Vinegar prior to meal | Consume Green tea after the meal |
| Meditate prior to meal |
Long Term Goals: Through accurate logging and tracking, the app ensures a solid foundation for future machine learning-driven features that help users manage their glucose levels more effectively. The data obtained will be stored in a centralized database. Once enough data has been collected, the system will transition into a recommendation engine that predicts users’ blood glucose responses and recommends personalized pre-meal and post-meal interventions (by using artificial intelligence). The High Level Architecture Overview: The architecture of the app follows a Model-View-Controller (MVC) framework.
- Model Layer
The model layer is responsible for managing and processing a variety of user inputs including baseline variables, meal data, and activity-related information. The goal is to collect detailed data on users’ pre-meal, meal, and post-meal activities and store it in a centralized database for future recommendation model development. Data Inputs: The collected data can be categorized into several key types: Personal Traits: - Basic demographic and physiological data: Age, Weight, BMI - Medical Data: Current medications Baseline Variables: - Blood Glucose Level Baseline: Current blood glucose levels before a meal (in mmol/L) Pre-Meal Variables: - Pre-Meal Recommendations: Consumption of Protein, Fiber, Apple Cider Vinegar and/or Meditation Meal Variables: - The exact time of meal consumption - Foods consumed in meal Post-Meal Variables:
- Post-Meal Recommendations: Exercise Type, Consumption of Apple Cider Vinegar and/or Consumption of Green Tea.
Data Storage: The data will be organized and stored in a centralized database (SQL/NoSQL) to ensure efficient access and retrieval. Each data point will be categorized by the type of meal (pre-meal, meal, post-meal) and accompanied with a timestamp to track exact timing of user activities. Additionally, the database will capture metadata such as notification response times and logging intervals to monitor user engagement. Eventually, the structured storage of data will allow for a detailed analysis and patterns for development of machine learning models. These models will generate personalized pre-meal and post-meal recommendations based on the user’s historical patterns of blood glucose response and behavior. B. View Layer and Controller Layer See Appendix II for Wireframe Displays and Explanation. Testing the Recommendation Engine (Smart Sugar Buddy)
- Continuous Glucose Monitoring by Dexcom G6/7
This study will utilize a continuous glucose monitor (CGM) to take blood glucose levels. The most ideal way to measure blood glucose levels is in fact to obtain a blood drop by finger prick and testing the glucose level by a glucometer. However, since using human blood is not allowed in this study, a CGM was utilized. A CGM consists of a small sensor that is a wire filament that is inserted into the skin using an applicator. This filament reaches the interstitial fluid under the skin. The interstitial fluid is the fluid between the skin cells. The filament takes measurements based on the glucose concentration in this fluid, and does not reach the blood vessel that runs under the skin cells. The CGM above the skin is attached to a bluetooth transmitter, which then transmits the measurements to a receiver, which is typically a cell phone. The CGM can remain on the skin for upto 10 days. This study utilized the Dexcom G6/G7 monitoring system which is a reliable system recommended regularly by doctors10. The data received by the CGM and the Dexcom app is then transferred into Smart Sugar Buddy in realtime. An application programming interface (API) was applied for; the agreement was approved by Dexcom for this to happen. Human users attached a Dexcom CGM to themselves and used the recommendation engine app (Smart Sugar Buddy). Meals and recommendations were entered as per the app for a ten day period and results were acquired. Users did two trials each. Materials: · Continuous Blood Glucose Monitor: Dexcom G6/7 · Apple Phone with apps: Testflight and The App: Smart Sugar Buddy · Human users · Source of Protein: Arrae Protein Packet (15g) · Source of Fiber: Metamucil (2 teaspoons) · Green Tea: Tetley Decaffeinated Green Tea · Weights: 10 pounds Methodology: First, users must create their personal baseline glucose model. To do this, they must consume meals with the following amounts of carbohydrates: 20g, 30g, 40g, 50g, 60g, 70g, 80g, 90g, and 100g. They must not follow any of the recommendations. This can be repeated 3 times. The dashboard for the app will provide the information of the postprandial glucose spike in the form of the Area Under the Curve (AUC) in mmol/L per gram of carbohydrate. Once this data is obtained, the AUC can be calculated by multiplying the AUC/g by the grams of the carbohydrates in the meal. The AUC represents the increase in the glucose level in mmol/L after a meal. This value represents how much the glucose should go up in the user normally after a meal, when recommendations are not followed. The AUC then was plotted against the grams of the carbohydrates in a scatter plot. Applying a polynomial function to the fourth order to the data then allowed us to obtain the R2 and the equation of this line. The R2 should be above 75% for legitimate accuracy of the data. Once the baseline glucose model is obtained, the user can now consume meals with the same amounts of carbohydrates listed above (20-100g) and follow the recommendations. This will allow us to obtain the experimental glucose model. Again, the dashboard for the app will provide us with the AUC/g, from which we can calculate the AUC for when recommendations were followed (this is the “experimental” AUC). Using the equation of the line from the baseline glucose model where x=carbohydrates in the meal, one can calculate the AUC for that meal if recommendations had not been followed (this is the “theoretical” AUC). The percent change can then be determined using the theoretical and experimental AUC values. The percent change obtained represents the reduction in postprandial glucose levels when recommendations were followed. The percent changes for each user were averaged to determine the overall percent reduction in glucose levels when recommendations were followed.
Analysis
We had 4 users complete this process. CYSF would only allow users that already use the Dexcom CGM, therefore, our users were limited. Results: 1. Graphs 1 - 4: These scatter plots display the grams of carbohydrates plotted against the AUC (mmol·min/L) for four users. The blue line represents the baseline glucose model (when recommendations were not followed). The red line represents the experimental glucose model (when recommendations were followed). 2. Graphs 5 & 6: These bar graphs show the postprandial glucose spikes for each recommendation. Meditation elicited the lowest glucose spike in premeal recommendations, and Yoga decreased the glucose levels the most in postmeal recommendations. Analysis: The following is the analysis of the results. All graphs are included in Appendix IV. Graphs 1-4 display that the experimental glucose model has shifted downwards relative to the baseline glucose model. This indicates that the postprandial glucose levels on average were less when recommendations were followed. The following were the percent reductions in the postprandial glucose spike by user:
a. User 1: 7.1% b. User 2: 10.2% c. User 3: 10.6% d. User 4: 7.2% Graph 5 displays the percent reduction in the glucose spike for premeal recommendations. All the recommendations were effective, except for fiber, which did not decrease blood glucose levels. Meditation had the largest reduction at 13.2%. Graph 6 displays the percent reduction in the glucose spike for postmeal recommendations. All recommendations were effective. Yoga had the largest reduction at 15.4%. This could have been due to the fact that meditation and yoga both decrease cortisol levels, which allows cells to uptake glucose in the blood.
Conclusion
The following are inferences drawn from this study: 1. Smart Sugar Buddy is an effective software-enabled recommendation engine that helps decrease postprandial glucose spikes. This was concluded since postprandial glucose spikes were consistently lower when recommendations were followed.
2. The most effective premeal and postmeal recommendations were meditation and yoga, respectively.
3. Smart Sugar Buddy’s software interface prompts are effective at maintaining compliance to recommendations. This was concluded because Follow Rates all above 50%.
Citations
1. IDF Diabetes Atlas, 2022, https://diabetesatlas.org/. 2. Newman, Tim. “Can Fiber Reduce Blood Sugar Spikes?” ZOE, 4 May 2023, https://zoe.com/learn/fiber-reduce-blood-sugar-spikes. 3. “How exercise can help lower your blood sugar.” Diabetes Canada, 2024, https://www.diabetes.ca/about-diabetes/stories/how-exercise-can-help-lower-your-blood-sugar. 4. Stanford, Kristin & Goodyear, Laurie. “Exercise and type 2 diabetes: molecular mechanisms regulating glucose uptake in skeletal muscle.” Advanced Physiology Education, 2014, https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4315445/. 5. Syeda, Afsheen, Battillo, Daniel, Visaria, Aayush, & Malin, Steven. “The importance of exercise for glycemic control in type 2 diabetes.”American Journal of Medicine Open, 2023, https://www.sciencedirect.com/science/article/pii/S2667036423000018. 6. “What is diabetes?” CDC, Sept 2023, https://www.cdc.gov/diabetes/basics/diabetes.html. 7. “What Is Diabetes?” National Institute of Diabetes and Digestive and Kidney Diseases, April 2023, https://www.niddk.nih.gov/health-information/diabetes/overview/what-is-diabetes. 8. “Disease Prevention.” Harvard T.H. Chan School of Public Health, 2024, https://www.hsph.harvard.edu/nutritionsource/disease-prevention/. 9. Freeman\, Andrew\, Acevedo\, Luis\, Pennings\, Nicholas. “Insulin Resistance.” StatPearls\, August 2023\, https://www.ncbi.nlm.nih.gov/books/NBK507839/. 10. Umpierrez, Guillermo E. “Accuracy of Dexcom G6 Continuous Glucose Monitoring in Non–Critically Ill Hospitalized Patients With Diabetes.” Diabetes Care, 2021, https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8323182/. 11. Asp, Karen. “Is High-Intensity Exercise Always Best for You? It Depends.” Real Simple, January 2023, https://www.realsimple.com/health/fitness-exercise/exercise-intensity. 12. “High Intensity Exercise vs Low Intensity Exercise - Which Is Best?” Forth\, 16 August 2021\, https://www.forthwithlife.co.uk/blog/high-intensity-vs-low-intensity-exercise. 13. Thau, Lauren, Gandhi, Jayashree, Sharma, Sandeep. “Physiology, Cortisol.” August, 2023, https://www.ncbi.nlm.nih.gov/books/NBK538239/. 14. Sullivan, Debra. “What are ideal blood glucose levels?” Medical News Today, 2023, https://www.medicalnewstoday.com/articles/317536. 15. Smedegaard, Stine et. Al. “Whey Protein Premeal Lowers Postprandial Glucose Concentrations in Adults Compared with Water-The Effect of Timing, Dose, and Metabolic Status: A Systematic Review and Meta-analysis.” PubMed, 2023, https://pubmed.ncbi.nlm.nih.gov/37536867/. 16. Lim, Joseph et. Al. “Vinegar as a functional ingredient to improve postprandial glycemic control-human intervention findings and molecular mechanisms.” PubMed, 2016, https://pubmed.ncbi.nlm.nih.gov/27213723/. 17. Nadkarni, Prashant et. Al. “Regulation of Glucose Homeostasis by GLP-1.” National Library of Medicine, 2014, https://pmc.ncbi.nlm.nih.gov/articles/PMC4159612/. 18. Tsuneki\, Hiroshi et. Al. “Effect of green tea on blood glucose levels and serum proteomic patterns in diabetic (db/db) mice and on glucose metabolism in healthy humans.” National Library of Medicine\, 2004\, https://pmc.ncbi.nlm.nih.gov/articles/PMC517497/. 19. Hucklebridge, F. et al. “The awakening cortisol response and blood glucose levels.” National Library of Medicine, 1999, https://pubmed.ncbi.nlm.nih.gov/10201642/.
Acknowledgement
We would first like to extend our appreciation to our school for giving us the opportunity to participate in the Science Fair. Furthermore, we would like to express my sincere gratitude our teacher, Dr. Beatriz Garcia-Diaz, and our mentor, Richard Gao, who provided us with direction and support during the study. Finally, this work would not have been possible without the participation and diligent support of my family who helped us build and test the application, Smart Sugar Buddy.
