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

# Knowledge bases: retrieve your files in chat

> Upload your documents so agents can search them in chat and show cited sources under the reply.

A **knowledge base** is a collection of your files that Octop can search during chat. Instead of pasting a whole document into the conversation, the agent pulls the relevant passages and lists the source files under the reply. Click a citation to open that document.

Open it from the sidebar under **Settings**:

```text theme={null}
Knowledge Bases
```

The page is marked **BETA**. An administrator turns the feature on for the instance. After that, you can create knowledge bases and use them in chat.

## Turn the feature on

If you are an administrator, open **Knowledge Bases**, then **Knowledge base settings**.

**1. Enable knowledge bases**

Turn on **Enable knowledge bases**. This switch applies to everyone on the instance.

**2. Choose how documents are indexed**

Pick **Local ONNX** to index files on this machine, or **Online embedding** to use an embedding model from a provider you already set up under **Management → Models**.

**3. Download a local model if needed**

For **Local ONNX**, download a model, then save. For Chinese documents, start with a recommended model such as `BAAI/bge-small-zh-v1.5`. Changing the embedding model or OCR settings rebuilds every knowledge index.

**4. Optional OCR**

Turn on **Image and scanned-document OCR** if you need images or scanned PDFs. Choose **Local ONNX** (RapidOCR; components and default Chinese/English models install when you save) or **Online vision model** (images and rendered scan pages go to the provider you pick).

Until an administrator enables the feature and the model is ready, other users see a prompt to contact an administrator.

## Create and fill a knowledge base

**1. Create a knowledge base**

Click **Create knowledge base**, give it a name, and optionally a description and icon. Turn on **Shared** so other people on this instance can read it. Turn on **Default enabled** so *your* new chats include it automatically — other people still select a shared base themselves.

**2. Add documents**

Click **Upload documents** or drag files onto the page. Supported text includes md / txt / rst / html / json / yaml, spreadsheets csv / tsv / xls / xlsx / xlsm, plus pdf / docx / pptx. With OCR on, you can also upload png / jpg / webp and scanned PDFs. You can click **New file** to write markdown or text, or **New folder** to organize files.

**3. Wait until status is Ready**

Octop indexes each file and shows upload progress. Status moves from **Pending** or **Indexing** to **Ready**. Saving an in-page edit starts indexing again.

**4. Use it in chat**

In the composer, open **Knowledge bases** and select the bases for this turn. When the agent used a document, sources appear under the reply. Click a source to preview it in the original layout, or download the original file.

## Sharing and limits

* Only the owner (or an administrator) can edit a knowledge base.
* Shared bases are readable by everyone signed in on this instance.
* You can create up to **20** knowledge bases. Each base has a **Document limit** (default **100**; `0` means unlimited).
* Each upload follows the server file-size cap (default **100** MB).

## Next steps

> [card] [Knowledge API](https://octop.mintlify.site/api/knowledge.md)
>
> Create bases and upload documents over HTTP.

> [card] [Chat API](https://octop.mintlify.site/api/chat.md)
>
> See how chat replies include knowledge citations.


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