Knowledge Base
Learn how to give your agents access to external knowledge.
Knowledge Base (KB) is a powerful feature that allows your agents to access and reference external information during conversations. By uploading documents to your Knowledge Base, you can create agents that provide accurate, detailed responses based on your specific content.
Understanding Knowledge Base
Think of Knowledge Base as your agent’s reference library. When a user asks a question, your agent uses RAG (Retrieval Augmented Generation) to search through this library and provide relevant, accurate information. This is particularly valuable when you need your agent to:
- Quote specific prices or specifications
- Reference technical documentation
- Provide accurate product comparisons
- Handle domain-specific inquiries
Setting Up Your Knowledge Base
Navigate to the Knowledge Base tab in your dashboard to start creating your first KB. Here you can create new knowledge bases and manage existing ones. Simply click the + button to create a new one.
Supported Document Types
You can upload various types of documents to your Knowledge Base:
- PDF files
- Text files
- JSON documents
- CSV files
- Excel spreadsheets (XLSX)
For CSV and Excel files, maintain a simple structure: the first row should contain headers, and each subsequent row should represent one data point. Complex formats aren’t supported and may lead to unexpected results.
A Practical Example
Let’s walk through a practical example of creating a Knowledge Base for laptop specifications and prices.
Here’s a sample CSV we’ll use:
This CSV contains pricing and specifications for various laptop models. While this is a simplified example, your actual data can be much more extensive.
Implementing Knowledge Base in Your Agent
After uploading your documents, you can integrate the Knowledge Base with your agents:
- Open your agent’s Configure page
- Scroll to the “Global knowledge base” section
- Select your desired Knowledge Base
Understanding Global Knowledge Base
When you assign a Knowledge Base as global, it becomes available across all nodes in your flow. Each node has a “use global knowledge base” toggle, giving you fine-grained control over when and where your agent accesses this information.
Only enable the Knowledge Base on nodes where it’s relevant. For example, in a laptop sales agent, enable it on nodes handling product inquiries but disable it for general greetings or call conclusions.
Best Practices
Document Preparation
Prepare your documents thoughtfully before uploading them to the Knowledge Base:
- Format them clearly and consistently with proper headings and structure
- Remove unnecessary information that might create noise or confuse retrieval
- Keep data structured and easy to parse, especially for tabular data
- Upload only essential documents relevant to your agent’s purpose
- Use English language files when possible as retrieval works best with English, though other languages are supported
Agent Configuration
When setting up your agent to use a Knowledge Base:
- Create specific nodes for knowledge-based interactions
- Write clear instructions about how to use the knowledge
- Test various query types to ensure accurate information retrieval
Remember that the quality of responses depends heavily on the quality of your uploaded documents. Well-structured, clean data leads to better agent performance.
Building a Laptop Price Assistant
Let’s put everything together by creating a simple agent that helps users find laptop information. We’ll create a flow that can answer questions about laptop specifications and prices.
Creating the Node
- Create a new node in your graph
- Set the action to something like:

- Enable the “use global knowledge base” option for this node
Testing Your Agent
You can test your agent through either chat or phone calls. Try asking questions like:
- “What’s the price of the MacBook Air M2?”
- “Which laptops have 16GB RAM?”
- “Can you compare the ThinkPad and XPS?”
Your agent will use RAG to search through the laptop specifications and provide accurate, relevant responses based on the uploaded data.