AI Chatbot Wiki

Knowledge Base

The curated set of documents a chatbot can look things up in, how it differs from the prompt, and how to keep it from going stale on you.

Updated 2026-08-18

A knowledge base is the collection of documents, pages, and FAQs your chatbot can search when it needs a fact. The agent does not memorize any of it. At question time the platform finds the most relevant passages and passes them to the model, a pattern called RAG.

Why it matters when you are buying or building

The knowledge base is where your business-specific truth lives, and it is the part of the build a client can actually own. Prompts are engineering. A knowledge base is content, and the person who knows the answers already works at the company.

Draw the line clearly:

Put it in the When it is
System prompt Behavior, tone, limits, escalation rules
Knowledge base Facts a customer might ask about, in volume
API / function call Anything live: availability, order status, balances

People get this wrong in both directions. Stuffing forty FAQ answers into the prompt makes every turn slower and more expensive because the whole thing is re-sent constantly. Putting behavior rules into the knowledge base means they only apply when retrieval happens to surface them, which is unreliable.

What I have seen in production

The most common failure is not a bad retrieval algorithm, it is a stale document nobody remembered existed. On a multi-site retail build I had an old policy page still in the index months after the policy changed. The agent kept citing it, correctly retrieving a document that was simply wrong. Nothing in the AI stack can catch that. The fix is process: one owner, a review date on every source, and a periodic diff between what is indexed and what is live on the site.

Second thing: source formatting matters more than volume. Content written as short, self-contained answers under clear headings retrieves well. Long PDFs, tables of specs, and anything where the meaning depends on a heading three screens up all chunk badly and come back missing context. If a passage would not make sense to a new employee reading it alone, it will not make sense to the model either.

Third: always define the empty-retrieval behavior. When nothing relevant comes back, the agent needs an explicit instruction to say it does not know and offer a handoff. Without that, the model fills the silence with something plausible, which is how you get a hallucination in front of a customer.

For a demo, scraping a website into a knowledge base takes minutes. For production, budget real time for pruning and rewriting. That editorial pass is where the accuracy actually comes from.