Guide: Best Practices for an AI Agent's Knowledge Base
The quality of your AI Agent's answers is directly proportional to the quality of its knowledge base. The RAG (Retrieval-Augmented Generation) system is powerful, but it relies on well-structured, clear information to be effective.
Here are the best practices for creating and managing your knowledge base documents.
1. One Topic, One Document
Don't put all your company information into a single, massive file. It's much more effective to create separate, focused documents for each topic. This helps the AI quickly find the most relevant context.
- Good:
shipping_policy.txt,return_policy.txt,product_specs_model_x.txt - Bad:
all_company_info.txt
2. Use Clear, Descriptive Headings
Structure your documents logically using headings. If you are using Markdown (.md) files, use markdown syntax (## for headings, ### for subheadings).
Example (faq.md):
## Shipping Information
### How long does shipping take?
Standard shipping takes 3-5 business days. Express shipping takes 1-2 business days.
### What are the shipping costs?
Standard shipping is $5. Orders over $50 qualify for free standard shipping.
## Return Policy
### What is your return policy?
We accept returns within 30 days of purchase for a full refund. The item must be in its original condition.
This structure helps the AI understand the hierarchy and context of the information.
3. Write in Plain Language (Q&A Format is Best)
Write the content as if you were explaining it directly to a customer. A question-and-answer format is ideal because it closely mimics how the user will interact with the agent.
- Good: "How do I reset my password? -> To reset your password, click the 'Forgot Password' link on the login page..."
- Bad: "Password resets are a user-initiated process via the authentication portal."
4. Be Explicit and Thorough
The AI can only know what you tell it. Don't assume it can infer information.
- If your store is closed on Sundays, explicitly write "We are closed on Sundays."
- If a product comes in three colors, list them: "The SuperWidget comes in Red, Green, and Blue."
5. Keep it Updated
A knowledge base is a living resource. If your return policy changes or your pricing is updated, you must update the corresponding document in your agent's knowledge base.
- Process:
- Edit the file on your local computer.
- In the AI Agent's settings, delete the old version of the file.
- Upload the new, updated version.
By following these best practices, you can build a robust and accurate knowledge base that empowers your AI Agents to provide truly helpful, instant support to your customers.

