AI knowledge base: what it is, and how to build one on your company’s documents
Updated:
An AI knowledge base is a set of your company’s documents connected to a language model that answers questions from them. Someone asks in plain words, such as “what is our return policy for opened items?”, and gets an answer drawn from your handbook, policies or product sheets, with a link to the passage it used. The model isn’t retrained on your documents: the system finds the relevant passages for each question and gives them to the model to answer from. You can buy this as a feature of software you already use or build it around your own systems. Either way, the answers are only as good as the documents behind them.
What is an AI knowledge base?
It has three parts. The documents: help pages, policies, contracts, manuals, past tickets, whatever holds the answers. A search index that can find the passages relevant to a question, even when the question uses different words from the document. And a language model that reads those passages and writes the answer, ideally quoting or linking its sources so the reader can check it.
Who asks depends on the use. Staff ask about HR rules, IT how-tos and project history. Support agents ask about products and policies while a customer waits. Customers ask a chatbot on your website. The technology is the same; what changes is which documents each group may see.
The phrase has an older meaning too. In computer science textbooks a “knowledge-based system” is a program that reasons from rules written by experts, such as an early medical diagnosis system. That is a different thing from a knowledge base that a language model answers from, and this guide is about the second.
How does an AI knowledge base work?
Most use retrieval-augmented generation, or RAG, a term from a 2020 research paper by Patrick Lewis et al.
arXiv. Anthropic describes it as “a method that retrieves relevant information from a knowledge base and appends it to the user’s prompt”
Anthropic. In practice:
- The documents are collected and split into passages of a few paragraphs each, and each passage keeps a note of where it came from.
- The passages are indexed so they can be found by meaning as well as by keyword.
- A question comes in and the system retrieves the handful of passages most likely to answer it, filtered by what the person asking is allowed to see.
- The model answers from those passages, and is told to say so when they don’t contain the answer rather than fill the gap from general knowledge.
- The answer links its sources, so the reader can open the document and check.
Retrieval is where most of the quality is won or lost. If step 3 misses the right passage, the best model in the world can’t give the right answer. Anthropic reports that adding a line of context to each passage before indexing cut failed retrievals in its tests by 49%, and by 67% when combined with a reranking step
Anthropic.
For a small collection, you may not need retrieval at all. The same Anthropic article says that if your knowledge base is smaller than 200,000 tokens, “about 500 pages of material”, you can include the whole of it in the prompt. A short handbook and a price list often fit.
RAG vs fine-tuning: which do you need?
People often ask how to “train” an AI on company data. For a knowledge base, the answer is nearly always retrieval, not training. OpenAI’s guide to model accuracy draws the line clearly: you optimise for context when the model lacks knowledge because “it wasn’t in its training set”, is out of date, or “requires knowledge of proprietary information”, while fine-tuning addresses how consistently the model behaves
OpenAI.
| RAG (retrieval) | Fine-tuning | |
|---|---|---|
| What it changes | What the model reads before it answers | The model’s behaviour: tone, format, a narrow task |
| Good for | Facts from your documents | Answering in a fixed style or structure every time |
| When a document changes | Re-index it; the next answer uses the new version | Train again |
| Shows its source | Yes, it can link the passage it used | No |
| Who sees what | Can filter passages by the user’s permissions | Everything trained in is available to every user |
| Typical first choice for a knowledge base | Yes | Rarely |
The permissions row is the one that decides it for most companies. Once a fact is trained into a model, you can’t hide it from the users who shouldn’t see it.
AI knowledge base vs knowledge base chatbot
A knowledge base chatbot is one way to use an AI knowledge base: a chat window, usually for customers, that answers from your help pages. The knowledge base behind it can also serve your staff through search, a helpdesk sidebar that suggests answers to agents, or an assistant inside the tools they already use. The chat window is the visible part, and it is the smaller part of the work.
A chatbot that answers from documents can only explain. It can tell a customer the return policy but can’t start the return; that needs access to your order system, which makes it an agent. AI agent vs chatbot explains the difference, and AI customer service examples shows which customer requests need which.
AI knowledge management: what changes for the people who write the documents
An AI knowledge base makes old documents findable, including the ones that should have been deleted. Before, an outdated policy sat unread in a folder. Now it can be quoted to a customer. So the work of knowledge management moves from making things findable to keeping them right:
- Every source has an owner who is responsible for it being current.
- One version of each answer. Two price lists or two leave policies give the model two answers to choose from.
- Old versions are removed or marked as archived so retrieval can skip them.
- Unanswered questions are logged. The questions the AI couldn’t answer are a list of the documents you are missing.
Buy or build an AI knowledge base?
Start by checking what you already pay for. Many workplace tools now include AI search and question answering over their own content, and some can reach other sources through connectors.
| Option | Good when | Watch for |
|---|---|---|
| AI built into tools you use (Microsoft 365 Copilot, Notion AI, Confluence’s AI features) | The documents already live in that tool and the users are staff | It sees mostly that tool’s content; each user needs a licence |
| A chat assistant connected to your drives (ChatGPT, Claude and similar on a business plan) | Staff want to ask questions across a few shared sources | Which sources are connected, and who checks the answers |
| Enterprise search products (Glean and others) | Many sources, many staff, a budget for a dedicated product | Cost per user; often built for larger companies |
| Custom build | Customers will use it, it must work inside your own systems, or the sources are unusual (an ERP, scanned files, a database) | You own the upkeep: syncing sources, permissions, testing |
Product names as of 28 November 2026. Features and plans change; check the vendor’s current documentation.
Two questions settle most of the choice. First, does it respect your existing permissions? Microsoft, for example, says its Copilot “only surfaces organizational data to which individual users have at least view permissions”
Microsoft Learn, which means it also surfaces everything people were given access to by mistake. Fix the sharing settings before you switch it on. Second, is your data used for training? OpenAI states that “by default, we do not use your business data for training our models” on its business plans, and that “you control which internal sources are connected”
OpenAI. Get the same in writing from any vendor you choose.
A custom build earns its cost when customers will use it, when answers need data from your own systems as well as documents, or when an off-the-shelf tool can’t reach your sources. If the built-in option covers your case, use it.
How to build an AI knowledge base, step by step
- Collect 30 to 50 real questions from tickets, emails and colleagues, each with the right answer and where it is written. This list defines the job and becomes the test.
- Pick only the sources that answer them, and name an owner for each. Leave the rest out for now; more documents mean more wrong passages to retrieve.
- Clean those sources. Remove duplicates and outdated versions, and turn scanned PDFs and complex tables into text that can be read reliably.
- Decide who may see what, and make the system filter by the asker’s permissions, not just by what is in the index.
- Build retrieval and answers with sources, and tell the model to say “I don’t know” when the passages don’t answer the question.
- Test against your question list and count right, wrong and “don’t know” answers. Wrong is worse than “don’t know”. Fix retrieval and documents before you change the model.
- Keep it current. Sync changed documents automatically, review the log of unanswered and disputed questions, and rerun the test after changes.
Steps 1 and 6 make a good small test before committing to a full build; AI proof of concept describes how to run one that ends in a clear yes or no.
Why AI knowledge bases give wrong answers
| Cause | What you see | Fix |
|---|---|---|
| Outdated or duplicate documents | A confident answer from last year’s policy | Owners, one version per answer, archive old ones |
| Retrieval missed the right passage | A vague answer, or “I don’t know” when the document exists | Better splitting, context per passage, reranking |
| Unreadable sources | Wrong numbers from tables or scans | Convert to clean text before indexing |
| The question isn’t covered | An answer from general knowledge, not your documents | Instruct and test it to say “I don’t know”; add the missing document |
| Permissions too wide | Someone sees a salary list or a contract they shouldn’t | Filter by the asker’s access; fix sharing at the source |
Only the second row is a technical problem. The others start with the documents and how they are shared, which is why the cleanup in step 3 usually takes longer than the build.
Personal data in an AI knowledge base
Tickets, emails and HR documents contain personal data, so putting them in a knowledge base is processing under GDPR: you need a lawful basis, a data processing agreement with each provider involved, and a clear answer on where the data is stored. Leaving personal data out of the index is often simpler than protecting it inside. GDPR and AI covers what to check. This is general information, not legal advice.
What vSites does
We build AI knowledge bases as part of AI agents and AI customer service systems, connected to the documents and software you already use, with permissions and source links built in. We start with your questions and test against them before you rely on the answers. If a feature in software you already pay for would do the job, we tell you. The price is fixed in writing up front, and the developer you talk to is the one who builds it.