What is a knowledge base? Definition for AI agents
On this page
A knowledge base is the curated set of content an AI agent is allowed to answer from, such as web pages, help articles, PDFs and FAQs, kept indexed and current.
How it works
The term predates AI: help centers have long been called knowledge bases. In AI systems it means something more specific, the searchable store behind retrieval-augmented generationRetrieval-augmented generation (RAG) is a technique where an AI system first looks up relevant documents, then writes its answer using what it found.. Amazon's documentation describes it this way: when a query is made, "a knowledge base searches your data to find relevant information to answer the query," and the retrieved information is used to improve the generated response, optionally with citations to the original source (AWS).
Building one usually means:
- Collect. Crawl the website, connect a help center, upload documents.
- Clean. Strip navigation, cookie banners and repeated footers, and drop pages that shouldn't be answered from.
- Split and index. Break content into passages by chunkingChunking is splitting long documents into smaller passages before indexing, so an AI system can retrieve just the part of a page that answers a question., convert them to embeddingsEmbeddings are lists of numbers that represent the meaning of a piece of text, so software can find related content by measuring how close two lists are. and store them for search.
- Refresh. Re-crawl on a schedule or when pages change, and remove deleted pages.
Small collections may not need retrieval at all. Anthropic notes that a knowledge base under about 200,000 tokens, roughly 500 pages, can often be placed directly in the prompt (Anthropic).
Why it matters for your website
An AI agent is only as accurate as its knowledge base. Most wrong answers trace back to content problems, not model problems:
- Outdated pages. Last year's pricing page is still live, so the agent quotes it.
- Contradictions. The FAQ and the terms of service describe refunds differently.
- Gaps. Common questions have no page that answers them.
- Noise. Job posts, event recaps and legal boilerplate outnumber product pages.
Treat the knowledge base as a product: decide what is in scope, keep one authoritative page per topic, and review the questions the agent couldn't answer, because each one points to a missing or unclear page.
Example
A quick audit before switching on a site assistant:
- List the 20 questions sales and support hear most often.
- For each, find the single page that answers it. Write one if none exists.
- Exclude archives, duplicate landing pages and expired promotions from indexing.
- Check that prices, limits and plan names match across pricing, docs and FAQ pages.
- After launch, review unanswered questions weekly and add content for the recurring ones.
Related terms
- Retrieval-augmented generation (RAG): the technique that searches the knowledge base.
- Chunking: how documents are split for indexing.
- Grounding: answering only from the knowledge base and citing it.
- Embeddings: the numeric form passages are stored in.
- Vector database: where those embeddings usually live.
Sources
- Retrieve data and generate AI responses with Amazon Bedrock Knowledge Bases — accessed October 20, 2026
- Introducing Contextual Retrieval (Anthropic, September 2024) — accessed October 20, 2026
Articles that use this term
Guides
Add an AI assistant to WordPress, Webflow, Wix and more
Where to paste an AI assistant's embed snippet in WordPress, Webflow, Wix, Squarespace and Framer, plus Google Tag Manager, CSP settings and a test checklist.
Guides
AI chatbot for B2B websites: a buyer's checklist
A practical checklist for choosing an AI chatbot for a B2B website: answer quality, leads, control, privacy, accessibility, pricing and the exit terms.
AI support
Keeping a website AI assistant accurate as content changes
Prices, policies and products change, and your AI assistant must keep up. How re-syncing works, what goes stale first and a routine that keeps answers right.