How anmol-mittal30/medically-ai-medical-assistant works
Medically AI is an educational medical-document QA app. Authorized PDFs are extracted, chunked, embedded, and indexed offline; a user question is embedded and matched against that index, then retrieved context is sent to Gemini and the answer and source passages are shown in the Streamlit session. The graph preserves the documented ingestion and online paths, including page metadata and configurable retrieval. Source excerpts show ingestion and generation details; some retrieval/UI wiring is documented only in the README, so those edges cite it.
Main entry points: medibot.py Streamlit workspace · create_memory_for_llm.py PDF ingestion · config.py App settings
Components 15
Offline indexing
- PDF ingestion
create_memory_for_llm.py - Page extraction
create_memory_for_llm.py - Text chunking
create_memory_for_llm.py - MiniLM embeddings
create_memory_for_llm.py - FAISS index
create_memory_for_llm.py
Question answering
- Streamlit workspace
medibot.py - Query embedding
medibot.py - Top-K retrieval
medibot.py - Context and prompt
medibot.py - Answer generation
medibot.py - Source excerpts
medibot.py
Configuration
- App settings
config.py
Other components
- Medical PDFs
- User
- Gemini API
Connections 20
- Medical PDFs → PDF ingestion: provides PDFs
README.md - PDF ingestion → Page extraction: loads pages
create_memory_for_llm.py - PDF ingestion → Text chunking: splits pages
create_memory_for_llm.py - PDF ingestion → MiniLM embeddings: embeds chunks
create_memory_for_llm.py - PDF ingestion → FAISS index: saves index
create_memory_for_llm.py - User → Streamlit workspace: asks question
README.md - Streamlit workspace → Query embedding: encodes question
README.md - Query embedding → FAISS index: searches vectors
README.md - FAISS index → Top-K retrieval: returns matches
README.md - Streamlit workspace → Top-K retrieval: requests Top-K
README.md - Top-K retrieval → Context and prompt: supplies context
README.md - Streamlit workspace → Context and prompt: supplies question
README.md - Context and prompt → Answer generation: generates response
medibot.py - Answer generation → Gemini API: sends prompt
medibot.py - Gemini API → Answer generation: returns response
README.md - Answer generation → Streamlit workspace: returns answer
README.md - Top-K retrieval → Source excerpts: provides passages
README.md - Source excerpts → Streamlit workspace: displays sources
README.md - PDF ingestion → App settings: reads settings
create_memory_for_llm.py - Streamlit workspace → App settings: reads settings
medibot.py