Building a Support Assistant on Your Own Docs
The architecture behind a chatbot that answers from your documentation and admits what it does not know: retrieval, guardrails, citations, and the metric that actually matters.
A chatbot that answers from your own documentation is the most requested AI feature I see, and the one with the widest gap between demo and production. The demo takes an afternoon. The production version is defined by everything the demo skips: wrong answers, missing answers, and users asking things the docs never covered.
This is the architecture that closes that gap.
Retrieval first, model second
The pipeline is standard RAG: chunk the docs, embed the chunks, and at question time fetch the most relevant ones and hand them to the model as context. The design decision that matters is the contract you give the model: answer only from the provided context, and say so explicitly when the context does not contain the answer.
That one instruction changes the failure mode from "confident wrong answer" to "honest referral", and for a support bot the second is a feature, not a failure.
Citations keep everyone honest
Return the source of each answer: link the doc pages whose chunks were used. Users trust an answer with a source far more than a bare paragraph, support staff can verify in one click, and you can debug retrieval by seeing which chunks were actually fetched. If you build only one guardrail, build this one.
Guardrails that earn their keep
- Scope check before answering: if retrieval returns nothing relevant, skip the model and respond with a handoff to human support.
- Never let the bot invent account-specific facts (prices, refund status, limits); route those intents to real data lookups or a human.
- Log every question, the retrieved chunks, and the answer. This log is your product roadmap: repeated unanswered questions are missing docs.
- Keep a visible escape hatch to a human on every single response.
Measure deflection, not vibes
The honest metric for a support assistant is deflection rate: what share of conversations ended without a human ticket, measured against ticket volume before launch. Pair it with a simple thumbs rating on answers. A bot with a 40 percent deflection rate and honest referrals is a success; a bot that answers everything and is wrong a tenth of the time is a liability.
Takeaways
- Constrain the model to the retrieved context and make "not in the docs" a valid answer.
- Citations are the cheapest trust feature you can ship.
- The question log tells you which docs to write next.
- Judge the bot by deflected tickets, not by how impressive the demo feels.
Want to talk about a project?
Get in touch