Best Practices: Knowledge Sources
Overview
Creating a knowledge source for your AI Agent is like building a library for a brilliant, but very literal, researcher. The better organized the library, the faster and more accurately the researcher can find the right information. A well-structured document is the single most important factor for ensuring your AI provides accurate, relevant, and helpful answers to your customers.
This guide will walk you through the best practices for structuring your knowledge source documents.
How the AI Reads: Understanding "Chunking"
Before diving into the rules, it's helpful to understand how the AI processes your document. The AI doesn't read your document from top to bottom like a human. Instead, it breaks the content down into smaller, manageable pieces of information called "chunks."
The primary tool the AI uses to create these chunks is your headings. Each heading and the content that follows it becomes a distinct chunk of knowledge.
Why this matters: When a customer asks a question, the AI searches its collection of chunks to find the one that best matches the query. If your chunks are messy, unfocused, or poorly defined, the AI will struggle to find the right answer. A clear structure with logical headings is the key to creating effective chunks.
Golden Rule: One Topic Per Section
The most important principle is to keep each section of your document focused on a single, specific topic. Avoid combining multiple ideas under one heading, as this confuses the AI.
Bad 👎: A single "Policies" section that includes information on returns, shipping, and privacy.
Good 👍: Separate sections for "Return Policy," "Shipping Information," and "Privacy Policy."
Best Practices for Structuring Your Document
1. Use Proper Headings (Not Just Bold Text)
Headings (like H1, H2, H3) are structural elements that tell the AI how your content is organized. Simply making text bold or larger
is a stylistic choice and does not provide the same structural information. The AI relies on formal headings to create its chunks.
Example:
Bad Structure 👎
Our Return Policy We accept returns within 30 days...
Shipping Details We ship all orders via Kerry Express...
Good Structure 👍
Returns & Shipping
How to Make a ReturnWe accept returns within 30 days of purchase. To initiate a return, please contact our support team with your order number...
Shipping Times and CostsWe ship all orders via Kerry Express. Standard shipping takes 2-3 business days and costs ฿40...
2. Write Clear, Action-Oriented Titles
Your headings should be descriptive and accurately reflect the content within that section. Use simple, direct language that a customer would use.
Start with a verb: "How to Track Your Order" is better than "Order Tracking."
Be specific: "Return Policy for Sale Items" is better than "Other Policies."
Front-load keywords: Put the most important words at the beginning.
Example:
Bad Heading 👎
Good Heading 👍
Information
About Our Company
Contact
How to Contact Customer Support
Product Specs
T-Shirt Material and Sizing Guide
What to do if it's broken
How to Request a Refund for Damaged Goods
3. Organize from General to Specific
Structure your document hierarchically. Start with broad, general topics at the top (using H1 or H2 headings) and then break them down into more specific sub-topics (using H3, H4, etc.). This helps the AI understand the relationship between different pieces of information.
Example:
Bad Structure (Flat and Unorganized) 👎
Shipping
Returns
T-Shirt Sizing
Payment Methods
Damaged Items
Good Structure (Hierarchical) 👍
Ordering Information
Payment Methods
Credit Card Payments
Bank Transfers
Shipping & Delivery
Shipping Costs and Times
How to Track Your Order
Returns & Refunds
Our Return Policy
How to Request a Refund for Damaged Items
Product Details
T-Shirt Sizing Guide
T-Shirt Material Information
4. How to Format an FAQ Section
A common mistake is to format a list of Frequently Asked Questions as plain text. While it looks readable to humans, it can confuse the AI's chunking process, causing it to mix up questions and answers.
The correct way to format an FAQ is to make each question a heading (e.g., H3) and each answer a standard paragraph below it. This creates a distinct, reliable chunk for every question.
Bad FAQ Structure 👎
Q: How long does shipping take? A: Shipping usually takes 2-3 business days.
Q: What is your return policy? A: We accept returns within 30 days of purchase.
This format can lead to the AI incorrectly matching the answer "Shipping usually takes 2-3 business days" to the question about the return policy.
Good FAQ Structure 👍
Frequently Asked Questions
How long does shipping take?Shipping usually takes 2-3 business days.
What is your return policy?We accept returns within 30 days of purchase.
5. Write Simply and Avoid Jargon
The AI is smart, but it's not a mind reader. Use clear, concise language and avoid internal company jargon, slang, or overly complex sentences. Write the way your customers speak.
Bad 👎: "Per our Q3 fulfillment mandate, all SKUs must be processed via the logistics portal prior to dispatch."
Good 👍: "To get your order, you must first confirm your items on our website. After that, we will ship it to you."
6. Don't Assume Prior Knowledge
Treat every section as if it's the only thing the AI will read. The AI retrieves individual chunks, not the entire document, so it won't have the context from the previous section.
Bad 👎: In a "Refunds" section, writing "As mentioned above, you'll need your order number." The AI might only retrieve the refund chunk and won't know what "as mentioned above" refers to.
Good 👍: In a "Refunds" section, writing "To request a refund, you will need the order number from your original purchase confirmation."
By following these guidelines, you can create a robust and reliable knowledge source that empowers your AI Agent to perform at its best.
Last updated
Was this helpful?