Table of Contents

Structuring your AI Agent Knowledge Base

Jonathan Goodfellow Updated by Jonathan Goodfellow

When creating a Knowledge Base for AI Agent, we can think about the interaction between the Agent and the Knowledge Base to be similar to using a cookbook ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿณ

The AI isnโ€™t reading the whole book at once โ€” itโ€™s flipping through recipes and pulling out the one that matches your question! The clearer and better-organized the recipes are, the easier it is for the AI to find the right answer โœ…

In this article we will have a look at an example of a Knowledge Base setup from Landbot's very own Help Centre Agent, 12 simple tips that we should take into account when creating a Knowledge Base for our AI Agents, and best practices for Knowledge Base maintenance ๐Ÿ’ช๐Ÿฝ Let's Go!

In our own Help Center Agent, we use a clean, multi-question, single-answer structure. It groups similar user phrasings under one topic for better matching. In the example below you will see that the structure includes:

  • A topic category and sub-category
  • The expected question from the user that will provoke the Agent to respond with the information in the Answer section
  • The Answer that that we want the Agent to provide
  • The URL from the Landbot Documentation that will be shared along with the answer

Let's take a look at a real snippet from our own Knowledge Base:

We recommend using this structure to produce the best, most consistent results with your Agents!

12 Simple tips

1. Write in Questionโ€“Answer style

Think about what your users will ask the agent โ“

Include multiple natural variations of the same question โ€” different wordings, phrasings, or levels of formality that users might type โ€” all pointing to the exact same answer. This dramatically improves matching, as the AI retrieves based on semantic similarity. For example:

Question: How do I reset my password?, I forgot my password, what now?, Password reset help, How can I recover my account password?, Forgot password link where?, Reset password not working Answer: Go to the login page, click 'Forgot Password', enter your email, and follow the reset link sent to your inbox.

2. Use clear titles and subtitles

Break your document into sections with clear headings ๐Ÿ”

For example:

"Resetting Passwords"
"Changing Email Address"
3. Give step-by-step instructions

List actions one by one ๐Ÿ”ข

For example:

1. Click Settings
2. Select Security
3. Click 'Reset Password'
4. Explain terms in simple language

If you use special words, define them ๐Ÿ“–

For example:

โ€œTwo-Factor Authentication: An extra code you get by text or app after your password.โ€
5. Make sure each section provides the required information independent of other sections

Repeat the needed information so every answer makes sense if itโ€™s read alone โŒ

For Example, do not use terms like "use the same steps as before":

Question: How do I update my billing address?
Answer: Follow the same steps as in the โ€œUpdate Payment Methodโ€ section above.

Instead provide detailed information in each step:

Question: How do I update my billing address?
Answer:
1. Go to Settings > Billing
2. Click Update Billing Address
3. Enter your new address and click Save
6. Avoid vague language

When you write instructions, the AI canโ€™t โ€œguessโ€ what you mean. Be clear, precise and specific ๐Ÿ‘ฉ๐Ÿฝโ€๐Ÿ’ป

For example, do not use:

Question: How do I submit my application
Answer: Do it the usual way after filling out the form

Instead use:

Question: How do I submit my application?
Answer: After filling out the form, click the blue button labeled "Submit"
7. Use lists, not tables

Tables are hard for AI to parse. Lists are easier to read and retrieve ๐Ÿ“‹

For example do not use:

Plan

Messages per Day

Free

50

Pro

Unlimited

Instead use:

Free Plan: 50 messages per day
Pro Plan:
Unlimited messages
8. Group by category

Organize questions so related topics are together. This helps both users and AI find the right info quickly. ๐Ÿ’จ

For example, do not mix categories in the same place like this:

Question: How do I reset my password?, How do I update my payment method?, How do I change my username?

Instead, keep related information together in sections :

[Security] Question: How do I update my payment method?
Answer: After filling out the form, click the blue button labeled "Submit"
9. Add examples

Concrete examples make instructions clearer and help the AI match real user queries ๐Ÿ“

Here's a case where an example is not provided:

Question: How do I reset my password?
Answer: Go to login page and click "Forgot Password"

And here's one where it is:

Question: How do I reset my password
Answer: Go to login page and click "Forgot Password"
Example: If you forgot your password, enter your email and check your inbox for a reset link
10. Keep sections short

Long answers get cut up into smaller pieces. Short, focused answers make it easier for AI to retrieve the right one ๐Ÿค๐Ÿฝ

For example, do not add information like this:

Question: How do I cancel my account?
Answer: To cancel your account, log in, click Settings, scroll down until you see Account Options, click Cancel, then confirm. If you have a Pro account, youโ€™ll need to downgrade first, then cancel. If youโ€™re on Enterprise, contact support. If you cancel, your data is deleted after 30 days. If you change your mind, you can restore within 7 daysโ€ฆ

Better to use a setup like this:

Question: How do I cancel my account?
Answer:
1. Log in and go to Settings > Account Options.
2. Click Cancel Account and confirm.
11. Use consistent formatting and avoid redundancy or contradictions

Keep language uniform across the entire Knowledge Base (e.g., always use "click" instead of mixing with "tap" or "select"). For example, do not use:

Click on the Close button or Tap the X icon in the top-right corner

Instead use:

Click the Close button or the X in the top-right corner.

Remove duplicates and resolve any conflicting info โ€” AI agents struggle with contradictions and may pick the wrong one, leading to hallucinations or inconsistent answers. Use single-topic chunks: each Q&A or section should focus on one clear idea to improve retrieval precision.

12. Add metadata or contextual labels where required

Include simple tags like [Platform: Mobile] or [Region: EU] at the start of relevant sections. For example:

Account Deletion [Platform:Mobile]

Rather than:

Deleting account on mobile

This helps the AI retrieve context-specific answers (e.g., region-specific policies). Keep chunks semantically coherent โ€” aim for self-contained pieces that don't lose meaning when isolated.

Knowledge Base Maintenance โ€“ Keep It Fresh and Accurate

A great Knowledge Base isn't "set it and forget it" โ€” it improves over time through iteration. Here's how to maintain and optimize it ๐Ÿ’ช๐Ÿฝ :

  • Monitor bot conversations โ€” When the AI Agent gives a wrong, incomplete, or "I don't know" answer, or fails to pull data from the Knowledge Base, copy the exact user question(s) that caused the issue. ๐Ÿ‘€
  • Add missed variations โ€” Paste those real user phrasings into the Questions section of the most relevant existing Topic/Answer. This teaches the system to recognize similar queries in the future. โž•
  • Review answers for ambiguity โ€” Check if the Answer text is vague, assumes knowledge, or uses unclear terms. Rewrite for precision (e.g., replace "do it normally" with exact button names/steps). Test the updated Knowledge Base by asking the bot the problematic question again. ๐Ÿ“
  • Iterate regularly โ€” Set a routine (weekly/monthly) to review logs, add new questions from frequent misses, remove outdated info, and refine wording. Over time, this feedback loop dramatically boosts accuracy and reduces hallucinations. โœ๐Ÿผ

And that's it! โœ… Follow these straightforward steps to create and maintain fantastic Knowledge Bases that power reliable answers for your users' questions! Your AI Agents will thank you with more accurate, reliable responses. ๐Ÿ’ช๐Ÿฝ

Test iteratively, monitor answers, and refine as needed ๐Ÿ”ง

Was this article helpful?

Capture, generate and use data with AI Agents

Contact