Live demoDemo for a fictional company

RAG Chatbot with Citations

Answers only from your documents, and shows you the exact passage it used.

A website chatbot that answers from a company’s own documents, cites the exact quoted passage behind every claim, says plainly when it doesn’t know, captures leads and hands over to a human. One script tag installs it on any site.

1 line
to install on any websiteWordPress, Shopify, Wix, Webflow, Squarespace
41
documents indexedMarkdown, PDF and an imported web page
3
layers of abuse protectionbot check, rate limits, daily spend cap
126
automated testsunit + database
The problem

Businesses want a chatbot that answers customers at 2 am, but generic bots make things up, can’t prove where an answer came from, and quietly go out of date when prices or policies change.

How it works

From question to cited answer.

  1. Visitor asksWidget · 1 script tag
  2. Hybrid searchpgvector + keywords
  3. AnswerHaiku · streaming
  4. Cite & verifyexact quoted passages
  5. Lead or handoveremail + Slack
  6. Learn the gapsknowledge-gap report
Every answer is built from retrieved passages. No citation means no answer: the bot says it doesn’t know and offers a person.
What I built

The parts that make it work.

01

Verifiable citations

Claude’s native citations return the exact quoted passage behind each claim. Click a citation and a side panel opens with that passage highlighted in its source document.

02

Hybrid search

Vector search (pgvector) and keyword search fused with reciprocal rank fusion, so exact terms like postcodes, fault codes and model numbers are found as reliably as meaning.

03

Honest “I don’t know”

No relevant source, no answer. Unanswered questions are logged and grouped by topic in a knowledge-gap report, so the business knows which page to write next.

04

Leads and handover

When a visitor wants a quote, the bot collects their details with a consent line. “Talk to a person” sends the full transcript to email and Slack.

05

Learns from your site

Upload Markdown or PDF, or import a web page or sitemap. Re-indexing replaces a document atomically, so outdated content can never be retrieved.

06

An admin you can hand over

Secure login, documents, conversations with their citations, leads, low-rated answers, the knowledge-gap report and brand settings, all in one place.

Measured results

Evaluation in progress.

A 50-question tuning set and a 20-question held-out set (out-of-scope questions, multi-turn follow-ups and prompt injections included), graded for retrieval, citation accuracy, honest refusals and cost. The report will be published here with the first-run numbers.

Safety & reliability

Built to production standards.

Grounded by design

Document text and visitor messages are data, never instructions. Uncited answers are treated as “I don’t know”.

Poisoned-document test

The knowledge base contains planted instructions (a fake 50% discount, fake bank details) to prove the bot ignores them.

Spend is capped

Cloudflare Turnstile, per-IP rate limits, message and turn caps, and a daily spend cap that switches to “please call us”.

Least-privilege database

The app role can only touch its own schema, over verified TLS. Admin credentials never reach the app.

Style-proof widget

The widget runs in an iframe, so it can’t clash with or break the host site, and works on mobile and with a keyboard.

Measured cost

Every answer records its tokens, cost and timing, with prompt caching on the fixed system prompt.

Stack

AI

Claude Haiku 5.5 (streaming, native citations)Voyage AI embeddingsTool use: lead, handover, knowledge gap

Web

Next.js 16 (App Router)TypeScriptEmbeddable widgetServer-sent events

Data

Supabase Postgrespgvector + full-text searchSupabase Auth

Infrastructure

DockerCaddyUbuntu VPSCloudflare TurnstileResendSlack
For your business

Adapts to the tools you already use.

  • Your website, help centre or PDFs
  • Your brand colours and greeting
  • Your CRM for leads
  • Your helpdesk for handovers
  • Vercel or your own server
Talk about your version
Taking on new projects

Got a process that eats your team’s hours? Let’s automate it.

Tell me what it is. I’ll come back with whether AI is the right fix, what it would take, and what it would cost to run.

Replies within 24 hours · Free 30-minute discovery call

To get started, send me

  1. 1The task you’d like off your plate
  2. 2The tools it touches (inbox, CRM, website…)
  3. 3Roughly how often it happens

That’s enough for me to come back with an approach, a rough timeline and the questions that matter.