How sufian-01/customer-support-rag-agent works
This is a Streamlit customer-support RAG app. Users can ask questions against a PDF knowledge base; the backend prepares that PDF for retrieval, retrieves relevant passages and prior conversation, generates an answer, and saves the exchange. The graph reflects the backend’s explicit calls and LangGraph workflow. The app excerpt shows its backend imports but omits the interaction code, so the UI-to-backend call is shown as unverified; the README is empty.
Main entry points: customer_service_backend.py PDF processing · app.py Streamlit chat · book.pdf Knowledge PDF
Components 17
User interface
- Streamlit chat
app.py
Knowledge preparation
- Knowledge PDF
data/book.pdf - PDF processing
customer_service_backend.py - PDF loading
customer_service_backend.py - Text splitting
customer_service_backend.py - Embedding model
customer_service_backend.py - FAISS index
customer_service_backend.py - Document retriever
customer_service_backend.py
Answer and memory
- Question entry
customer_service_backend.py - LangGraph workflow
customer_service_backend.py - Context retrieval
customer_service_backend.py - Chat history
customer_service_backend.py - Answer prompt
customer_service_backend.py - Answer generation
customer_service_backend.py - Gemini model
customer_service_backend.py - Save exchange
customer_service_backend.py
Other components
- Support user
Connections 19
- Support user → Streamlit chat: asks question
- Streamlit chat → Question entry: uses backend
app.py - PDF processing → PDF loading: loads PDF
customer_service_backend.py - Knowledge PDF → PDF loading: read by
customer_service_backend.py - PDF processing → Text splitting: splits documents
customer_service_backend.py - PDF processing → Embedding model: creates embeddings
customer_service_backend.py - PDF processing → FAISS index: builds index
customer_service_backend.py - PDF processing → Document retriever: creates retriever
customer_service_backend.py - PDF processing → Gemini model: loads model
customer_service_backend.py - PDF processing → Answer prompt: creates prompt
customer_service_backend.py - Question entry → LangGraph workflow: invokes workflow
customer_service_backend.py - LangGraph workflow → Context retrieval: dispatches first
customer_service_backend.py - LangGraph workflow → Answer generation: dispatches next
customer_service_backend.py - LangGraph workflow → Save exchange: dispatches last
customer_service_backend.py - Context retrieval → Document retriever: searches index
customer_service_backend.py - Context retrieval → Chat history: loads history
customer_service_backend.py - Answer generation → Answer prompt: formats prompt
customer_service_backend.py - Answer generation → Gemini model: requests answer
customer_service_backend.py - Save exchange → Chat history: writes exchange
customer_service_backend.py