How ash-blanc/zepto-support-assistant works
Zepto Support Assistant accepts a customer question through Flask, validates it, and invokes a LangGraph workflow. Intent classification routes policy questions through embedding-based ChromaDB retrieval before LLM response generation, while general questions go directly to the LLM; both return an answer to the API/UI. A separate indexing workflow chunks policy documents and writes embeddings to the same store. README-documented UI details are represented from its description; source excerpts show the backend calls and storage behavior.
Main entry points: rag.py Policy retrieval · app.py Flask API · graph.py Intent classifier · index.html Chat interface
Components 18
Customer interaction
- Chat interface
templates/index.html - Flask API
app.py - Answer response
app.py
Question routing
- LangGraph workflow
graph.py - Intent classifier
graph.py - Policy answer node
graph.py - General answer node
graph.py
Policy knowledge
- Policy documents
docs - Document indexer
load_documents.py - Text chunking
load_documents.py - Embedding model
load_documents.py - ChromaDB store
vector_store
Answer generation
- Policy retrieval
rag.py - Query embedding
rag.py - Prompt builder
rag.py - LLM client
rag.py - Kie.ai GPT
Other components
- Customer
Connections 19
- Customer → Chat interface: asks question
README.md - Chat interface → Flask API: submits question
- Flask API → LangGraph workflow: invokes
app.py - LangGraph workflow → Intent classifier: runs classification
graph.py - Intent classifier → Policy answer node: routes policy
graph.py - Intent classifier → General answer node: routes general
graph.py - Policy answer node → Policy retrieval: calls retrieval
graph.py - General answer node → LLM client: calls direct answer
rag.py - Policy documents → Document indexer: supplies text
README.md - Document indexer → Text chunking: splits documents
load_documents.py - Text chunking → Embedding model: encodes chunks
load_documents.py - Embedding model → ChromaDB store: upserts vectors
load_documents.py - Policy retrieval → Query embedding: encodes query
rag.py - Policy retrieval → ChromaDB store: queries chunks
rag.py - Policy retrieval → Prompt builder: builds context prompt
rag.py - Prompt builder → LLM client: provides prompt
rag.py - LLM client → Kie.ai GPT: requests completion
rag.py - LLM client → Answer response: returns answer
app.py - Flask API → Answer response: returns JSON
app.py