Knowledge Bases

Knowledge Bases
Store and manage information for your agents

What are Knowledge Bases?

Knowledge bases are collections of information that your agents can search and reference during conversations. They use vector embeddings to find semantically relevant content, enabling your agents to answer questions using stored knowledge.

Types of Knowledge Bases

Agent-Specific Knowledge Bases

Knowledge bases that belong to a specific agent. They are scoped to that agent and can be accessed by flows within that agent. Perfect for agent-specific information, FAQs, or domain knowledge.

Shared Knowledge Bases

Knowledge bases that can be shared across multiple agents within your tenant. Useful for common information, company-wide documentation, or shared resources that multiple agents need to access.

Creating Knowledge Bases

From Agent Page

  1. Navigate to your agent's detail page
  2. Find the "Knowledge Bases" section
  3. Click the "Add Knowledge Base" button
  4. Enter a name and optional description
  5. The knowledge base will be associated with that agent

From Shared Knowledge Bases Page

  1. Navigate to the Knowledge Bases page
  2. Click "Add Knowledge Base" in the header
  3. Enter a name and optional description
  4. The knowledge base will be available to all your agents

Adding Documents

Knowledge bases contain documents. You can add three types of documents:

FAQ (Question/Answer Pairs)

Perfect for common questions and answers. Each FAQ entry consists of:

  • Question - The question users might ask
  • Answer - The response your agent should provide

FAQs are ingested and embedded automatically. The question is used for search, and the answer is returned when a match is found.

PDF Documents

Upload PDF files containing information your agent needs to know:

  1. Click "Add PDF" in the knowledge base detail page
  2. Select a PDF file from your computer
  3. The PDF is automatically processed, chunked, and embedded
  4. Each chunk becomes searchable in your knowledge base

PDFs are split into chunks for optimal search performance. Large documents are automatically divided into smaller, searchable segments.

URL (Web Page Content)

Add web page content by providing a URL:

  1. Click "Add URL" in the knowledge base detail page
  2. Enter the URL of the web page
  3. The page content is fetched and processed
  4. Content is chunked and embedded automatically

Useful for including documentation, blog posts, or any publicly accessible web content.

Document Ingestion Process

When you add a document, it goes through an ingestion process:

  1. Content Extraction - Text is extracted from the document (PDF, URL, or FAQ)
  2. Chunking - The content is split into smaller chunks for better search accuracy. Chunks are sized appropriately for embedding models.
  3. Embedding Generation - Each chunk is converted into a vector embedding using AI models. This enables semantic search.
  4. Storage - Chunks and their embeddings are stored in the database
  5. Cost Tracking - Ingestion costs (for embedding generation) are tracked and associated with the document

The ingestion process may take some time depending on document size. You can view progress and completion status in the knowledge base detail page.

Using Knowledge Bases in Flows

To search a knowledge base in your flow:

  1. Add a Database Node to your flow
  2. Select the knowledge base to search
  3. Specify the search query (can use variables like ${lastInput})
  4. The node returns relevant chunks that can be used in subsequent nodes

Viewing Documents and Chunks

You can view detailed information about documents:

  • Click on any document in the knowledge base to see its details
  • View all chunks created from the document
  • See ingestion costs and metadata
  • Delete documents if they're no longer needed

Best Practices

  • Use clear, descriptive names for knowledge bases
  • Organize information logically (one knowledge base per topic or domain)
  • Keep FAQs up to date as your product or service evolves
  • Monitor ingestion costs for large documents
  • Test knowledge base searches in your flows to ensure relevant results
  • Use shared knowledge bases for information needed by multiple agents