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

FormatExtensionBest For
PDF.pdfManuals, reports, whitepapers
Text.txtPlain text content
Markdown.mdDocumentation, guides
Word.docxBusiness documents
HTML.htmlWeb content
CSV.csvStructured data, FAQs

Upload Process

  1. Navigate to your agent
  2. Click the Knowledge Base tab
  3. Click Upload Documents
  4. Select files or drag and drop
  5. Wait for processing to complete

Upload Limits

PlanMax File SizeTotal Storage
Free5 MB50 MB
Pro25 MB500 MB
Enterprise100 MBUnlimited

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

SettingDefaultDescription
Chunk Size500Characters per chunk
Chunk Overlap50Overlap between chunks
SeparatorParagraphHow to split content

Optimal Settings by Content Type

Content TypeChunk SizeOverlapWhy
FAQ3000Each Q&A is self-contained
Documentation50050Preserve context between sections
Legal800100Complex sentences need context
Tutorials60075Step-by-step context

Retrieval Settings

Top K

How many chunks to retrieve per query:

ValueUse Case
3Simple questions, fast responses
5General purpose (default)
10Complex questions, comprehensive answers

Similarity Threshold

Minimum relevance score (0-1):

ValueBehavior
0.5Include loosely related content
0.7Balanced (default)
0.9Only 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

  1. Clean formatting

    • Remove headers/footers
    • Fix OCR errors in scanned docs
    • Use consistent formatting
  2. Structure content

    • Use clear headings
    • Include section titles
    • Add summaries where helpful
  3. 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:

MetricDescription
Hit Rate% of queries that find relevant docs
Top SourcesMost frequently cited documents
Failed QueriesQueries with no good matches
Avg Chunks UsedChunks retrieved per response

Improving Results

If answers aren't accurate:

  1. Check coverage - Do you have docs on that topic?
  2. Review chunks - Is content properly chunked?
  3. Adjust settings - Try different chunk sizes
  4. Add content - Fill knowledge gaps

Syncing External Sources

Website Crawling

Import content from your website:

  1. Go to Knowledge Base > Add Source
  2. Select Website
  3. Enter your URL
  4. Configure crawl settings
  5. 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