Skip to content

Medical chatbot using BioMistral-7B with RAG and LangChain, trained on HealthyHeart.pdf for accurate health Q&A.

Notifications You must be signed in to change notification settings

PRIYAtechky/Smart-Medical-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Build BioMistral Medical RAG Chatbot using BioMistral Open Source LLM

🩺 Medical Chatbot using RAG (Retrieval-Augmented Generation)

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.


📄 Data Source:

HealthyHeart.pdf
Healthy Heart PDF


Frameworks and Technologies Used:

  • 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.

LLM Model:

BioMistral-7B
BioMistral-7B-GGUF Model


Embeddings Model:

PubMedBert-Base-embeddings
PubMedBert Embeddings


Process Overview:

  1. Load the Document: The chatbot loads and parses the HealthyHeart.pdf document.
  2. Chunking: The document is split into smaller, manageable chunks.
  3. Embedding Creation: Each chunk is transformed into dense embedding vectors using Sentence-Transformers.
  4. Vector Store: Chunks and their embeddings are stored in Chroma Vector Store for efficient retrieval.
  5. LLM Model Loading: The BioMistral-7B model is loaded to handle natural language understanding.
  6. Application Chain: The full application chain is built end-to-end.
  7. Query the Chatbot: Users can input queries to interact with the chatbot.
  8. Retriever: The chatbot retrieves relevant document chunks from the Vector Store using K-Nearest Neighbors (KNN) search.
  9. LLM Interaction: Both the query and relevant documents are passed to the LLM.
  10. Response Generation: The chatbot generates responses based on the query and document context.

📚 Resources:

⭐ Give a Star!

If you like this project, feel free to ⭐ the repo.
It motivates me to build more projects!

About

Medical chatbot using BioMistral-7B with RAG and LangChain, trained on HealthyHeart.pdf for accurate health Q&A.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages