On this page
- What is an AI chatbot with a knowledge base?
- How does a knowledge base chatbot work?
- How do you create a knowledge base for a chatbot?
- Should you build or buy a custom knowledge base chatbot?
- How do you control who sees what in a knowledge base chatbot?
- How do you build an AI chatbot with a knowledge base, step by step?
- Why should a knowledge base chatbot say "I don't know"?
- What should you ask a knowledge base chatbot vendor?
- How Chairlift approaches an AI chatbot with a knowledge base
- Frequently asked questions
- Sources
An AI chatbot with a knowledge base is a chatbot that answers questions by first searching a defined set of documents, then writing a reply from the passages it found, instead of relying only on what the language model learned in training. Done well, every answer can be traced to a source. Done poorly, it is a general chatbot with a search box attached, and it still makes things up.
This guide is for digital, IT and product leads at associations, professional societies and technical publishers, plus the content owners who will live with the result. Most guides on this topic are written for customer-support chatbots. This one is written for organizations whose knowledge base is a library of standards, guidelines and reports that members pay for. It covers how a knowledge base chatbot works, how to prepare the content, whether to build or buy, how to control who sees what, and how to test answers before members do.
What is an AI chatbot with a knowledge base?
An AI chatbot with a knowledge base is a question-answering system that retrieves relevant passages from your own documents and uses a large language model to compose an answer grounded in those passages. The technique behind it is called retrieval-augmented generation (RAG), described in a 2020 paper by Lewis and colleagues, which combined a language model's built-in knowledge with a searchable document index so answers could draw on, and point back to, explicit sources.
The difference from a general chatbot is where the facts come from. A general chatbot answers from patterns in its training data, which may be outdated, incomplete or simply wrong for your field. A chatbot knowledge base gives the model specific, current material to work from. Microsoft's documentation describes the goal plainly: a grounded response "adheres closely to the given information, avoiding speculation or fabrication."
It is worth separating three things that often get called the same name:
FAQ bots. These match questions to a list of prepared answers. They are predictable but only cover what someone wrote in advance.
Support knowledge base chatbots. These search help-center articles to answer account, product and billing questions. Most vendors in this space focus here.
Library knowledge assistants. These answer technical questions from long documents such as standards, manuals and guidelines, and need page citations and access control by member tier.
If your content is the third kind, the support-desk playbook will leave gaps.
How does a knowledge base chatbot work?
A knowledge base chatbot works in two phases: preparing the documents once, then answering each question in real time. Understanding both phases helps you see where quality is won or lost.
Preparing the knowledge base
Documents are converted to text, split into passages (often called chunks), and indexed so they can be searched by meaning as well as by keyword. Each passage keeps metadata: the document, page, section, edition and, for member content, the tier it belongs to. Losing that metadata at this stage is the most common reason citations later point to the wrong place.
Answering a question
When someone asks, the system identifies who they are and what they can access, searches the permitted passages, ranks the best matches, and gives those passages to the language model with instructions to answer only from them and cite each claim. The answer goes back with citations, and ideally the source page opens beside it.
Retrieval quality drives answer quality. In a September 2024 write-up, Anthropic reported that adding context to each chunk before indexing reduced the top-20 retrieval failure rate by 49% when combined with keyword search, and by 67% with a reranking step added. The exact figures will differ on your content, but the lesson holds: how you prepare and search passages matters as much as the model.
How do you create a knowledge base for a chatbot?
You create a knowledge base for a chatbot by choosing the right documents, making them machine-readable without losing page structure, and labeling each one with the metadata the chatbot will need to cite and control access. This preparation is usually more work than the chatbot itself.
Start with the documents people ask about most. A focused library of heavily used titles beats a large, uneven one. You can add more later.
Keep page numbers and sections. Citations depend on them. Test that a passage from page 210 still knows it came from page 210 after conversion.
Fix scanned and image-heavy pages. Poor text extraction produces poor answers. Tables and figures need special attention in technical content.
Label editions and revisions. If two editions of a standard are both in the library, each passage must know which edition it belongs to.
Tag every document with an access tier. Public, member, corporate or add-on module. Decide this before indexing, not after launch.
Name an owner for each collection. Someone has to decide what gets added, replaced or retired, and review the questions the chatbot cannot answer.
A custom knowledge base chatbot is only as current as its content. Plan how updates flow in, and how superseded documents are retired, from the start.
Should you build or buy a custom knowledge base chatbot?
You should build a custom knowledge base chatbot when AI answering is core to your product and you have engineers to maintain it, and buy when you need a reliable assistant on your content without running the retrieval stack yourself. The table below compares three common options.
| Factor | Build in-house on a RAG framework | Support-desk chatbot platform | Library knowledge assistant |
|---|---|---|---|
| Time to first answers | Weeks for a prototype, longer for production | Fast for help-center content | Fast once tiers and content are mapped |
| Page-level citations | You build them | Usually links to articles | Built in, with the page shown |
| Access by member tier | You design and test it | Often limited to logged-in or not | Checked before retrieval, per tier |
| "Not covered" behavior | You tune and test it | Often hands off to an agent | Declines and logs the gap |
| Ongoing work | Model updates, evaluation, security | Article upkeep | Content upkeep and test set |
| Best fit when | AI is your core product and you have a team | Questions are about accounts and products | Questions are about standards, guidelines and reports |
Building is very achievable for a prototype. The hard part is everything after: evaluation by tier, citation accuracy, security reviews and keeping behavior stable across model updates. Be honest about who will own that work in year two.
How do you control who sees what in a knowledge base chatbot?
You control who sees what in a knowledge base chatbot by filtering the search to the documents a person is entitled to before any passages reach the model. Filtering the finished answer is too late, because the model has already read the restricted text and can paraphrase it.
The OWASP Top 10 for LLM Applications 2025 lists vector and embedding weaknesses as a top risk, and recommends "fine-grained access controls and permission-aware vector and embedding stores," with datasets partitioned so one group of users cannot reach another's data. In practice, for a member organization, that means:
Documents carry tier tags. Every passage inherits the tier of its document.
People carry grants. Grants come from your membership system through single sign-on, not from a separate list someone maintains by hand.
Search is scoped per request. Each query only searches passages the asker's grants open.
Locked content gets an access note. People asking about content they do not hold are told which tier holds it, rather than getting a silent non-answer.
Our how it works page shows this with three people asking the same question and getting answers from one, two and three tiers. For access that follows roles or certificates rather than membership levels, see the role-based access use case.
Check your access model on real content.
We will show answers by tier on your own documents in a 30-minute session.
How do you build an AI chatbot with a knowledge base, step by step?
You build an AI chatbot with a knowledge base by defining the questions it must handle, preparing the content and access rules, and testing behavior before anyone relies on it. Here is the sequence we recommend.
Define the questions and the audience. Collect real questions from members, search logs and staff inboxes. Note which tier each asker holds and what a good answer looks like.
Prepare and tag the content. Convert documents with page structure intact, label editions, and assign each document a tier.
Set the answer rules. Require a citation for every claim. Decide which topics get a warning and which get a refusal with a redirect, such as dosing or individual legal advice.
Build a test set by tier. Turn your real questions into test cases with the expected behavior for each tier: cited answer, access note, warning or decline.
Pilot with a small group. Read every answer in the pilot. Check citations by opening the pages. Note where the bot guessed or should have declined.
Gate releases on the test set. Run the tests before each content or model change, and hold the release if any fail.
Step 6 is what keeps a good launch good. Models and content change, and without a gate you find regressions only when a member does.
Why should a knowledge base chatbot say "I don't know"?
A knowledge base chatbot should say "I don't know" because a confident wrong answer is worse than no answer, especially in technical and regulated fields. NIST's Generative AI Profile describes confabulation as "the production of confidently stated but erroneous or false content" and notes that people act on false content partly because of how confident it sounds.
Retrieval reduces the risk but does not remove it. A preregistered Stanford study of commercial legal research tools, all using retrieval, found hallucinations between 17% and 33% of the time. Organizations are also accountable for what their bots say: in Moffatt v. Air Canada (2024 BCCRT 149), a tribunal held an airline liable for its chatbot's incorrect description of a bereavement fare policy, and rejected the argument that the chatbot was a separate entity.
A well-built chatbot declines when the permitted documents do not cover the question, explains why in plain words, and points to where the answer should live. Our honest refusals use case shows a question about a specific plant's reactor limits getting a clear decline and a pointer to the plant's own process safety information, instead of an invented number. Each decline should also be logged, because unanswered questions are the best map of what your library is missing, as the content gaps use case shows.
What should you ask a knowledge base chatbot vendor?
You should ask a knowledge base chatbot vendor to show, on your own documents, how it cites, how it handles access and how it behaves when it does not know. Polished demos on sample content tell you little. These questions get closer to how the product will behave with your members:
Can you open the cited page? Ask to click a citation and land on the exact page and passage, not the first page of a long PDF.
What happens with two accounts on different tiers? Ask both to pose the same question. The answers should differ, and the lower tier should get an access note, not a leak.
What does it say when the answer is missing? Ask something you know the library does not cover. A good system declines and explains; a weak one improvises.
Who writes the rules for sensitive topics? Your team should be able to attach warnings or refusals by topic without a vendor ticket.
How are releases tested? Ask to see the test set, how it covers each tier and what happens when a test fails.
Where does our content live, and is it used for training? Ask about hosting, model provider choice and separation from other customers.
If a vendor cannot answer these on your content within a short session, that tells you something.
How Chairlift approaches an AI chatbot with a knowledge base
Chairlift is an AI knowledge assistant for associations, standards bodies, professional societies and technical publishers: a knowledge base chatbot built for libraries of member content rather than help-center articles. Every claim carries a numbered citation to the document and page, and the page opens beside the answer with the passage highlighted, as shown on the cited answers use case. Access is checked before retrieval, so locked documents are never searched for people who do not hold them. When a person's content does not cover a question, Chairlift says so, points to the right source and logs the gap. Your team writes warning and refusal rules by topic. Releases run a test set for every tier and wait until it passes. For the member-services view, see our guide to AI for associations; for the commercial view, see AI for publishers. Examples on our site use public documents, with access tiers simulated.
Frequently asked questions
What is an AI chatbot with a knowledge base?
An AI chatbot with a knowledge base is a chatbot that searches a defined set of documents for each question and writes its answer from the passages it finds. This approach, called retrieval-augmented generation, keeps answers tied to your content and lets each claim cite its source, unlike a general chatbot that answers from training data alone.
How do I create a knowledge base for a chatbot?
Creating a knowledge base for a chatbot starts with choosing the documents people ask about most, converting them to text without losing page numbers and sections, and labeling each with its edition and access tier. Name an owner for each collection, and plan how updates and retired documents will be handled before launch.
Can a knowledge base chatbot still hallucinate?
A knowledge base chatbot can still hallucinate, although retrieval reduces how often. Research on retrieval-based legal tools found hallucination rates between 17% and 33%. Requiring a citation for every claim, declining when sources are missing and testing a fixed question set before each release are the practical ways to keep errors rare and visible.
How do you stop a chatbot from revealing member-only content?
You stop a chatbot from revealing member-only content by restricting the search to documents the asker is entitled to, before any text reaches the language model. Tag documents by tier, take grants from your membership system through single sign-on, and test with accounts on different tiers asking identical questions.
Is it better to build or buy a custom knowledge base chatbot?
Building a custom knowledge base chatbot makes sense when AI answering is your core product and you have a team to maintain retrieval, evaluation and security over time. Buying makes sense when you need dependable, cited answers on your content quickly. Either way, insist on page citations, access control by tier and a release test set.
How long does it take to build an AI chatbot with a custom knowledge base?
Building an AI chatbot with a custom knowledge base takes days for a prototype but considerably longer for production, because content preparation, access rules and testing dominate the effort. The model is rarely the bottleneck. Expect most of the time to go into cleaning documents, mapping tiers and building a test set from real questions.
Give members a knowledge base chatbot they can check.
See cited, tier-aware answers on your own documents in 30 minutes.
Sources
Lewis et al., "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks" (2020)
Microsoft Learn, "Groundedness detection in Azure AI Content Safety"
Anthropic, "Introducing Contextual Retrieval" (September 2024)
OWASP Top 10 for LLM Applications 2025: LLM08 Vector and Embedding Weaknesses
NIST AI 600-1, Generative Artificial Intelligence Profile (July 2024)
McCarthy Tétrault TechLex blog, analysis of Moffatt v. Air Canada, 2024 BCCRT 149 (February 2024)