Skip to content
GlossaryKnowledge base

What is a knowledge base? Definition for AI agents

Also known asKBKnowledge source
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 generation. 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:

  1. Collect. Crawl the website, connect a help center, upload documents.
  2. Clean. Strip navigation, cookie banners and repeated footers, and drop pages that shouldn't be answered from.
  3. Split and index. Break content into passages by chunking, convert them to embeddings and store them for search.
  4. 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.

Sources

  1. Retrieve data and generate AI responses with Amazon Bedrock Knowledge Bases — accessed October 20, 2026
  2. 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.