How aryansingh25/medical-assistant works
Project type and purpose
• This is a full-stack Retrieval-Augmented Generation (RAG) application (“Medical Assistant”) with:
• A Streamlit-based frontend for uploading PDFs and querying them
• A FastAPI backend that handles document ingestion, vector store loading, and query handling
• Integration with external services (Google Gemini for embeddings, Pinecone for vector DB, Groq API for LLaMA inference)
File structure
• Top-level:
• client/ – Streamlit app (app.py, components/, utils/api.py, config.py)
• server/ – FastAPI app (main.py, routes/, modules/, middlewares/)
• server/uploaded_docs/ – local storage for raw PDFs
• main.py (possibly orchestration or alias to start scripts)
• Key modules in server/:
• pdf_handlers.py – PDF text extraction & chunking
• load_vectorstore.py – embedding generation & Pinecone indexing
• query_handlers.py & llm.py – retrieval of chunks + Groq API calls
• client/utils/api.py – HTTP wrappers for upload & ask endpoints
README for additional insights
• Confirms RAG pipeline steps: Upload → Extract/Chunk → Embed → Store → Retrieve → LLM → Display
• Tech stack table highlights: Streamlit | FastAPI | LangChain | Pinecone | Google Gemini | Groq API
Detailed capture of architectural elements
• Streamlit components (upload, chat UI, history download)
• Client.utils.api as the client↔server HTTP adapter
• Server/routes → server/modules handoff
• Clearly label LangChain orchestration between vector retrieval & Groq API