🏥 AI-Powered Medical Chatbot 🤖💬 📌 Description This AI-powered medical chatbot is designed to provide retrieval-based medical assistance by answering health-related queries using LangChain, Mistral AI, and Pinecone. The chatbot leverages retrieval-augmented generation (RAG) to fetch accurate and relevant medical information from a knowledge base, ensuring reliable responses to user queries.
🔥 Features 🔍 Retrieval-Augmented Generation (RAG): Enhances response accuracy by retrieving medical data from Pinecone. 🧠 Mistral AI Integration: Utilizes Mistral AI for generating medical insights. 📚 LangChain Pipelines: Implements LangChain for structured data retrieval and query processing. 💾 Pinecone Vector Database: Efficiently stores and fetches relevant medical information. 🌐 Flask Web Interface: Provides a user-friendly web-based interaction. 🩺 Medical Query Processing: Understands symptoms, diseases, and general health-related questions.
🏗️ Tech Stack
- Python - Core programming language
- LangChain - For building LLM-based applications
- Flask - Web framework for API and app development
- Pinecone - Vector database for embedding storage
- MistralAI - Large Language Model provider
- Hugging Face - Pre-trained AI models and tools
- HTML, CSS, JavaScript - Frontend technologies for UI/Ux
🚀 How It Works User inputs a medical query. The chatbot retrieves relevant medical documents using Pinecone. LangChain processes and structures the retrieved data. Mistral AI generates a contextual response based on the retrieved information. The chatbot presents a reliable medical response.
📌 Usage This chatbot is designed for medical education and awareness purposes only. It does not replace professional medical consultation.
🛠️ Setup & Installation 🔹 Install dependencies using Conda:
Clone the repository from GitHub:
git clone https://github.com/your-repo-url.git
cd your-repo-folderCreate a virtual environment using Conda:
conda create -n llmapp python=3.8 -y
conda activate llmappInstall the required dependencies using:
pip install -r requirements.txtCreate a .env file in the root directory and add your Pinecone and MistralAI credentials:
PINECONE_API_KEY="your_pinecone_api_key"
MISTRALAI_API_KEY="your_mistralai_api_key"
Run the following command to store embeddings in Pinecone:
python store_index.ipynbFinally, start the chatbot application:
python app.ipynbThis Medical Chatbot is an AI-powered system designed to assist users with medical queries. It uses LangChain, MistralAI, and Pinecone to retrieve and generate responses efficiently. The chatbot leverages advanced NLP models for precise and context-aware answers.