Guides

How do you write a knowledge base for a chatbot?

A vendor-neutral method for writing help content an AI chatbot can answer from: one question per article, the answer first, limits and dates in writing, and test questions before launch.

By the chatbots.reviews teamPublished September 18, 2026Updated September 18, 2026Prices verified September 18, 2026

An AI chatbot answers from the content you give it, so the quality of its answers is capped by the quality of that content. Write one question per article, put the answer in the first sentence, spell out the limits and exceptions, date anything that changes, and list what the bot must not answer. Then test it with real customer questions before it goes live.

The short version

  • One question per article, with the answer in the first sentence.
  • Write down every limit, exception and condition. The bot cannot guess what you left out.
  • Date prices, policies and deadlines, and give each article an owner.
  • Keep a written list of topics the bot must hand to a person.
  • Collect real customer questions and use them as a test set before launch and after every change.

Why the knowledge base matters more than the bot

An AI chatbot that answers from your content (vendors call this a knowledge base, and the technique retrieval) searches your articles for passages that match the question and writes a reply from them. If the right passage does not exist, the bot either says it does not know or, worse, stitches an answer together from passages that are close but wrong. Rule-based bots have the same problem in a different shape: every answer is a message someone typed into a flow. Our guide to rule-based vs AI chatbots explains the difference.

1. One question per article

Write each article around a single question a customer actually asks, and use that question, or something close to it, as the title: "Can I return a sale item?" rather than "Returns policy overview". Long pages that cover ten topics are hard for a bot to search, because the passage it retrieves may belong to the wrong topic. If a page covers returns, exchanges and refunds, split it into three.

2. Put the answer in the first sentence

Start with the answer, then the detail. "Yes, you can return a sale item within 14 days if it is unworn." beats three paragraphs of context before the rule. Bots often quote or paraphrase the opening lines, and customers skim. Define any internal term the first time you use it, because the customer does not know what your "Tier 2 plan" or "RMA" is.

3. Write the limits and exceptions down

The costliest bot answers are confident yeses to questions whose honest answer is "yes, except". State who a rule applies to, where, from when and under what conditions: countries you do not ship to, products excluded from a promotion, plans without a feature, cases that need a manager's approval. If an exception exists only in your agents' heads, the bot will not know it. When a policy has a deadline, say what happens after it.

4. Date everything that changes

Put an "as of" date on prices, delivery times, opening hours and policies, and give every article an owner who is told when the underlying rule changes. Delete old versions rather than leaving them next to the new one. Two pages that disagree give the bot two answers to choose from, and it may pick the wrong one.

5. Decide what the bot must not answer

Keep a short, written list of topics the bot should hand to a person instead of answering: complaints, legal threats, refunds above a set amount, account security, medical, legal or financial advice, and anything that commits you to money. Most AI agent products let you add plain-language instructions or handoff rules for this; put the same list in your internal docs so everyone knows it exists. Our guide on when not to use a chatbot covers these cases, and chatbots and the law explains why a wrong answer can bind you.

6. Build a test set before launch

Pull real questions from your inbox, email and phone notes, not ones you invent. Include the awkward ones: misspellings, two questions in one message, questions the bot should refuse, and questions about exceptions. Write the correct answer next to each. Run the set before launch and after every content change, and mark each reply as correct, partly correct, wrong or correctly handed off. Most AI agent products include a preview or test mode for this. We have designed the reference-bot test along the same lines; it has not been run yet.

7. Maintain it like a product

Read a sample of real transcripts every week. When the bot fails, decide whether the fix is a new article, a clearer sentence, a new handoff rule or nothing. Track the questions that get handed to people: they are your list of missing articles. Re-run the test set whenever a price, policy or product changes. Our guide to containment rate explains which numbers to watch.

What each product accepts as knowledge

The formats a bot can read limit how you publish your content. This table lists what each product's documentation says, as recorded in our product database. It is not a quality ranking; see each review for the full picture.

ProductKnowledge sources in the documentation
Intercom FinHelp-center articles, PDFs, public URLs, snippets and past conversations.
BotpressWebsites with scheduled re-crawls, documents of up to 50 MB each, and tables.
Tidio LyroUp to 500 URLs overall, plus CSV files of up to 500 entries each and 10,000 in total.
LandbotPasted text, uploaded files (PDF, DOCX, TXT, MD, RTF) and scraped URLs with scheduled refresh, up to 200,000 characters per source type.
VoiceflowPDF, TXT and DOCX files of up to 10 MB, text content only; the docs say re-syncing content uses credits.
HubSpot Chatbot BuilderThe Breeze Customer Agent answers from your content sources; knowledge base lookup in rule-based chatflows needs Service Hub Professional or Enterprise.
ManychatPasted text and single public URLs, one page per link; file upload is listed as coming soon.
ChatfuelA structured knowledge base: company details, catalog, orders and bookings, FAQ and uploaded files.
TypebotNo built-in knowledge base; the documented route is an OpenAI or Dify block you configure.
Source: vendor documentation as recorded in our product database. Not tested.

To match a product to your channels and budget, use the chatbot finder.

Frequently asked questions

How long should a chatbot knowledge base article be?

A chatbot knowledge base article should be as long as it takes to answer one question fully, including its limits and exceptions, and no longer. Put the answer in the first sentence and the detail after it. If an article covers several questions, split it, because a bot searching your content may pull a passage about the wrong topic.

Can I just point an AI chatbot at my website?

Many AI chatbot builders can crawl public URLs, but a marketing website is usually a poor knowledge base. It is written to sell, not to answer, and it rarely states limits, exceptions or dates. Write dedicated help articles for the questions customers actually ask and let the bot read those.

How do I test a chatbot knowledge base?

Test a chatbot knowledge base with a set of real customer questions taken from your inbox, each with the correct answer written next to it. Include misspellings, multi-part questions and questions the bot should refuse. Run the set before launch and after every content change, and mark each reply as correct, partly correct, wrong or correctly handed off.

How often should a bot's knowledge base be updated?

A bot's knowledge base should be updated whenever a price, policy or product changes, and reviewed against real transcripts every week. Give each article an owner and an "as of" date so outdated content is easy to spot. Delete old versions rather than keeping them next to new ones.

Keep reading

Researched and drafted with AI assistance from the sources listed on this page. We have not built or tested bots on these platforms yet. Method: How we review