Case study · 02 / AI

Support Copilot — an AI agent your customers can trust.

PythonLangChainpgvectorFastAPIOpenAI

The problem

A B2B SaaS wanted an AI support agent that could talk to customers from day one — not a demo that answers one question and melts on the second. Their knowledge base had 40k documents, conflicting versions, and no labelled notion of what "good" meant.

What we did

We built a hybrid retrieval pipeline — keyword (BM25) and vector (pgvector) — with metadata filters and re-ranking, over a knowledge base that was cleaned and versioned first. The labelled eval set came from real support tickets, not a design doc, and it ran in CI before every change.

Answers stream to the customer with citations. A guardrail layer doesn't block low-confidence answers — it routes them: answer when confident, offer a callback form when medium, page a human when low. Cost-per-output is instrumented per ticket.

Impact

Resolution time dropped an order of magnitude while hallucination stayed under 2% on the eval set — and when the guardrails fired, they fired quietly, so customers saw calm competence instead of a wall.

40k docs · versioned Hybrid retrieval BM25 + pgvector Rerank Guardrail router Answer + citations / human
Wk 1–2KB cleaned, eval set labelled from real tickets Wk 5Streaming UI with citations live Now71% auto-resolved, 1.6% hallucination on eval

Tradeoff we made: route instead of block. Medium-confidence answers offer a callback instead of silence — slightly more human load, far fewer wrong answers.

support-copilot · eval-dashboard
answer latency (stream)1.9 s median · citations attached
hallucination (eval, 2k)1.6% · under 2% bar
auto-resolved71% · +8 pts this month
routed to human29% · median handoff 40 s
knowledge base40,214 docs · versioned
<2%hallucination 40kdocs indexed
All work Next: Skybound Arena