CGM Meets AI: My Personal Health Tech Experiment - part 2
In the initial part of this series, I shared my experience using a Continuous Glucose Monitor (CGM) to track my glucose levels. To interpret this data effectively, I ventured into the world of AI, leveraging ChatGPT and venturing into creating a custom GPT. Let's start by understanding what a custom GPT is.
Understanding the general ChatGPT vs Custom GPTs
ChatGPT, developed by OpenAI, is an AI model capable of generating content from user prompts.
It's built on the Generative Pre-training Transformer (GPT) technology, with GPT-4 Turbo being the latest version for premium users and GPT-3.5 available for everyone. ChatGPT can perform various tasks, from coding to writing, and even create images with DALL-E and soon videos using Sora.
In November 2023, at the OpenAI DevDay, OpenAI introduced Custom GPTs, allowing ChatGPT Plus members to tailor ChatGPT to specific topics without coding.
The engine behind the scenes is the same as the general ChatGPT, but you can add a layer of personalization that is not possible with the general ChatGPT.
These Custom GPTs can include unique terminology, response styles, and datasets, making them more relevant to specific user needs.
The launch of the GPT Store
January 2024 saw the launch of the GPT Store, a platform where developers and non-technical users can share their Custom GPTs, democratizing access to specialized GPTs.
Tech and non-tech people can contribute their custom GPTs to the store, creating a community-driven repo of knowledge and expertise. This collaborative approach enhances the quality and diversity of the available models and encourages continuous improvement and innovation.
GPT Store is designed with a user-friend User Interface (UI) - if you visit chat.openai.com and tap on ‘Explore GPTs’, you will have access to an extensive list of Custom GPTs.
Using the general ChatGPT
Returning to my personal story, I sought a digital assistant for CGM data analysis. As mentioned in my previous post, I noticed three nocturnal dips in my glucose levels one morning.
I first decided to use the general Chat GPT, and I got a basic understanding but needed more detailed insights. ChatGPT suggested these dips might be due to Nocturnal Hypoglycemia, influenced by medication, meal timing, and exercise.
Seeking more, I asked ChatGPT for dietary recommendations if these dips were related to my carbohydrate intake at night.
The suggestions were helpful but generic. I would have loved to have some real examples of meals to try out.
Building the Glucose Guardian GPT
To get more tailored advice, I turned to Custom GPT. The process was straightforward: from my profile in ChatGPT, I clicked on “My GPTs” and then “Create your GPTs” to access the GPT Builder. I used the GPT Builder to specify my needs: a GPT specializing in CGM data focusing on dietary suggestions to stabilize glucose levels.
The system suggested 'Glucose Guardian' as the name and generated a profile picture with DALL-E.
In the setup, I emphasized dietary advice over exercise tips and requested clear, actionable responses, and I wanted to avoid giving medical diagnoses.
The GPT Builder moved on to inquire about the interactions with the user. My preference went with the GPT, making assumptions and asking for confirmation from the user.
Lastly, the GPT Builders asked about the tone of communication with users. I picked a friendly and supportive tone.
All the setup was done, and I could start interacting with Glucose Guardian - It was pretty exciting!
Interacting with Glucose Guardian GPT
Testing Glucose Guardian, I repeated my earlier queries. The responses were more concise and structured, and I was glad to see a friendly and encouraging tone.
The answers still lacked specific meal examples, so I customized the GPT further to include detailed meal suggestions, going back to the GPT builder.
In the Preview window, I revisited my previous query to test the effectiveness of my modifications. This time, the response from the custom GPT was notably different, reflecting the adjustments I had input.
It now provided a tangible example of a meal (“Grilled Chicken with Quinoa and Steamed Vegetables”), with information around the macros, precisely aligning with my requirements!"
Configuring and Enhancing Glucose Guardian GPT
Before considering publishing Glucose Guardian to the GPT Store, I explored additional configurations in the “Configure” tab.
I refined the “Description” for potential users and tweaked the “Conversation starters” to better align with the GPT's focus on diet - I removed the question ‘Can exercise impact my CGM readings?’ and I added a different one ‘What foods should I eat for stable glucose levels?’.
I maintained the 'DALL-E Image Creation' feature in my selections, which inspired a further enhancement to Glucose Guardian. I configured it to not only suggest meal recommendations but also visually represent them.
I tested this new capability, and I inquired with Glucose Guardian about a glucose spike experienced post-consuming bread. I was pleased to see the response included not just textual advice but also a visual representation of the recommended meal (“Avocado toast with chicken and greens”)
Next Steps and Future Possibilities
Glucose Guardian GPT is a friendly assistant who gives me practical recommendations, which I was looking for.
For now, I made it available for anyone following this link.
The Custom GPT could be published to the GPT Store, selecting a category and reviewing the OpenAI guidelines (usage policies and brand guidelines).
An exciting future development could be integrating Glucose Guardian with external APIs like Dexcom for real-time data analysis through Actions. Actions are a robust mechanism for connecting your custom GPT with external APIs.
From the Configure tab, you can use the Action Builder - a tool that allows uploading endpoint schemas in JSON or YAML format, following the OpenAPI specification.
This tool provides options for selecting the preferred authentication method with external APIs. Specifically for Glucose Guardian, I'm considering integrating with the Dexcom API, the same API that interfaces with the CGM device I used. This API offers an endpoint (“/egvs”) for accessing glucose data over specific time ranges. OAuth 2 authentication is required to effectively use this API, with further details available in the documentation.
Conclusion
Integrating AI technologies ChatGPT and Custom GPTs and health represents a step forward in personalized health management and disease prevention. Through the creation of “Glucose Guardian GPT”, we've seen firsthand how these innovative tools can be tailored to provide specific, actionable insights into our health, particularly in managing glucose levels. This opens up possibilities for further technological integrations, such as connecting with external health APIs.
The exploration into Custom GPTs has been a learning experience and a testament to AI's potential in transforming our approach to health care, making it more proactive, informed, and personalized.