Knowledge Base Tool
The Knowledge Base tool allows Agents to query your connected data sources and answer questions based on actual content.
When to Use
- Agent needs to answer questions based on your documents and data
- You want answers to have clear sources, not AI-generated content
- Need to reference specific product specifications, policies, procedures, etc.
Prerequisites
Before using this tool, you need to connect data sources in your workspace first.
Cannot Add When No Knowledge Base Available
- If there are no established knowledge bases in the workspace, the "Knowledge Base" option in the tool selector will appear grayed out with a note "All knowledge bases selected", and you cannot add a Knowledge Base tool at this time.
- Please create at least one knowledge base first.
Workspace Limitation
- Knowledge Base tools can only use data sources within the same workspace.
Setup Steps
Step 1: Add Knowledge Base Tool
In the Tools section, click "Add Tool" to open the tool selector.
Step 2: Select Data Source
In the "Knowledge Base" group of the tool selector, directly select the data source you want to use (e.g., Notion, Google Drive). The system will automatically filter out already selected data sources to avoid duplicate selection.
Step 3: Configure "When to Use"
Tell the Agent when to use this knowledge base.
Examples:
When users ask about product features, specifications, or prices, query this knowledge base.
Prioritize using knowledge base content for answers. If no relevant information is found, inform the user and suggest contacting customer service.
When users ask about company policies, leave regulations, or benefits, query this knowledge base.
When citing, mention the source document name.
Step 4: Confirm Addition
Click confirm, and the tool will appear in the Tools list.
Testing the Tool
After adding, test in the right panel:
- Enter a question that should trigger knowledge base query
- Observe whether the Agent used the tool
- Check if the answer cites correct content
Tool List Display
Added Knowledge Base tools are displayed in the "Knowledge Base" group under the "Tools" section, each tool showing:
- Data source icon and name (e.g., Notion, Google Drive)
- Can be expanded to view or edit "When to Use"
- Can be removed by clicking the delete button
Multiple knowledge base tools are displayed in the order they were added, making them easy to identify and manage.
Multiple Knowledge Bases
You can add multiple Knowledge Base tools, each connecting to a different data source. Each knowledge base tool will be displayed independently in the tool list and can have different "When to Use" configurations.
Selected Knowledge Bases Won't Appear Again
- After you've added a data source (e.g., "Notion") as a knowledge base tool, that data source will no longer appear in the tool selector to avoid duplicate selection.
- Only data sources that haven't been selected yet will be displayed in the selection list.
Use Cases:
- Product knowledge base + Customer service FAQ knowledge base
- Technical documents + Business documents
- Content in different language versions
Each knowledge base can have independent "When to Use" instructions, letting the Agent know which source to query in what situation.
Best Practices
Be Specific in When to Use
❌ Not specific enough:
Use this tool to look up data
✅ Specific and clear:
When users ask about order processing procedures, return policies, or shipping cost calculations, query this customer service knowledge base.
Quote relevant document passages when answering.
Use in Conjunction with Agent's "Core Instruction"
Also mention the knowledge base in the Agent's "Core Instruction":
## Answer Rules
- For product-related questions, prioritize querying the product knowledge base
- Cite information sources when answering
- If the knowledge base doesn't have relevant content, honestly inform the user
Common Questions
During testing, the Agent doesn't use the knowledge base as expected. What should I do?
Check:
- Is "When to Use" clearly describing trigger conditions
- Does "Core Instruction" mention using the knowledge base
- Does the test question meet the trigger conditions
Try more explicit phrasing, such as "According to the product documentation, how do I use XX feature?"
What if answers don't cite sources?
Add to "When to Use" or "Core Instruction":
"Mention the source document name when answering" or "Annotate sources when citing knowledge base content"
Do I need to reconfigure after knowledge base content updates?
After data source content updates, it's recommended to check the "Knowledge Base" to confirm files reflect the latest status correctly; although you don't need to reconfigure the tool in the Agent, it's recommended to test the Agent again to ensure behavior matches the latest knowledge base status as expected.
What happens if the data source is deleted?
If a data source in the workspace is deleted, the system will automatically remove the corresponding Knowledge Base tool from the Agent's tool configuration and display a notification message.
It's recommended to regularly check the Agent's tool configuration to ensure all knowledge base tools are functioning properly. If you find a tool has been automatically removed, reconnect the data source and then add the tool again.
Why can't I select a certain data source?
Possible reasons:
- The data source doesn't belong to the workspace where the current Agent is located
- The data source has already been selected
- The data source has been deleted from the workspace
Please check the data source status or contact an administrator to confirm workspace permissions.
Next Steps
- Web Search - Supplement with real-time information
- Call Agent - Have other Agents assist
- Back to Tools Overview