AI support assistant · RAG with citations
Answers from your docs. With sources. No guessing.
This assistant knows the help center of Quillstack, a fictional invoicing app. Every answer links to the passage it came from; when the docs don't cover a question it says so and offers a human. Switch to “Your own document” to try it on your text.
Ask anything about invoices, payments, taxes or plans. Answers come only from the help center, with sources.
How it's built
Next.js 16 (App Router) · TypeScript · Vercel AI SDK 7 · Vercel AI Gateway · Tailwind CSS 4 · deployed on Vercel.
- 1
Question
User asks in the page or in the embedded widget.
- 2
Retrieve
BM25 ranks article sections; weak matches are dropped. Follow-ups borrow the previous question.
- 3
Ground
Top passages go into the prompt as numbered sources with strict rules: cite, don't guess.
- 4
Generate
LLM via Vercel AI Gateway streams the answer; sources travel as message metadata.
- 5
Hand off
No answer in the docs → the model calls a handoff tool and the UI opens a support form.
Simplified for the demo
For your product I would add
- ✓Connectors to where your docs live, with scheduled re-indexing
- ✓Hybrid search (embeddings + keywords) and re-ranking
- ✓An evaluation set of real questions, run on every prompt or model change
- ✓A dashboard of unanswered questions — the to-do list for your docs team
- ✓Handoff into your helpdesk with the full conversation attached
- ✓Answers in the user's language from English docs