How rajender76/rag_based_qa_app works
This is a Streamlit document-question-answering app. A user selects a source, submits its content for parsing, chunking, embedding, and in-memory FAISS indexing, then asks a question against that index. The answer path builds a LangChain retrieval-and-generation chain and returns the HuggingFace model’s response to the interface. The source excerpt shows these responsibilities in one file; the graph separates them to clarify the workflow. README-described formats and integrations are retained, but the exact internal wiring is based on app.py.
Main entry points: app.py QA Orchestrator
Components 14
User Interface
- Streamlit UI
app.py
Document Ingestion
- Input Sources
app.py - Web Pages
- Document Parsing
app.py - Text Chunking
app.py - Text Embeddings
app.py - FAISS Index
app.py
Retrieval and Answering
- QA Orchestrator
app.py - Vector Retriever
app.py - RAG Prompt
app.py - Chat Model
app.py - HuggingFace Inference
- Generated Answer
app.py
Other components
- User
Connections 16
- User → Streamlit UI: submits input
README.md - Streamlit UI → Input Sources: selects source
app.py - Input Sources → Document Parsing: processes input
app.py - Document Parsing → Web Pages: loads URL
app.py - Document Parsing → Text Chunking: splits text
app.py - Text Chunking → Text Embeddings: embeds chunks
app.py - Text Embeddings → FAISS Index: adds vectors
app.py - Streamlit UI → QA Orchestrator: submits query
app.py - QA Orchestrator → Vector Retriever: creates retriever
app.py - Vector Retriever → FAISS Index: searches vectors
app.py - QA Orchestrator → RAG Prompt: configures chain
app.py - QA Orchestrator → Chat Model: configures chain
app.py - Chat Model → HuggingFace Inference: invokes model
app.py - QA Orchestrator → Generated Answer: returns response
app.py - Generated Answer → Streamlit UI: displays answer
app.py - Web Pages → Document Parsing: provides page content
app.py