Spaces:
Running
Running
| 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 | |
| ```txt | |
| 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 | |
| --- |