Mitigating Prediabetes: Building & Testing a Software-Enable Recommendation Engine
Ashna Ganeshalingam Avni Ganeshalingam
Grade 8
Presentation
Problem
Can a real time software-enabled recommendation engine reduce post-prandial glucose spikes?
Background Information:
- Diabetes:
Diabetes is a disease in which blood glucose levels in the human body are not able to be controlled normally. When a meal is ingested, the human body will break down the proteins, fats, and carbohydrates in the food and reabsorb the important metabolites needed for organ function.
The most important source of energy for organs is glucose. Glucose comes from the food that we eat. When food is digested into glucose, the glucose needs to enter the cells of the organs. This occurs with the help of a hormone called insulin. When blood glucose levels increase after a meal, insulin is signaled from the pancreas to be released and helps glucose in the bloodstream to enter the cells of our organs. However, when insulin is deficient or defective, this cannot happen. As a result, glucose in the bloodstream builds up to unhealthy levels. There are two scenarios in which this can happen. In the first scenario, the human body recognizes the insulin molecule as being foreign and launches an immune response against it. As a result, insulin is depleted and there are insufficient levels. This is called Type 1 Diabetes. In the second situation, there is a defect that develops within the receptor of the insulin molecule, so the insulin cannot help glucose enter cells, causing blood sugar levels to increase. This is called Type 2 Diabetes6,7.
An uncontrolled increase in blood glucose levels can result in a plethora of detrimental effects. Some of the most common complications are cardiac disease, vision loss (retinopathy), kidney failure, and peripheral neuropathy. Recent studies are also showing that increased blood glucose levels may also be leading to cancer. These diabetic complications eventually result in death6,8
Type I diabetics treat their disease through daily injections of insulin, which help in controlling blood glucose levels. However, there are numerous other ways that Type I and Type II diabetes can be further controlled. There are numerous risk factors that can cause the onset of diabetes. They are as follows:
- Age >40 years
- Elevated BMI (Body Mass Index)
- Elevated Cholesterol
- Elevated Blood Pressure
- Level of Physical Activity
- Ethnic Background (African, Arab, Asian, Hispanic, Indigenous, or South Asian)
- Family History of Diabetes
- Smoking & Alcohol
Managing the above risk factors properly can slow the progression of diabetes.
- The Effect of Recommendations on Blood Glucose Levels:
Blood glucose levels can be mitigated by certain factors/recommendations. There is some scientific evidence that shows that there may be a correlation among certain recommendations and the reduction of blood glucose levels. Using these recommendations in a recommendation engine will assist proving whether these recommendations are beneficial in mitigating blood glucose spikes.
- Order of Consumption of Foods: Proteins First
Studies show that consuming protein first in your meal before consuming the rest of the meal assists in controlling blood sugar levels. This is due to an increase in GLP-1 (Glucagon like Peptide 1) as described below.15
- Fiber:
Fiber is a carbohydrate that has many health benefits, but there is evidence that soluble fiber, in particular, can help control blood sugar levels. Sources containing soluble fiber are fruits, vegetables, legumes, and wheat bran. First, the viscosity of the contents in the stomach is increased by fiber and food stays in the stomach for longer. Movement of the bolus into the small intestine is also slowed. As a result, carbohydrates are also metabolized at a slower rate because the slowed movement and the fact that enzymes find it more difficult to mix into the gut contents with an increased viscosity. Glucose then enters the bloodstream more slowly. Normally, carbohydrates do not travel far down the small intestine since they are broken down rather quickly. However, when they are broken down more slowly due to the viscosity increased by fiber, they can make it to the distal ileum. As a result, this triggers the ileal brake, which causes the release of GLP-1. The effect of GLP-1 is described below. 2
- Apple Cider Vinegar (ACV):
Apple Cider Vinegar works in various ways to decrease the glucose spike. There is evidence showing that apple cider vinegar increases GLP-1 production as described below.. Other limited evidence says that the acidity in the vinegar makes the body harder to absorb carbohydrates and increases the ability of the liver and muscle to absorb blood glucose. 16
Mechanism of Action: Increase in GLP-1
As cited above, the above pre-meal recommendations (protein, fiber, and ACV) work by increasing the protein hormone GLP-1 by the small intestine. This hormone then results in the following two mechanisms:
- GLP-1 delays gastric emptying. If peristalsis through the stomach and intestine decreases, then the breakdown of carbohydrates occurs more slowly. As a result, the blood glucose does not rise as quickly and increases more slowly at a lower level. 17
- GLP-1 also increases insulin synthesis by the pancreas, which encourages cells in the body to take up glucose more efficiently, thereby reducing blood glucose levels after a meal. 17
4. Meditation & Yoga:
Meditation suppresses the stress hormone cortisol. Cortisol is a hormone that releases stored glucose into the blood, which increases blood glucose. With relaxation by meditation and yoga, cortisol levels decrease, which allows muscle and fat cells to uptake blood glucose, thereby decreasing blood glucose.19
- Green Tea:
Green tea’s main ingredient is epigallocatechin gallate, a flavonoid, which can do two things:
1) Repress the genes that control gluconeogenesis by the liver. As a result, with decreased gluconeogenesis, less glucose is released into the bloodstream
2) Activates kinases that promote the activity of insulin signalling proteins, which in turn, improves insulin resistance. Both of these actions decrease blood glucose levels.18
- Exercise:
There is also evidence that shows that exercise also helps in managing diabetes by controlling blood sugar levels. In general, glucose enters a cell by GLUT4. GLUT4 is a protein that allows for glucose to travel across a cell membrane. However, GLUT4 must get to the cell membrane first. The pathways that this occurs by are not fully understood. However, there are 2 ways that GLUT4 can be upregulated to the cell membrane. The first way is by insulin itself. Insulin in the blood will activate insulin receptors on cell membranes by binding to it. This activates the signalling cascade to upregulate GLUT4 to the cell membrane, which then allows for glucose in the blood to be taken up by a cell. The second method this pathway is initiated is by exercise. It is believed that the contraction of muscle cells also activates the upregulation of GLUT4 into the cell membrane allowing blood glucose to enter skeletal cells, thereby decreasing blood glucose levels3,4,5.
In this study, low intensity exercise was utilized, such as walking, yoga, and weight lifting, instead of high intensity exercise. High intensity exercise often causes the body to produce a stress hormone called cortisol. Cortisol is a hormone that releases stored glucose into the blood, which increases blood glucose. Therefore, high intensity exercise increases blood glucose levels. As a result, this study used low intensity exercise instead13.
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:
-
- Input of health data (ie. age, gender, weight, height, current medications)
- Input/Time of meals (ie. glycemic index of meals)
- Input/Time of pre-meal recommendations
- Input/Time of post-meal recommendations
- Input of realtime blood glucose levels (automatically inputted into the app by measurement through a continuous glucose monitor).
- 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.
- Notify the User to:
- Input his meals: Time of meal and contents of meal
- Input the Pre-Meal Recommendation he followed
- 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
|
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.
- 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
- Apple Phone with apps: Testflight and The App: Smart Sugar Buddy
- Human users
Analysis
Results:
The following are the results obtained from the testing of the app. Results are outlined in the tables in the Appendix III.
Note: The Follow Rate and the Spike Reduction percentages are displayed on the application in realtime.
The following is the method for calculating Spike Reduction:
% Spike Reduction=Ave Glucose Spikes Not Followed-Ave Glucose Spikes Followed × 100%
Ave Glucose Spikes Not Followed
The Follow Rate Percentage is calculated by:
% Follow Rate= Number of Recommendations Followed × 100%
(Recommendations Followed + Not Followed)
- Graph 1: This bar graph displays the comparison of the average postprandial glucose spike (mmol/L) when recommendations were followed and not followed by user. When recommendations were followed, the average glucose spike was lower than when recommendations were not followed. The deviation between the two groups ranged from 0.4-0.7mmol/L.
- Graph 2: This box plot displays all 160 data points obtained from the testing. Again, this graph compares the postprandial glucose spike (mmol/L) for all meals when recommendations were followed and not followed. The range of data for when recommendations were followed was smaller than when the recommendations were not followed. The range of results for the followed group was -0.3-4.5 mmol/L, whereas the range of results for the not followed group was 0 to 5.0mmol/L. The mean for the followed group was 1.6 mmol/L, which was much less than the mean for the not followed group of 2.1 mmol/L.
- Graph 3: This scatter plot shows the Follow Rate percentage plotted against the Spike Reduction percentage. There is no definitive trend/relationship observed between follow rate and the spike reduction.
Analysis:
The following is the analysis of the results. All graphs are included in Appendix IV.
- Postprandial glucose spikes are lower when meal recommendations are followed as shown in both Graphs 1 and 2. One can infer that the pre-meal and post-meal recommendations followed by users, therefore, helped decrease the postprandial glucose spike.
- Graph 2 shows that the distribution of data when recommendations were followed was in a smaller range than when recommendations were not followed (ie. the height of the box is shorter). From this, one can infer that when recommendations are followed, there is less variation with postprandial glucose levels and, perhaps, more control over postprandial glucose spikes when meal recommendations are followed.
- Graph 3 showed no correlation between follow rate and the spike reduction. It was expected that as a user followed more recommendations that the spike reduction would be greater, however, this was not observed. This can be explained by the fact that postprandial glucose is dependent on many factors – some which were not taken into account during the testing. First, each user consumed different meals and each meal has its own glycemic index. The glycemic indices of meals was not taken into account when the spike reduction calculation was performed. Second, each user has a varying metabolic state – this state is affected by health status, medications, stress levels, etc. All of these factors (and more) can affect blood glucose levels. Since users in this study were not identical, their varying metabolic states may have resulted in a spike reduction that does not necessarily correlate to the follow rate.
Conclusion
The following are inferences drawn from this study:
- 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.
- Smart Sugar Buddy recommendations results in less variation in postprandial glucose spikes, indicating that it can potentially allow for better control of postprandial blood glucose levels. This was concluded since the range of postprandial glucose spikes was smaller when recommendations were followed.
- Smart Sugar Buddy’s software interface prompts are effective at maintaining compliance to recommendations. This was concluded because Follow Rates were reasonable – the range of Follow Rates by users in this study was 32% to 76%.
- There is no direct relationship between spike reduction and follow rate because of other confounding factors, such as dietary glycemic index and metabolic conditions of users.
Citations
- IDF Diabetes Atlas, 2022, https://diabetesatlas.org/.
- Newman, Tim. “Can Fiber Reduce Blood Sugar Spikes?” ZOE, 4 May 2023, https://zoe.com/learn/fiber-reduce-blood-sugar-spikes.
- “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.
- 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/.
- 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.
- “What is diabetes?” CDC, Sept 2023, https://www.cdc.gov/diabetes/basics/diabetes.html.
- “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.
- “Disease Prevention.” Harvard T.H. Chan School of Public Health, 2024, https://www.hsph.harvard.edu/nutritionsource/disease-prevention/.
- Freeman, Andrew, Acevedo, Luis, Pennings, Nicholas. “Insulin Resistance.” StatPearls, August 2023, https://www.ncbi.nlm.nih.gov/books/NBK507839/.
- 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/.
- 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.
- “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.
- Thau, Lauren, Gandhi, Jayashree, Sharma, Sandeep. “Physiology, Cortisol.” August, 2023, https://www.ncbi.nlm.nih.gov/books/NBK538239/.
- Sullivan, Debra. “What are ideal blood glucose levels?” Medical News Today, 2023, https://www.medicalnewstoday.com/articles/317536.
- 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/.
- 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/.
- Nadkarni, Prashant et. Al. “Regulation of Glucose Homeostasis by GLP-1.” National Library of Medicine, 2014, https://pmc.ncbi.nlm.nih.gov/articles/PMC4159612/.
- 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/.
- 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, 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.