https://github.com/yyigitturan/medical-chatbot
RAG-powered medical chatbot providing evidence-based insights on disease causes and treatments.
https://github.com/yyigitturan/medical-chatbot
flask langchain pinecone python
Last synced: 2 months ago
JSON representation
RAG-powered medical chatbot providing evidence-based insights on disease causes and treatments.
- Host: GitHub
- URL: https://github.com/yyigitturan/medical-chatbot
- Owner: yyigitturan
- License: mit
- Created: 2025-09-28T08:22:32.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-29T17:23:49.000Z (9 months ago)
- Last Synced: 2025-09-29T19:06:25.537Z (9 months ago)
- Topics: flask, langchain, pinecone, python
- Language: Jupyter Notebook
- Homepage: https://medical-ai-two.vercel.app
- Size: 12.8 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Medical-Chatbot
[](https://python.org)
[](https://flask.palletsprojects.com/)
[](https://docker.com)
[](https://langchain.com)
[](https://gemini.google.com)
[](https://pinecone.io)
[](https://huggingface.co)
[](https://www.sbert.net)
[](https://github.com/yyigitturan/Medical-Chatbot)
# 🎯 Overview
This project implements Retrieval-Augmented Generation (RAG) system specifically designed for medical knowledge queries. By combining Pinecone's vector database with Google's Gemini LLM, it provides accurate, contextually relevant medical information grounded in verified literature.
# ✨ Project Features
- RAG Implementation
- Semantic Chunking: Intelligent document segmentation preserving medical context
- Multi-vector Retrieval: Top-K similarity search with relevance scoring
- Context-Aware Generation: Prompt engineering optimized for medical accuracy
- Production-Ready Architecture
- Containerized Deployment: Docker support with multi-stage builds
- Environment Management: Secure API key handling and configuration
# 📊 Project Workflow

# 🖥️ Application Interface

# 🚀 Tech Stack
| Category | Technologies |
|----------|--------------|
| **🤖 AI Framework & Models** | `LangChain` `Gemini LLM` `Sentence Transformers` |
| **🗄️ Vector Database** | `Pinecone` `HuggingFace` |
| **🌐 Backend** | `Flask` `Flask-CORS` |
| **🎨 Frontend** | `HTML5` `CSS3` `JavaScript` |
| **📄 Document Processing** | `PyPDF` |
| **🔧 Development & Deployment** | `Docker` `Python-Dotenv` `Python 3.10+` |
# 🛠️ Installation & Setup
### Prerequisites
- Pinecone API account
- Google Gemini API key
## Steps:
Clone the repository
```bash
git clone https://github.com/yyigitturan/Medical-Chatbot.git
```
### Step 01- Create a environment after opening the repository
```bash
python -m venv medicalbot
source medicalbot/bin/activate
```
### Step 02- Install Dependencies
```bash
pip install -r requirements.txt
```
### Step 03- Environment Configuration
Create a .env file with your API keys:
```bash
PINECONE_API_KEY=your_pinecone_api_key
GEMINI_API_KEY=your_gemini_api_key
```
### Step 04- Initialize Vector Database
```bash
python store_index.py
```
### Step 05- Run the Application
```bash
python app.py
```
## Docker Deployment
Build the Image
```bash
docker build -t medical-chatbot .
```
Run the Container
```bash
docker run -p 5000:5000 --env-file .env medical-chatbot
```
# 💡 Usage
Start the application
Access the web interface at http://localhost:5000
Enter medical questions like:
"How can acne be prevented?"