> For the complete documentation index, see [llms.txt](https://docs.borndigital.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.borndigital.ai/digital-agent/advanced-functions/knowledge-base.md).

# Knowledge base

Let your digital agent answer from your own content: create an index, upload documents and let the AI node search it.

A knowledge base lets the [AI node](/digital-agent/conversation-flow/nodes-explained/ai-node.md) answer from your own content – product sheets, terms and conditions, FAQs, internal procedures – instead of only from what the language model already knows.

The content is stored in **indexes**. An index belongs to one project and holds **documents**: the files you uploaded, each split into short pieces of text called **snippets**.

## How it works

1. **You upload documents.** Studio splits every file into snippets and stores them in the index so that they can be searched by meaning, not only by exact words.
2. **The customer asks a question.** The AI node searches the index with the customer's message and gets the best-matching snippets.
3. **The model reads what it needs.** It sees which documents matched – by their name and **Description** – and reads the snippets of the documents that are relevant to the question.
4. **The agent answers** from those snippets. The node also stores which documents it used in the variables `kb_document_id`, `kb_document_name` and `kb_document_url`, so you can show the sources.

{% hint style="info" %}
The **Description** of a document is what the model uses to decide whether to read it. A short, specific description ("Prices and fees of the Gold credit card, valid from 2026") makes answers noticeably better than an empty one.
{% endhint %}

## Create your first index

1. Open your project and select **Design** › **Knowledge base** in the left sidebar.
2. Click **Create**.
3. Enter a **Name** for the index. Use a name that says what it contains, for example `card-products`. It cannot be changed later.
4. Keep the **Local** tab (the default). If you need the index hosted by OpenAI or Azure, see [Index providers and settings](/digital-agent/advanced-functions/knowledge-base/index-providers-and-settings.md).
5. Keep **Parsing** set to **Simple**, **Snippet size** at **800** and **Delimiter** at **Default**. These defaults work well for most documents.
6. Add your files: click **Upload** or drop them into the box. Studio accepts **.txt**, **.pdf** and **.html** files, several at once.
7. Click **Create**.

Processing runs in the background. Follow it with the upload icon in the top bar: hover over it to see every file with its progress, number of snippets and status. When the status is **COMPLETED**, the document appears in the index.

8. Open the index and check the **Description** of every document. Where your environment has it enabled, Studio writes a short summary of the beginning of each uploaded document for you – the document then shows **system** as its last editor. Rewrite the description if it does not say clearly what the document is about. Close the document panel to save the change.

{% hint style="warning" %}
You cannot create an empty index – add at least one file in the **Create index** dialog.
{% endhint %}

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-d271867832bd93641622b1bdc6fee1d7cf04d591%2Fkb-index-list.png?alt=media" alt="The Knowledge base screen of a project with This project selected and one Local index card, unesco, with 10 documents"><figcaption><p>An index card in the Knowledge base</p></figcaption></figure>

## Use the index in a conversation flow

1. Open the AI node that should answer from the index.
2. In **Essential** › **Tools**, click **+ Add** and choose **Knowledge base**.
3. Select the **Index name** and set the **Number of snippets** the search returns (default 5).
4. In **Behaviour**, tell the model when to use the knowledge base, for example: *"Answer questions about our cards only from the knowledge base. If it has no answer, say so and offer an operator."*
5. Save the flow, train it and test it in the bubble.

All settings of the tool are described in [AI node › Tools](/digital-agent/conversation-flow/nodes-explained/ai-node/tools.md#knowledge-base).

{% hint style="info" %}
The **Knowledge base** tool searches **one index of the current project**. To search several indexes at once, use hybrid (full-text and semantic) search, filter by labels or use an index of another project, connect the [Indexer MCP server](/digital-agent/conversation-flow/nodes-explained/ai-node/indexer-mcp-server.md) instead.
{% endhint %}

## In this section

* [Index providers and settings](/digital-agent/advanced-functions/knowledge-base/index-providers-and-settings.md) – Local or Cloud, parsing, snippet size and delimiters.
* [Manage indexes and documents](/digital-agent/advanced-functions/knowledge-base/manage-indexes-and-documents.md) – add, edit, duplicate, export, import and delete.
* [FAQ and troubleshooting](/digital-agent/advanced-functions/knowledge-base/faq-and-troubleshooting.md) – file types, limits and why the agent does not use your content.
