A bot that cites its sources.

Client

Knowledge bot · B2B SaaS

Industry

AI · RAG

Engagement

60 days

Crafts

RAG · pgvector · Drive sync

knowledge-bot · live · embedding refresh 4m ago

The brief.

The support team had the answers. They just lived in a Drive folder of fifty-plus policy documents, FAQs, terms, and onboarding guides. Customers were asking the same things, in slightly different words, every week. Generic chatbots either made things up or gave the wrong shape of answer.

The brief: a knowledge bot that reads only what the team has actually written, cites the document it's pulling from, and never invents an answer. When confidence drops below threshold, step aside. Get a human into the conversation.

§ Ingestion pipeline

From Drive to vector in under a minute.

An admin drops a PDF into the shared Drive folder. A webhook fires within seconds. By the time they've switched tabs, the bot already knows the new document.

  1. 01 · source
    Google Drive folder
    admin uploads, edits, renames
  2. 02 · trigger
    Drive webhook
    watches for create / modify / delete
  3. 03 · parse
    Document parser
    pdf · docx · md · gdoc · slides
  4. 04 · chunk
    Chunker + embedder
    ~700 token windows · overlap 80
  5. 05 · store
    Vector store
    pgvector · cosine · per-tenant

The edit loop.

The cleverest piece isn't the bot. It's the edit loop. Admins don't touch the bot. They touch their existing Google Drive folder. Edit a PDF, rename a doc, add a new policy: the webhook fires, the chunker re-embeds the changed file, the vector store updates. No CMS, no migration, no admin UI to learn.

Every chunk carries provenance: which file, which section, which version. When the bot answers, it cites that provenance back to the user. When the document changes, the cite changes with it.

§ One query, end-to-end

What happens when someone asks.

01 · question
“Hi, can I cancel my subscription before the next billing date?”
02 · embedding
vector(query)1536 dims · text-embedding-3-small
03 · top-k retrieval (k=3)
  1. 0.91billing-policy.pdf · §4 “Cancellation”
  2. 0.83subscriptions-faq.md · “When does my cancellation take effect?”
  3. 0.74terms.pdf · §11 “Termination by the user”
04 · grounded answer
“Yes. You can cancel any time before your next billing date and you won't be charged again. You'll keep access until the end of the current period.”
📄 billing-policy.pdf · §4

The bot answers fifty of our most common questions better than our most experienced person on a Monday morning.

Head of support, B2B SaaS client
§ The graceful failure

When the bot doesn't know.

Confidence below threshold isn't a bug. It's the most useful signal in the system. The bot flags itself, attaches context, and steps aside so a human can take over.

  1. 01 · query

    User asks something off-policy.

    “Can you update my company VAT number on the invoice?”

  2. 02 · check

    Top-k retrieval below threshold.

    best similarity 0.41 · threshold 0.62. No chunk confidently covers VAT field updates.

  3. 03 · acknowledge

    Bot doesn’t fake it.

    “I’m not confident on this. Let me get someone from support to help.”

  4. 04 · flag

    Ticket created, support team notified.

    thread tagged · routed to billing queue · context attached (transcript + top-k miss)

  5. 05 · human joins

    Anna picks it up. Thread continues, same conversation.

    no re-explaining, no second channel, no “please open a ticket”. The bot stepped aside.

The outcome.

About seventy percent of incoming questions never reach a human now. The bot resolves them in under three seconds with the right source attached. The other thirty percent get to support faster, with the question already classified and the transcript pre-attached. The team doesn't spend their mornings answering “how do I cancel” for the four-thousandth time.

And because the knowledge lives in Drive, the bot quietly improves every time someone in the team updates a document. The smartest part of the system is the work the team was already doing.

70%
Questions fully resolved without a human
2.8s
Median answer latency, end-to-end
<60s
Drive edit to live in the vector store
0
Hallucinations across the first 60 days