> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heysonara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Base Overview

> Give your agents access to your company's documents, websites, and data.

## What is a knowledge base?

A knowledge base is a collection of documents that your agent can search during conversations. When a caller asks a question, the agent automatically retrieves relevant information from the knowledge base and uses it to provide accurate, grounded answers.

This is powered by **RAG (Retrieval-Augmented Generation)**  - a technique that combines your data with the LLM's capabilities for responses that are both intelligent and factually accurate.

## Why use a knowledge base?

Without a knowledge base, your agent can only rely on its training data and system instructions. With a knowledge base, your agent can:

* Answer questions about your specific products, services, and policies
* Reference up-to-date information that the LLM wasn't trained on
* Provide accurate pricing, specifications, and other factual data
* Quote from official documentation and FAQs

## Supported content types

| Source          | Formats                                                        | Description                      |
| --------------- | -------------------------------------------------------------- | -------------------------------- |
| **File upload** | PDF, TXT, MD, CSV, JSON, HTML, DOC, DOCX, XLS, XLSX, PPTX, RTF | Upload documents directly        |
| **Web pages**   | Any public URL                                                 | Scrape and index website content |
| **Text**        | Plain text                                                     | Paste text content directly      |

## How it works

<Steps>
  <Step title="Create a knowledge base">
    Create a named knowledge base to organize related content.
  </Step>

  <Step title="Add documents">
    Upload files, scrape web pages, or paste text content.
  </Step>

  <Step title="Processing">
    Sonara processes your documents  - splitting them into chunks, generating embeddings, and indexing them for semantic search.
  </Step>

  <Step title="Link to an agent">
    Connect the knowledge base to one or more agents.
  </Step>

  <Step title="Automatic retrieval">
    During conversations, the agent automatically searches the knowledge base for relevant context before responding.
  </Step>
</Steps>

<Info>
  You can link multiple knowledge bases to a single agent, and the same knowledge base can be shared across multiple agents.
</Info>
