How parmarjh/medical-rag-using-meditron-7b-llm works
Project type and purpose
• This is a Retrieval-Augmented Generation (RAG) QA Web App in the medical domain. It uses:
• Meditron-7B LLM for generation
• PubMedBERT for embedding text
• Qdrant as the vector store
• A small web frontend (templates/index.html) for user interaction
• Purpose: ingest medical documents (PDFs) into a vector database, retrieve relevant passages at query time, and feed them to the LLM to produce precise answers to medical questions.
File structure
• ingest.py: pipeline to read PDFs under Data/, extract text, compute embeddings with PubMedBERT, and push them into Qdrant.
• retriever.py: code that wraps Qdrant queries—takes an embedding of the user’s query and returns the top-k similar document chunks.
• rag.py: orchestrates the RAG flow (may also serve as the web server or API entrypoint):
• accepts user input from the frontend
• calls retriever.py to get context
• invokes Meditron-7B LLM with prompt + context
• returns the generated answer
• templates/index.html: a simple HTML page for users to submit questions and display answers
• requirements.txt: lists Python dependencies (FastAPI/Flask or similar, transformers, qdrant-client, etc.)
README for additional insights
• Confirms the stack: “Medical RAG QA App using Meditron 7B LLM, Qdrant Vector Database, and PubMedBERT Embedding Model.”