> 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/building-new-projects/step-4-add-your-own-knowledge.md).

# Step 4 – Add your own knowledge (optional)

Optional: let the AI node answer from your own documents with a knowledge base. Uses a small UNESCO sample.

Without a knowledge base, the AI node answers from what the language model already knows. With one, it answers from your documents – product sheets, FAQs, terms and conditions.

This step uses a small sample: ten short text files about UNESCO.

{% file src="/files/6sM1csWzpyw9opvj71NO" %}

## Create the index

1. Download the sample above and unzip it on your computer.
2. In the project sidebar, open **Design** › **Knowledge base** and click **Create**.
3. Enter the **Name** `unesco` and keep the **Local** tab with the default settings.
4. Click **Upload** and select all ten `.txt` files.
5. Click **Create**. Wait until the files are processed – hover over the upload icon in the top bar to see each file reach **COMPLETED**.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-2e06331496c7a1211d4f58528ad236daf1224537%2Ftutorial-step4-create-index.png?alt=media" alt="The Create index dialog on the Local tab with the name unesco, the Upload button highlighted and ten UNESCO text files listed"><figcaption><p>Creating the unesco index from the ten sample files</p></figcaption></figure>

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-a6a7a65512e2c94c041f570b57a1793565077d51%2Ftutorial-step4-upload-completed.png?alt=media" alt="The upload panel opened from the upload icon in the top bar, listing the UNESCO files at 100 percent with the status COMPLETED"><figcaption><p>The upload panel in the top bar: every file is COMPLETED</p></figcaption></figure>

More about indexes: [Knowledge base](/digital-agent/advanced-functions/knowledge-base.md).

## Connect it to the AI node

1. Go back to **Design** › **Flow** and open **AI\_ASSISTANT**.
2. In **Essential** › **Tools**, click **+ Add**, choose **Knowledge base** and confirm with **Done**.
3. Below the new **Knowledge base** chip, choose the **Index name** `unesco`.
4. Add a sentence to **Behaviour**, so the model knows when to search:

   ```
   Answer questions about UNESCO only from the knowledge base.
   If the knowledge base has no answer, say that you don't know.
   ```
5. Close the node and click **Save**.

<figure><img src="https://4261467870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6iQTvxgRZRwPS1NgIGEb%2Fuploads%2Fgit-blob-76c0eb27af77c3e985f4adf02b4c8a349ba41cf1%2Ftutorial-step4-knowledge-base-tool.png?alt=media" alt="The Tools section of AI_ASSISTANT with the Knowledge base chip, Index name unesco and Number of snippets 5"><figcaption><p>The Knowledge base tool searches the unesco index</p></figcaption></figure>

Now the agent answers UNESCO questions from the sample files. Try *"What is UNESCO?"* or *"Which science programmes does UNESCO run?"* in the next step.

Next: [Step 5 – Train and test](/digital-agent/building-new-projects/step-5-train-and-test.md)
