A bot that cites its sources.
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.
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.
- 01 · sourceGoogle Drive folderadmin uploads, edits, renames
- 02 · triggerDrive webhookwatches for create / modify / delete
- 03 · parseDocument parserpdf · docx · md · gdoc · slides
- 04 · chunkChunker + embedder~700 token windows · overlap 80
- 05 · storeVector storepgvector · 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.
What happens when someone asks.
- 0.91billing-policy.pdf · §4 “Cancellation”
- 0.83subscriptions-faq.md · “When does my cancellation take effect?”
- 0.74terms.pdf · §11 “Termination by the user”
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
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.
- 01 · query
User asks something off-policy.
“Can you update my company VAT number on the invoice?”
- 02 · check
Top-k retrieval below threshold.
best similarity 0.41 · threshold 0.62. No chunk confidently covers VAT field updates.
- 03 · acknowledge
Bot doesn’t fake it.
“I’m not confident on this. Let me get someone from support to help.”
- 04 · flag
Ticket created, support team notified.
thread tagged · routed to billing queue · context attached (transcript + top-k miss)
- 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.
