Using GenAI to Simplify Health Advice: Your Guide to Better Wellness Habits

🧠 Introduction

In today's fast-paced world, people often struggle to access reliable, easy-to-understand health and wellness information. While there’s a wealth of medical data online, it’s often too technical, fragmented, or outdated to be useful for everyday questions like “What are healthy eating habits?” or “What kind of exercise should I start with?”

As part of the 5-Day GenAI Intensive with Google, I built a Healthcare Assistant that uses Google's FLAN-T5 language model and Retrieval-Augmented Generation (RAG) to answer wellness-related questions in natural language. It’s designed to be simple, interactive, and friendly — like talking to a knowledgeable coach, not reading a medical textbook.

💡 Use Case

This project targets users who:

  • Want personalized guidance on healthy habits, food choices, and daily routines

  • Need summaries of health-related concepts without reading long articles

  • Prefer asking natural language questions instead of searching and filtering

It’s especially valuable for:

  • General users aiming for better lifestyle choices

  • Elderly or non-technical users who prefer conversational guidance

  • Those managing minor health goals like diet or fitness routines

🔧 How It Works

The assistant follows a multi-step pipeline:

1. Few-Shot Prompting with FLAN-T5

We provide a few hand-crafted QA examples to guide the model in the correct tone and structure. This helps it respond in a supportive, helpful way — not just generic text generation.

Example:

pythonCopyEditprompt = """
You are a friendly health coach. Answer the following queries simply and clearly.

Q: What is a balanced diet?
A: A balanced diet includes a mix of vegetables, fruits, protein, whole grains, and healthy fats. It helps your body function properly.

Q: What are good habits for staying active?
A: Try to move for at least 30 minutes daily. You can walk, stretch, dance, or do yoga to stay energized.

Q: {}
A:""".format(user_input)

2. RAG with External Resources

For broader, trustworthy coverage, we fetch information from health-related resources like:

  • Curated datasets of health habits (e.g., Kaggle, WHO guidelines)

  • Handpicked articles (e.g., Mayo Clinic, Healthline summaries)

We retrieve relevant chunks using semantic similarity (Sentence-BERT), then pass it as part of the context to the LLM for grounding.

3. Structured Output

The assistant can respond with structured outputs like:

  • Summary

  • Recommendation

  • Follow-up tip

This allows us to display clear, actionable results in JSON-style blocks if needed.

🎮 Try It Out

In the notebook, users can:

  • Ask questions like “What are healthy eating habits?” or “How to sleep better?”

  • Click a button to get answers generated in real-time

  • See the assistant respond conversationally and clearly

pythonCopyEditQuery: What are some good habits for better sleep?

Answer: 
To sleep better, try to keep a regular schedule, avoid screens 1 hour before bedtime, and reduce caffeine after 4 PM. Creating a calm bedtime routine can also help.

🔍 Limitations

  • The assistant doesn’t cover medical diagnosis, drugs, or emergency cases.

  • Accuracy depends on the grounding sources and prompt design.

  • Some health responses might vary by age, gender, or conditions, which we don't personalize (yet).

🚀 What’s Next?

Future extensions may include:

  • Adding personalization (age, lifestyle type)

  • Integrating voice input/output for accessibility

  • Expanding with clinical data from sources like RxNorm, PubMed

🎉 Conclusion

This capstone helped me explore GenAI capabilities hands-on — especially combining few-shot prompting, retrieval, and controlled generation to build a tool that could truly help users. Whether it’s a busy student or an elderly person looking to eat better, this assistant makes wellness guidance just a question away.

👉 Check out the Notebook

0
Subscribe to my newsletter

Read articles from Durga Bhavani Prasad Menda directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Durga Bhavani Prasad Menda
Durga Bhavani Prasad Menda