Skip to main content
Knowledge Retrieval enables Retrieval-Augmented Generation (RAG) over your documents. Search using semantic understanding, not just keywords.

Key Features

  • Vector Embeddings - Semantic search over document content
  • RAG Integration - Automatically augment prompts with relevant context
  • Multiple Sources - Upload documents, web pages, structured data
  • Reranking - LLM-based result ranking for quality
  • Citation Tracking - Know which documents contributed to answers

How to Enable

For Agents

  1. Agents > Select Agent > Settings > Capabilities
  2. Attach Knowledge Retrieval
  3. Link to a Knowledge Base you’ve created

For MCP Gateways

  1. Gateways > Select Gateway > Capabilities
  2. Attach Knowledge Retrieval
  3. Link to a Knowledge Base

Creating a Knowledge Base

1

Create Knowledge Base

  1. Go to Knowledge > Create Knowledge Base
  2. Enter name and description
  3. Click Create
2

Upload Documents

  1. Open your knowledge base
  2. Click Upload Documents
  3. Choose files (PDF, DOCX, TXT, MD, JSON)
  4. Documents are processed automatically
3

Configure Search

  1. Click Settings
  2. Choose embedding model
  3. Set reranking preferences
  4. Save configuration
4

Test Search

  1. Click Test Search
  2. Try semantic queries
  3. Verify results quality

How It Works

  1. Document Upload - Documents processed into chunks with metadata
  2. Embeddings - Each chunk converted to vector representation
  3. Storage - Vectors stored in the vector database
  4. Query - User query converted to vector
  5. Search - Top matching documents retrieved via cosine similarity
  6. Reranking (optional) - LLM reranks results for relevance
  7. Augmentation - Top results injected into agent prompt

Usage Examples

Agent prompt:
"What are the main features of our product?"
Knowledge base automatically searched and top results injected into context.

Complex Question

"How do I troubleshoot authentication errors in the API?"
Semantic search finds relevant troubleshooting guides, not keyword matches.

Document Analysis

"Summarize key findings from our Q4 financial report"
Knowledge base finds Q4 report, summary extracted and provided.

Configuration

Search Settings

{
  "knowledge_retrieval": {
    "embedding_model": "text-embedding-3-small",
    "top_k": 5,
    "similarity_threshold": 0.7,
    "enable_reranking": true
  }
}
SettingDefaultEffect
embedding_modeltext-embedding-3-smallModel for embeddings
top_k5Number of results
similarity_threshold0.7Minimum relevance score
enable_rerankingtrueLLM reranking of results

Document Types Supported

FormatSupportBest For
PDFDocuments, reports
DOCXWord documents
TXTText files
MarkdownDocumentation
JSONStructured data
XLSXSpreadsheets
HTMLWeb pages

Embedding Models

Choose the embedding model based on your needs:
ModelDimensionsBest For
text-embedding-3-small1536General use
text-embedding-3-large3072Nuanced search
customVariableDomain-specific

Search Examples

Keyword vs Semantic

Keyword search:
"password reset"
→ Finds documents containing exact words
Semantic search:
"How do I change my login credentials?"
→ Finds documents about password changes, auth, account settings

Multi-document

If knowledge base has multiple documents, search returns top matches across all:
{
  "results": [
    {
      "document": "User Guide.pdf",
      "chunk": "Page 42",
      "content": "...",
      "score": 0.95
    },
    {
      "document": "FAQ.md",
      "chunk": "Section 3",
      "content": "...",
      "score": 0.87
    }
  ]
}

Reranking

Optional LLM-based reranking improves result quality:
  • Retrieves top 20 results
  • LLM evaluates each for relevance
  • Reorders by actual relevance
  • More accurate but slower
Enable in gateway specifications:
{
  "knowledge_retrieval": {
    "enable_reranking": true
  }
}

Cost

For current pricing details, see Pricing. Monitor in Account > Usage dashboard.

Rate Limits

  • 1000 searches per hour per knowledge base
  • 500 document uploads per day per account
  • 1M total embeddings per account

Best Practices

Document Preparation

  • Clean PDFs work better than scanned images
  • Use clear document structure
  • Include metadata and dates
  • Break large documents into sections

Search Queries

  • Be specific and descriptive
  • Use natural language
  • Ask complete questions
  • Avoid single-word searches

Knowledge Base Organization

  • Group related documents
  • Use consistent naming
  • Update documents regularly
  • Remove outdated content

Common Use Cases

Product Documentation

Upload product manual, FAQ, API docs for instant search.
"How do I reset my password?"
→ Returns relevant FAQ section

Internal Knowledge

Store company policies, procedures, guidelines.
"What's our refund policy?"
→ Returns policy document

Research

Upload research papers, articles for analysis.
"What are recent findings on AI safety?"
→ Returns relevant paper sections

Troubleshooting

Poor Search Results

  • Verify documents uploaded correctly
  • Try more specific queries
  • Enable reranking for better results
  • Check similarity threshold
  • Reduce top_k value
  • Disable reranking for speed
  • Use smaller embedding model

Upload Failed

  • Check file format is supported
  • Verify file is valid (not corrupted)
  • Try smaller file size
  • Check account storage limit

Next Steps