




I built an AI customer support agent for a food-delivery service, from scratch and without LangChain, to really understand how RAG works. Every reply shows where its answer came from.
Smart routing: each message takes the cheapest reliable path. Complaints go to a rule engine (instant, no AI cost), live questions go to a data API, small talk goes to Gemini, policy questions go to RAG (about 1.3K tokens per answer), and if the AI is down a safe fallback reply is sent.
RAG pipeline: load documents, section-aware chunking, Gemini embeddings, ChromaDB (cosine), top-4 retrieval with a relevance threshold, then a cited answer with prompt-injection protection.
Other features: JSON triage (category, priority, sentiment, abuse detection), a CSAT and sentiment insights dashboard, role-based login, CSV export, and an inspector panel that explains every reply.
Stack: Python, Flask, Google Gemini, ChromaDB, SQLite, React, Vite.
0 likes · 0 views · Nov 22, 2026
AI support agent built from scratch: routes messages to rules, live data, Gemini or RAG over policy docs, with cited answers. Python, Flask, React.