Knowledge Base Tools
Knowledge base tools enable your AI agents to search through your uploaded documents and find relevant information. When users ask questions, the AI can query your organization's specific content rather than relying solely on its general knowledge.
Search Knowledge Base
This is the primary tool for accessing your document collections. When the AI determines that information might exist in your knowledge base, it formulates a search query, retrieves relevant document snippets, and uses that information to answer the user.
When adding this tool to an agent, you must select which knowledge base to search. You can optionally give the tool a custom name that helps the AI understand when to use it—for example, "Product Documentation" or "HR Policies."
You can add multiple instances of this tool to search different knowledge bases. This lets agents access sales documentation, technical manuals, and HR policies from a single conversation, using whichever source is most relevant to each question.
Additional Knowledge Tools
Beyond search, several other tools help manage knowledge base content during conversations.
List Files shows all files in a knowledge base—useful for seeing what's available, checking processing status, or verifying recent uploads.
Read File accesses full file content when search snippets don't provide enough context. Use this for detailed document review or when complete context is needed.
Add File uploads new documents during a conversation, letting you expand knowledge dynamically as needs emerge.
Remove File cleans up outdated documents to maintain accuracy and manage knowledge base size.
Search Best Practices
For best search results, organize your content logically with related documents grouped together. Use clear filenames that help the AI understand what each file contains. Keep individual documents focused—avoid huge catch-all files that cover many topics. Update regularly by removing outdated information that might lead to incorrect answers.
The AI formulates search queries based on the user's question and conversation context. You can guide this behavior through your system prompt, for example: "When users ask about products, search the knowledge base first. Always cite which documents you found information in."
Understanding Results
Search returns ranked results with the most relevant documents first, scored by semantic similarity to the query. Results include context from surrounding text to help the AI understand the information in its proper setting.
The AI should cite its sources—which document and which section—so users can verify information. Encourage this behavior in your system prompt.
Example Use Cases
Customer support queries often need policy information:
User: What's your refund policy?
AI: [Searches knowledge base] According to our policies document, refunds are available within 30 days of purchase with receipt...
Technical support benefits from documentation access:
User: How do I configure the API authentication?
AI: [Searches technical docs] Based on our API documentation, authentication requires...
HR questions get accurate answers from official policies:
User: How many vacation days do I get?
AI: [Searches HR policies] According to the employee handbook, full-time employees receive 15 days of paid vacation per year...
Troubleshooting
If searches return nothing, verify that files have finished processing (check their status in the knowledge base), confirm the correct knowledge base is selected in the tool configuration, and consider whether the information actually exists in your uploaded documents.
If results aren't relevant, review how your documents are organized. Look for duplicate or conflicting information that might confuse the search. Consider how documents are chunked—very long documents might benefit from being split into focused sections.
For faster searches, keep knowledge bases focused on their purpose, remove files that don't add value, and split very large documents into logical sections.