Knowledge Base
Add documents and data to power your agent's responses
Give your AI agent access to your documents, FAQs, and knowledge to provide accurate, contextual answers.
What is a Knowledge Base?
A knowledge base is a collection of documents that your agent can search and reference when answering questions. Instead of relying solely on its training data, your agent can:
- Answer questions about your specific products
- Reference your documentation
- Quote your policies and procedures
- Provide up-to-date information
How It Works
┌─────────────────────────────────────────────────────────────┐
│ Knowledge Base Flow │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. Upload Documents │
│ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │ PDF │ │ TXT │ │ MD │ │
│ └──┬───┘ └──┬───┘ └──┬───┘ │
│ │ │ │ │
│ └────────┼────────┘ │
│ ▼ │
│ 2. Process & Chunk │
│ ┌─────────────────────────────────────┐ │
│ │ Split into searchable chunks │ │
│ │ [Chunk 1] [Chunk 2] [Chunk 3] ... │ │
│ └─────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 3. Create Embeddings │
│ ┌─────────────────────────────────────┐ │
│ │ Convert to vector representations │ │
│ │ [0.23, 0.87, ...] [0.45, 0.12, ...] │ │
│ └─────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 4. Store in Vector Database │
│ ┌─────────────────────────────────────┐ │
│ │ Indexed for fast semantic search │ │
│ └─────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Uploading Documents
Supported Formats
| Format | Extension | Best For |
|---|---|---|
| Manuals, reports, whitepapers | ||
| Text | .txt | Plain text content |
| Markdown | .md | Documentation, guides |
| Word | .docx | Business documents |
| HTML | .html | Web content |
| CSV | .csv | Structured data, FAQs |
Upload Process
- Navigate to your agent
- Click the Knowledge Base tab
- Click Upload Documents
- Select files or drag and drop
- Wait for processing to complete
Upload Limits
| Plan | Max File Size | Total Storage |
|---|---|---|
| Free | 5 MB | 50 MB |
| Pro | 25 MB | 500 MB |
| Enterprise | 100 MB | Unlimited |
Document Processing
Chunking
Documents are split into smaller chunks for efficient retrieval:
Original Document (5000 words)
│
▼
┌───────────────────────────────────────────────┐
│ Chunk 1 │ Chunk 2 │ Chunk 3 │ ... │
│ (500 char) │ (500 char) │ (500 char) │ │
└───────────────────────────────────────────────┘
Chunk Settings
| Setting | Default | Description |
|---|---|---|
| Chunk Size | 500 | Characters per chunk |
| Chunk Overlap | 50 | Overlap between chunks |
| Separator | Paragraph | How to split content |
Optimal Settings by Content Type
| Content Type | Chunk Size | Overlap | Why |
|---|---|---|---|
| FAQ | 300 | 0 | Each Q&A is self-contained |
| Documentation | 500 | 50 | Preserve context between sections |
| Legal | 800 | 100 | Complex sentences need context |
| Tutorials | 600 | 75 | Step-by-step context |
Retrieval Settings
Top K
How many chunks to retrieve per query:
| Value | Use Case |
|---|---|
| 3 | Simple questions, fast responses |
| 5 | General purpose (default) |
| 10 | Complex questions, comprehensive answers |
Similarity Threshold
Minimum relevance score (0-1):
| Value | Behavior |
|---|---|
| 0.5 | Include loosely related content |
| 0.7 | Balanced (default) |
| 0.9 | Only highly relevant content |
Organizing Your Knowledge Base
Using Collections
Group related documents:
Knowledge Base
├── Products/
│ ├── product-overview.pdf
│ ├── pricing-guide.pdf
│ └── features-list.md
├── Support/
│ ├── troubleshooting.md
│ ├── faq.csv
│ └── known-issues.txt
└── Policies/
├── refund-policy.pdf
└── terms-of-service.pdf
Metadata
Add metadata for better filtering:
json{ "document": "pricing-guide.pdf", "metadata": { "category": "sales", "product": "enterprise", "last_updated": "2025-01-15", "audience": "prospects" } }
Best Practices
Document Preparation
-
Clean formatting
- Remove headers/footers
- Fix OCR errors in scanned docs
- Use consistent formatting
-
Structure content
- Use clear headings
- Include section titles
- Add summaries where helpful
-
Keep current
- Update documents regularly
- Remove outdated content
- Version your documents
Content Guidelines
Good content:
- Clear, well-written text
- Complete sentences
- Proper context
Bad content:
- Tables without context
- Images (not searchable)
- Heavily formatted layouts
Monitoring Performance
Retrieval Analytics
Track how your knowledge base performs:
| Metric | Description |
|---|---|
| Hit Rate | % of queries that find relevant docs |
| Top Sources | Most frequently cited documents |
| Failed Queries | Queries with no good matches |
| Avg Chunks Used | Chunks retrieved per response |
Improving Results
If answers aren't accurate:
- Check coverage - Do you have docs on that topic?
- Review chunks - Is content properly chunked?
- Adjust settings - Try different chunk sizes
- Add content - Fill knowledge gaps
Syncing External Sources
Website Crawling
Import content from your website:
- Go to Knowledge Base > Add Source
- Select Website
- Enter your URL
- Configure crawl settings
- Start sync
API Integration
Connect to external knowledge sources:
json{ "source": "api", "endpoint": "https://api.example.com/docs", "auth": { "type": "bearer", "token": "your-token" }, "sync_frequency": "daily" }
Next Steps
- Tools & Functions - Enable agent actions
- Sub-Agents - Specialized agents
- Deployment - Go live