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

# Knowledge base

> Upload documents or crawl websites to give your agent domain expertise.

## How it works

The knowledge base uses **Retrieval-Augmented Generation (RAG)** to give your agent access to your business information during calls. When a caller asks a question, the agent automatically searches the knowledge base for relevant content and uses it to formulate an accurate answer.

```mermaid theme={null}
graph LR
    A[Upload / crawl] --> B[Process & chunk]
    B --> C[Generate embeddings]
    C --> D[Store in vector database]
    E[Caller asks question] --> F[Search similar chunks]
    F --> D
    F --> G[Agent uses context to answer]
```

## Adding knowledge

> [tab] Upload a file
>
> 1. Go to your agent's settings and open the **Knowledge** tab.
>
> 2. Click **Upload file**.
>
> 3. Select a document (PDF, TXT, DOCX, or similar text formats).
>
> 4. The file is automatically processed: text is extracted, split into chunks, and indexed.
>
> > [!TIP]
> >
> > For best results, use well-structured documents with clear headings and paragraphs.

> [tab] Crawl a website
>
> 1. Go to your agent's settings and open the **Knowledge** tab.
>
> 2. Click **Add URL**.
>
> 3. Enter the website URL you want to crawl.
>
> 4. The system crawls up to 40 pages (depth 3), filters irrelevant pages, extracts clean content, and chunks it automatically.
>
> > [!NOTE]
> >
> > The crawler uses AI to filter out boilerplate content like navigation menus, cookie banners, and footers. Only meaningful content is indexed.

## Managing documents

Each uploaded file or crawled URL appears as a document in your knowledge base list. You can:

* **View chunks** — inspect the individual text chunks created from a document
* **Edit chunks** — modify chunk content directly if the automatic processing missed something
* **Delete documents** — remove a document and all its chunks

## How chunking works

Documents are split into overlapping text chunks to ensure the agent can find relevant context even when information spans multiple sections:

* **Chunk size** — optimized for retrieval accuracy
* **Overlap** — 200 characters of overlap between adjacent chunks prevents context loss at boundaries
* **Minimum length** — chunks shorter than 100 characters are filtered out

> [!WARNING]
>
> Very short documents (less than a paragraph) may not chunk effectively. Combine related short pieces into a single document for better results.

## Best practices

> [accordion] Structure your content clearly
>
> Use headings, bullet points, and short paragraphs. The chunking algorithm works best with well-organized content.

> [accordion] Keep information up to date
>
> Delete outdated documents and re-upload or re-crawl when your business information changes. Stale knowledge leads to incorrect answers.

> [accordion] Reference the knowledge base in instructions
>
> Tell your agent to use the knowledge base in its instructions:
>
> ```text theme={null}
> Use the knowledge base to answer questions about our services,
> pricing, and opening hours. If the answer is not available,
> let the caller know and offer to connect them with a team member.
> ```

> [accordion] Test with real questions
>
> After adding knowledge, test your agent with the exact questions your callers would ask. Review the transcript to verify the agent retrieves the right information.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.