How kalyanm45/question-answering-system-using-rag works
This is a Streamlit document-question-answering app. A user first ingests PDFs from Artifacts, which are loaded, split, embedded, and indexed in a session-local FAISS store; the user can then submit questions, which a retrieval chain answers using retrieved context, a prompt, and Groq chat completion. The graph reflects the single sampled runtime file: its functions are responsibilities within one module, not separately verified services. The README documents the product’s RAG capabilities; implementation edges below are supported by app.py, while external provider calls are represented at the integration boundary.
Main entry points: app.py Retrieval chain · Articles.pdf PDF documents
Components 15
User interface
- Streamlit interface
app.py - Answer display
app.py
Document indexing
- PDF documents
Artifacts/Articles.pdf - PDF loader
app.py - Text splitter
app.py - Google embeddings
app.py - FAISS vector store
app.py
Question answering
- Vector retriever
app.py - Retrieval chain
app.py - Document chain
app.py - Context prompt
app.py - Groq chat model
app.py
Other components
- User
- Google Generative AI
- Groq API
Connections 16
- User → Streamlit interface: asks or ingests
README.md - Streamlit interface → PDF loader: starts ingestion
app.py - PDF documents → PDF loader: loads PDFs
app.py - PDF loader → Text splitter: splits documents
app.py - Text splitter → FAISS vector store: indexes chunks
app.py - Google embeddings → Google Generative AI: requests embeddings
- FAISS vector store → Google embeddings: embeds documents
app.py - Streamlit interface → Retrieval chain: invokes query
app.py - Retrieval chain → Vector retriever: retrieves context
app.py - Vector retriever → FAISS vector store: searches vectors
app.py - Retrieval chain → Document chain: passes context
app.py - Document chain → Context prompt: formats context
app.py - Document chain → Groq chat model: calls model
app.py - Groq chat model → Groq API: requests completion
- Retrieval chain → Answer display: returns answer
app.py - Answer display → User: displays response
app.py