How sanoj-936/medassist works
MedAssist is a medical-reference RAG chatbot with two knowledge-to-answer paths: an offline ingestion path that builds a FAISS index from the Gale encyclopedia, and an online Streamlit path that retrieves passages, asks an LLM for a grounded response, and displays supported page citations. The sampled chatbot code shows the online retrieval, Groq invocation, evidence parsing, and rendering; the README documents the ingestion stages and index flow. The separate command-line script uses a Hugging Face endpoint. Some ingestion and deployment details are documented rather than verified in sampled runtime code.
Main entry points: chatbot.py Passage Retrieval · db_faiss FAISS Store · connect_memory_with_llm.py CLI RAG · create_memory_for_llm.py PDF Extraction
Components 16
Chat Interface
- Streamlit Chat
chatbot.py - Rendered Answer
chatbot.py
Grounded Answering
- Passage Retrieval
chatbot.py - Context Prompt
chatbot.py - Evidence Parsing
chatbot.py - Page Citations
chatbot.py - CLI RAG
connect_memory_with_llm.py
Knowledge Ingestion
- FAISS Store
vectorstore/db_faiss - Medical Encyclopedia
The_GALE_ENCYCLOPEDIA_of_MEDICINE_SECOND.pdf - PDF Extraction
create_memory_for_llm.py - Text Chunking
create_memory_for_llm.py - Index Creation
create_memory_for_llm.py
Models and Services
- Groq Inference
- Sentence Embeddings
- Hugging Face Endpoint
Other components
- User
Connections 17
- User → Streamlit Chat: asks
README.md - Streamlit Chat → Passage Retrieval: retrieves passages
chatbot.py - Passage Retrieval → FAISS Store: searches index
README.md - Passage Retrieval → Context Prompt: supplies passages
chatbot.py - Context Prompt → Groq Inference: prompts
chatbot.py - Groq Inference → Evidence Parsing: returns response
chatbot.py - Evidence Parsing → Page Citations: selects evidence
chatbot.py - Page Citations → Rendered Answer: formats citations
chatbot.py - Evidence Parsing → Rendered Answer: provides answer
chatbot.py - Rendered Answer → User: displays
README.md - Medical Encyclopedia → PDF Extraction: loads pages
README.md - PDF Extraction → Text Chunking: splits text
README.md - Text Chunking → Sentence Embeddings: embeds chunks
README.md - Sentence Embeddings → Index Creation: provides vectors
README.md - Index Creation → FAISS Store: saves index
README.md - CLI RAG → FAISS Store: loads and searches
connect_memory_with_llm.py - CLI RAG → Hugging Face Endpoint: invokes
connect_memory_with_llm.py