# Add content to your KBAI

## Create a KBAI

1. Open your **Knowledge Base AI** tab for the first time: a popup with the Generative AI terms and conditions appears.

<figure><img src="/files/H7JaoONU0KJaDM0QNtGv" alt="" width="338"><figcaption></figcaption></figure>

2. Click on **Accept**.&#x20;

{% hint style="info" %}
If you click on Decline, your KBAI will be non-generative. Learn about it [here](/navigation/knowledge-base-ai.md#how-to-make-my-kbai-non-generative).
{% endhint %}

## Add content to your KBAI

To add content to your [KBAI](/navigation/knowledge-base-ai.md):

1. Go to your **Knowledge base AI** tab.
2. Click on **Add content** at the top right corner.

<figure><img src="/files/4XaxQIsM6qfXVDetsj2P" alt="" width="375"><figcaption><p>Add content to your KBAI.</p></figcaption></figure>

3. From here, choose a piece of content that you would like to add:

{% tabs %}
{% tab title="Documents" %}
These are uploaded from your computer. They can be:

* .**csv** files: are the only ones supported for non-generative knowledge bases, using a specific format.&#x20;

  * Make sure that your .csv file is UTF-8 encoded with 2 columns, one named *Question* and the other one named *Answer*.
  * To help you, we provide a .csv template file that you can download by clicking on **Download .csv template file**.

  <figure><img src="/files/FkzoPosqBBFoNi8ea7Wp" alt="" width="375"><figcaption><p>Example of question and answer format.</p></figcaption></figure>
* .**pdf** files: can be for example product descriptions, FAQ documents, training documentation, etc.
  {% endtab %}

{% tab title="URLs" %}
URLs are from publicly available websites.&#x20;

There are 2 options when you add URLs:

* **Only this page**: only use the exact page that the URL links to.
* **Entire domain**: use the page the URL links to and all linked pages.

Once the answer is retrieved, you can [use your URL in an answer](/navigation/knowledge-base-ai/use-your-kbai-source-url-in-a-button.md).
{% endtab %}
{% endtabs %}

<details>

<summary>⭐️ Select relevant content for your KBAI</summary>

In order to get the best possible results from your KBAI, it's important to keep a few guidelines in mind:

* Only include data that is relevant to your users. If you have a PDF with 100 pages, of which only 1 is relevant for customers, extract that page, and upload it separately.
* In PDFs and URLs, complicated layouts might decrease the quality of the results.
* The KBAI isn't good at understanding data from a table. Don't use KBAI to upload database files.

Also, please keep in mind that:

* Currently, KBAI isn't able to process any images, video's or other media types
* If the URL has scraping protection activated, such as Incapsula, the webpage won't be able to be added to your KBAI.

</details>

{% hint style="info" %}
Optionally, you can also add [tags](/navigation/knowledge-base-ai/use-tags-to-limit-your-kbai-content.md) to your content at this stage.
{% endhint %}

4. Click on **Add**.
5. Your content is now available under the **Contents** table.

<figure><img src="/files/D9Kpf4b09zYsWjr4C64v" alt=""><figcaption><p>See your content from the Contents table.</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatlayer.ai/navigation/knowledge-base-ai/add-content-to-your-kbai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
