How jrmlmaurya/pdf-chat-assistant works
Project Type and Purpose
• This is a lightweight, document-based Q&A web application built with Python and Streamlit.
• Users upload a PDF, which is split, embedded, and indexed; queries are answered via a LangChain RetrievalQA pipeline powered by the Groq LLM service.
File Structure Analysis
• Top-level files:
• app.py – Streamlit UI and orchestration
• requirements.txt, .gitignore, LICENSE
• Backend folder: langchain_backend/
• document_loader.py – PDF ingestion and FAISS vector store creation
• qa_chain.py – construction of the RetrievalQA pipeline using Groq LLaMA3
Architectural Insights from README
• Frontend: Streamlit app for upload, preview, and query input
• Document Processing: PyPDFLoader → chunking via RecursiveCharacterTextSplitter → embeddings via HuggingFace model (all-MiniLM-L6-v2) → FAISS index
• QA Chain: LangChain RetrievalQA that calls the Groq API (LLaMA3-8B-8192)
• No persistent DB: each upload is ephemeral and regenerated on every run