MedBot is an AI-powered chatbot designed to provide medical insights using Retrieval-Augmented Generation (RAG) with Gemini 1.5 Pro. It is built on the knowledge extracted from Harrison's Principles of Internal Medicine. The system employs Pinecone as the vector database, Flask for backend development, LangChain for processing queries, and a simple HTML & CSS frontend for user interaction.
- Uses Gemini 1.5 Pro API for generating medical insights.
- Implements Retrieval-Augmented Generation (RAG) for accurate responses.
- Stores and retrieves vector embeddings using Pinecone.
- Backend built with Flask.
- Frontend built with HTML & CSS.
- Utilizes LangChain for query processing and response generation.
Follow these steps to set up and run MedBot locally.
git clone <repository-url>
cd medbotpython -m venv venvActivate the virtual environment:
- Windows:
venv\Scripts\activate
- Mac/Linux:
source venv/bin/activate
pip install -r requirements.txtCreate a .env file in the root directory and add the following:
GEMINI_API_KEY=your_gemini_api_key
PINECONE_API_KEY=your_pinecone_api_keypython app.py- Enter medical queries in the chat interface.
- The bot retrieves relevant information from Harrison's Principles of Internal Medicine using RAG.
- It processes the query and generates a response using the Gemini 1.5 Pro API.
Feel free to fork this repository, create a new branch, and submit a pull request with improvements.
This project is open-source under the MIT License.
Developed by Kavya Soni