system.case
RAG FAQ System
A production retrieval system that answers routine call-center questions and routes unknowns to the right department.
~600 daily operators · ~1 day/week saved per person
My role: Designed and built end-to-end
Problem
Call center operators handling thousands of daily interactions constantly interrupted HR, finance, and QA staff for routine policy questions. Answers lived in scattered documents with no single searchable source of truth, and wait times for simple questions added up across ~600 operators.
Constraints
- —Operators need answers in seconds during live calls
- —Knowledge base spans HR, finance, QA, and operations — each with different owners
- —Questions outside the KB must reach the right department, not a dead end
- —Solution must run reliably in production without dedicated ML ops headcount
Architecture
n8n orchestrates the workflow: operator query → embedding → pgvector similarity search over a curated document index → OpenAI generation grounded in retrieved chunks. When confidence is low or no match exists, the system categorizes the question and routes it to the relevant department for human follow-up. PostgreSQL with pgvector keeps vectors co-located with operational metadata.
Key decisions
pgvector over a dedicated vector DB
pgvector on existing PostgreSQL infrastructure avoided a new operational dependency. For document-scale retrieval serving ~600 daily users, co-located vectors simplified backups, monitoring, and deployment.
n8n for orchestration
Workflow changes (new departments, routing rules, prompt tweaks) can be adjusted by the team without redeploying application code — important for a system that evolves with policy updates.
Automatic fallback routing
Rather than hallucinating on unknown questions, unmatched queries are categorized and forwarded to HR, finance, or QA. This preserves trust with operators who rely on the system during live calls.
Grounded generation only
OpenAI responses are constrained to retrieved context chunks. Operators see answers tied to source documents, reducing fabricated policy guidance.
Trade-offs
Workflow tool vs custom service
n8n trades some type-safety and testability for faster iteration on routing logic. Acceptable because the core retrieval contract is stable and changes are mostly orchestration-level.
Embedding refresh cadence
Documents are re-indexed on a schedule rather than real-time. Simpler operations; policy updates may lag by hours — mitigated with a manual re-index trigger for urgent changes.
Impact
- —~600 call center operators use the system daily
- —Eliminated routine interruptions to HR, finance, and QA staff
- —Saves roughly a full workday per operator per week on repetitive lookups
- —Unknown questions automatically categorized and routed to owning departments