pubmed_rag / README.md
SHAH-MEER's picture
Update README.md
d19d855 verified

A newer version of the Gradio SDK is available: 5.44.0

Upgrade
metadata
title: PubMed RAG Chatbot
emoji: πŸ”¬
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
license: mit
short_description: Chatbot that answers questions using PubMed research
tags:
  - medical
  - rag
  - pubmed
  - chatbot
  - healthcare
  - research
  - langchain
  - openai

πŸ”¬ PubMed RAG Chatbot

An intelligent chatbot that provides research-backed answers to medical questions by searching through a curated database of PubMed abstracts. Built with advanced Retrieval-Augmented Generation (RAG) technology.

🎯 What This Does

This application combines the power of medical literature with AI to provide informative responses about:

  • Drug mechanisms and side effects
  • Disease symptoms and treatments
  • Latest medical research findings
  • Clinical procedures and guidelines
  • Health conditions and management

✨ Key Features

  • πŸ” Research-Grounded: All responses are based on actual PubMed abstracts
  • πŸ’¬ Conversational: Maintains context for follow-up questions
  • ⚑ Real-time: Instant responses with source attribution
  • 🎨 User-Friendly: Clean, intuitive chat interface

πŸš€ How to Use

  1. Ask a Medical Question: Type any health or medical research question
  2. Get Research-Based Answers: Receive responses grounded in medical literature
  3. Follow Up: Ask clarifying questions - the bot remembers your conversation
  4. Explore: Try the example questions to see what's possible

πŸ’‘ Example Questions

  • "What are the side effects of metformin?"
  • "How does aspirin prevent heart attacks?"
  • "What are the latest COVID-19 treatment options?"
  • "Tell me about Type 2 diabetes management"
  • "What does research say about Mediterranean diet benefits?"

πŸ”§ Technical Details

Architecture: Retrieval-Augmented Generation (RAG)

  • Vector Database: FAISS with PubMed abstracts
  • Embeddings: HuggingFace intfloat/e5-base
  • Language Model: OpenAI GPT-3.5-turbo
  • Framework: LangChain + Gradio
  • Memory: Conversation buffer for context

🎨 Interface Features

  • Dark/Light Mode: Automatic theme adaptation
  • Responsive Design: Works on desktop and mobile
  • Example Prompts: Quick-start suggestions
  • Clear Chat: Reset conversation anytime
  • Loading Indicators: Visual feedback during processing

⚠️ Important Disclaimers

  • Not Medical Advice: This tool provides information, not medical advice
  • Educational Purpose: Designed for learning and research
  • Consult Professionals: Always seek qualified medical advice for health decisions
  • Verify Information: Cross-check important information with healthcare providers

The app supports various configuration changes:

  • Switch embedding models
  • Adjust retrieval parameters
  • Modify response temperature
  • Change UI themes and styling

πŸ“Š Data Sources

This chatbot searches through a curated database of PubMed abstracts covering:

  • Clinical research papers
  • Medical case studies
  • Drug trials and reports
  • Disease research findings
  • Treatment effectiveness studies

πŸ”„ Updates & Maintenance

  • Model Updates: Regularly updated with latest research
  • Performance: Continuously optimized for speed and accuracy
  • Safety: Regular security and content safety reviews
  • Features: New capabilities added based on user feedback

🀝 Feedback & Support

Found an issue or have suggestions?

  • Use the Community tab to report bugs
  • Share feedback on response quality
  • Suggest new features or improvements
  • Report any inappropriate content

πŸ“‹ Dependencies

gradio>=4.0.0
langchain>=0.1.0
langchain-openai>=0.1.0
faiss-cpu>=1.7.0
sentence-transformers>=2.2.0
openai>=1.0.0

🏷️ Use Cases

Researchers: Quick literature reviews and fact-checking Students: Learning about medical concepts and mechanisms
Educators: Teaching aid with research-backed information Healthcare Workers: Reference tool for clinical information General Public: Health education and awareness

πŸ” Privacy & Security

  • No personal health data is stored
  • Conversations are not logged or retained
  • OpenAI API calls follow their privacy policy
  • No user identification or tracking