• The Musings On AI
  • Posts
  • 🌻 ⚕️ Edition 23: Large Language Models (LLMs) as Context Providers for Healthcare and Wellness

🌻 ⚕️ Edition 23: Large Language Models (LLMs) as Context Providers for Healthcare and Wellness

LLM as health coach.

Currently, we are living at the dawn of a new era in artificial intelligence, one that promises to transform our daily lives. Large Language Models (LLMs) have emerged as the vanguards of this profound shift. These remarkable systems have the potential to revolutionize and redefine every aspect of our lives. LLMs already began to change many sectors, but they have not reached their full potential, especially in some specific fields like, healthcare and wellness.

While AI in healthcare and wellness is not a novel concept, its growth and evolution have been relentless; pushing the boundaries of what was once thought possible. Machine learning algorithms have already made significant inroads, aiding physicians in diagnosing diseases, assisting in drug discovery, and even enhancing the precision of surgical procedures. The integration of AI in wellness  has also birthed an array of smart devices and applications that cater to our physical and mental well-being. One of the rapidly advancing fields in the healthcare and wellness are eating recognition and human activity recognition. These sophisticated algorithms, aim to understand user behaviour, such as eating habits or physical activity patterns, and offer personalized feedback or advice. However, raw outputs from algorithms can sometimes lack the contextual nuance necessary for practical, everyday guidance. Introducing Large Language Models (LLMs), the tools that can provide this much-needed context and transform the raw outputs into actionable insights.

In this blog post we will explore only a small amount of the potential of LLMs, how they can be used to get context from the outputs of eating and human activity recognition algorithms (typical algorithms in the field of healthcare and wellness) which will revolutionize the healthcare and wellness and what are the potential problem we can encounter using them.

Bojan is a Bachelor of Science graduate in Electrical Engineering and Information Technologies with a passion for various technology fields. Especially interested in Software Development, Data&MLOps, Federated Learning, HCI, AI in healthcare. Currently working as main Data&MLOps Engineer in emteqlabs.

🍽️ 🏃 Eating and Human Activity Recognition Algorithms

Many algorithms for eating recognition and human activity recognition rely on raw sensor data as their primary input source. This data often includes information from IMU (Inertial Measurement Unit) sensors (Inertial Measurement Unit sensors), images or in some cases both. Regardless of the input data type, the typical outputs of these algorithms are straightforward, falling into binary or multiclass categories. For eating recognition, these outputs usually indicate whether someone is eating or not, while in the case of human activity recognition, they encompass actions like sitting, standing, walking, running, cycling, or climbing.

However, these output categories have their own limitations, as they do not provide a comprehensive understanding of the user's actions or state. With additional postprocessing of the outputs, it becomes possible to extract more valuable information. For instance, postprocessing can yield insights such as the duration of a specific activity, energy expenditure from the human activity recognition algorithms, or details about an eating session, including the number of chews and calorie consumption estimations or what kind of food has been consumed from the eating recognition algorithms.

Nonetheless, most of this extracted information tends to lack personalization. Large Language Models (LLMs) offer a solution to this limitation by enabling the engineering of prompts for the postprocessed outputs, thus making it feasible to obtain personalized insights from the data.

📄 Context Providing using Postprocessed Outputs from Algorithms

Some of the ideas that already pop-out in the healthcare and wellness AI communities on how the LLMs can be used for context providing using postprocessed outputs are:

  • Personalized Dietary Guidance

  • Meal Planning

  • Personalized Exercise Recommendations

  • Lifestyle Optimization

Let us tackle each of the ideas!

🥗 Personalized Dietary Guidance

The synergy between eating recognition algorithms and LLMs is particularly evident when it comes to personalized dietary advice. For instance, suppose the algorithm detects a pattern of excessive consumption of sugary snacks within an individual's dietary habits. While this data is informative, it may leave the user wondering, "What can I do about it?" The LLMs, can step in to provide tailored recommendations and help the user. Drawing upon their extensive knowledge, LLMs can suggest healthier alternatives and devise strategies specifically suited to an individual's preferences and dietary restrictions. This means that if someone is trying to reduce their sugar intake, LLMs can furnish them with a comprehensive plan, addressing not just what to avoid but also what to embrace, making the journey towards healthier eating a more informed and manageable one. 

This is an example on how the LLMs can be used for Personalized Dietary Guidance. Let’s simulate that our algorithms have detected changes in the chewing rate, increased calories consumed and excessive consumption of sugary snacks. This is the output we get using the GPT-4 model:

🍜️ Meal Planning

The utility of LLMs extends beyond the scope of corrective advice and delves into the realm of proactive meal planning. Users with dietary goals and restrictions can find a reliable ally in LLMs when it comes to crafting a meal plan that aligns perfectly with their nutritional needs. The collaborative effort between eating recognition algorithms, human activity recognition algorithms and LLMs ensures that the meal suggestions are not just generic but highly personalized. By utilizing the outputs generated from eating recognition algorithms, the outputs generated from human activity recognition, the LLMs can recommend recipes and meal ideas that resonate with the user's unique dietary objectives. Whether it is weight loss, muscle gain, or adhering to a specific dietary regimen, LLMs have the potential to become the user's trusted partner in the pursuit of their culinary aspirations in combination with their body goals.

This is an example on how the LLMs can be used for Meal Planning. Let’s simulate that our algorithms have detected increased number of steps, increased cycling activity, calories consumsution and excessive consumption of proteins. Let’s ask the LLM (GPT-4) to analyse our algorithm outputs and give us some advice for increasing muscle mass:

🏋🏻 Personalized Exercise Recommendations

Thanks to the prowess of human activity recognition algorithms, we are now capable of obtaining an intricate snapshot of a user's physical activities, from the number of steps taken to the heart rate measurements during a rigorous workout session. Yet, these insights, no matter how comprehensive, are merely the beginning. LLMs, with their innate ability to decipher the nuances of human behaviour, take this data to a whole new level. They sift through the numbers and statistics, considering not just the quantitative aspects but also the qualitative dimensions of the user's physical activity. The result? LLMs can generate highly personalized exercise recommendations, tailored to the user's unique fitness goals and preferences. For example, if the algorithm detects a significant decrease in physical activity, the LLM (Large Language Model) can go the extra mile by suggesting exercise routines that precisely match the user's fitness level, thereby making exercise regimens more effective and user-centric than ever before.

This is an example on how the LLMs can be used for Personalized Exercise Recommendations. Let’s simulate that we already set up our goals for our body and we have something detected from the algorithms for human activity recognition. This is plan for exercises we get from the GPT-4 model as results:

🏻‍♀️ Lifestyle Optimization

LLMs extend their intelligence beyond just exercise recommendations. These models are adept at offering comprehensive lifestyle optimization advice, capitalizing on their analytical prowess and deep understanding of human activity recognition data. By utilizing the outputs generated by these recognition systems, LLMs can recommend substantial lifestyle changes. This may include proposing adjustments to sleep patterns for a more restful night's sleep, encouraging the incorporation of short, rejuvenating breaks during sedentary work hours, or even suggesting stress reduction techniques based on activity and heart rate patterns. LLMs become your virtual lifestyle consultants, tirelessly working in the background to enhance the quality of your life, one data point at a time.

This is an example on how the LLMs can be used for Lifestyle Optimization. Let’s simulate that the algorithms gave some postprocessed outputs from which the LLM(GPT-4 model) can extract multiple information about our current lifestyle and health conditions. Let’s see what improvements can we have:

❗ Potential Problems with using LLMs as Context Providers 

While the integration of LLMs with healthcare and wellness algorithms such as eating recognition or human activity recognition algorithms offers immense potential, it also raises some concerns such as: 

  • Data Privacy and Sensitivity - Even if the data is "anonymized", patterns or details might inadvertently reveal sensitive information about individuals.

  • Accuracy and Reliability - If the eating recognition or human activity recognition algorithm makes an error, the LLM might provide context based on incorrect information, leading to misinformation or misunderstanding.

  • Ethical Considerations - The combination of algorithms might lead to situations where the system's output can affect human behavior. For example, if an eating recognition system suggests someone is overeating and the LLM provides context that discourages them, it might negatively affect individuals with eating disorders.

  • Feedback Loops: If users continuously interact with the system and adapt their behaviors based on the feedback, it can create feedback loops where the system and the user influence each other in potentially harmful ways.

  • Loss of Human Touch: Using algorithms to understand and contextualize human activities can sometimes strip away the nuances and complexities of human experience.

To address these challenges, it is important to:

  • Continuously validate and update both the recognition algorithms and the LLMs.

  • Ensure transparency in how these systems work and make decisions.

  • Engage ethicists, psychologists, and other relevant experts in the design and deployment process.

  • Educate users about the capabilities and limitations of such systems.

  • Implement strong data privacy measures to protect user data.

🙌 Conclusion

The combination of outputs from other algorithms (such as eating recognition and human activity recognition algorithms) and LLMs has the power to revolutionize the healthcare and wellness landscape. These advancements provide precise advice by interpreting results from algorithms and tailoring recommendations to individual needs. However, it's essential to balance technological advancement with ethical considerations to ensure the privacy and security of personal health data (personal data in general). With the right precautions in place, LLMs can play a vital role in empowering individuals to make informed decisions for a healthier and happier life.

**

I will publish the next Edition on Sunday.

This is the 23rd Edition, If you have any feedback please don’t hesitate to share it with me, And if you love my work, do share it with your colleagues.

It takes time to research and document it - Please be a paid subscriber and support my work.

Cheers!!

Raahul

**

Reply

or to participate.