This project is a Medical Chatbot designed using Retrieval-Augmented Generation (RAG) architecture. The chatbot utilizes advanced machine learning models, including large language models (LLMs) and embeddings, to provide accurate and relevant responses based on the provided context. The chatbot processes medical documents and allows users to ask health-related questions.
HealthyHeart.pdf
Healthy Heart PDF
- Langchain: Pipeline management and framework integration.
- Llama: Large Language Model (LLM) used for natural language understanding.
- Sentence-Transformers: Embedding model to generate dense representations for each document chunk.
- Chroma: Vector store for storing and retrieving document embeddings efficiently.
BioMistral-7B
BioMistral-7B-GGUF Model
PubMedBert-Base-embeddings
PubMedBert Embeddings
- Load the Document: The chatbot loads and parses the
HealthyHeart.pdfdocument. - Chunking: The document is split into smaller, manageable chunks.
- Embedding Creation: Each chunk is transformed into dense embedding vectors using Sentence-Transformers.
- Vector Store: Chunks and their embeddings are stored in Chroma Vector Store for efficient retrieval.
- LLM Model Loading: The BioMistral-7B model is loaded to handle natural language understanding.
- Application Chain: The full application chain is built end-to-end.
- Query the Chatbot: Users can input queries to interact with the chatbot.
- Retriever: The chatbot retrieves relevant document chunks from the Vector Store using K-Nearest Neighbors (KNN) search.
- LLM Interaction: Both the query and relevant documents are passed to the LLM.
- Response Generation: The chatbot generates responses based on the query and document context.
If you like this project, feel free to ⭐ the repo.
It motivates me to build more projects!