# Knowledge base AI

<figure><img src="/files/dRroriR6InzCzk6W27VE" alt=""><figcaption></figcaption></figure>

A knowledge base is a store of information or data that is available to draw on. It can be constituted of different pieces of content (e.g. URLs, files).&#x20;

It goes in two steps:

1. First, you [add the content](/navigation/knowledge-base-ai/add-content-to-your-kbai.md) that your bot will scrape to retrieve the answer to the customer's question.&#x20;
2. Second, you [build a flow](/navigation/knowledge-base-ai/build-your-kbai-flow.md) to display that answer.&#x20;

By using the Chatlayer Knowledge base AI's generative AI technology, your bot will be able to answer to questions based on your content and in context.

<figure><img src="/files/fQK04DQ2iIa8K60J2F00" alt="" width="329"><figcaption><p>Example of an FAQ flow using KBAI.</p></figcaption></figure>

{% hint style="warning" %}
You can use Knowledge base AI for free if you ask it under 50 questions per month. If you would like to use more than that, please [contact us](/support/get-in-touch.md).
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>KBAI template bot</strong></td><td>Make your KBAI flow with a ready-made bot.</td><td></td><td><a href="/files/oIJH9nreR7WZc1lsKQUe">/files/oIJH9nreR7WZc1lsKQUe</a></td><td><a href="/pages/-M_QBb6GHsVH1o36qrWB#knowledge-base-ai">/pages/-M_QBb6GHsVH1o36qrWB#knowledge-base-ai</a></td></tr><tr><td><strong>Create your KBAI flow</strong></td><td>A step-by-step guide on how to make your FAQ flow using KBAI.</td><td></td><td><a href="/files/0VDZvuYrV2Stbh5t2GE4">/files/0VDZvuYrV2Stbh5t2GE4</a></td><td><a href="/pages/ipjVOqSFf1tippWlcSmd">/pages/ipjVOqSFf1tippWlcSmd</a></td></tr><tr><td><strong>Use tags to limit your content</strong></td><td>Tell your bot where to look for an answer.</td><td></td><td><a href="/files/akw5pbfC2CG5gqRAGRJG">/files/akw5pbfC2CG5gqRAGRJG</a></td><td><a href="/pages/BrJ6tVwTiLSiZkvAzOMw">/pages/BrJ6tVwTiLSiZkvAzOMw</a></td></tr><tr><td><strong>Manage handover</strong></td><td>Tips on how to manage human handover using KBAI.</td><td></td><td><a href="/files/EFksd5tQdxZ0SccYBn6y">/files/EFksd5tQdxZ0SccYBn6y</a></td><td><a href="/pages/GTRDpVicIPKWX5Y3iVMW">/pages/GTRDpVicIPKWX5Y3iVMW</a></td></tr><tr><td><strong>Analytics</strong></td><td>Track your KBAI performance.</td><td></td><td><a href="/files/d2shns6EM7GH2roWFkPr">/files/d2shns6EM7GH2roWFkPr</a></td><td><a href="/pages/-McxBt4U7QYX5p8_IRWn#knowledge-base-ai">/pages/-McxBt4U7QYX5p8_IRWn#knowledge-base-ai</a></td></tr><tr><td><strong>Display your KBAI source URL in a button</strong></td><td>Display a "Read more" button.</td><td></td><td><a href="/files/W8NSvvLynGxmRg2oNylx">/files/W8NSvvLynGxmRg2oNylx</a></td><td><a href="/pages/GxaFpK7a5wmnE6wkdd2g">/pages/GxaFpK7a5wmnE6wkdd2g</a></td></tr></tbody></table>

<details>

<summary>⭐️ How to make your KBAI non-generative</summary>

Setting up a non-generative knowledge base AI means that:

* your bot will not use any external LLM providers to generate answers
* you will only be able to give .csv files in a specific format as KBAI content
* your bot will be able to understand multiple sentences from your users (i.e. natural language understanding from the AI engine is taking place)
* but your bot will answer only the sentence that you defined as an answer (i.e. the bot answers are **not** generated)

To make your bot non-generative:

1. Go to your **Settings** tab.
2. Under **Generative AI**, turn off the **Turn on generative AI** features toggle.

![](/files/oOSdgrWFlYzGBiI5putc)

3. Click **Save**.

</details>

## Build a powerful, hybrid bot

Bots can become really powerful if you use a mix of[ intents ](/navigation/natural-language-processing-nlp/intents.md)(answers designed by your team) and knowledge base (AI-driven answers). In this sense, your bot will be hybrid because it uses answers generated both by humans and machine.&#x20;

* If you connect your **Knowledge base AI** Action block to your **Not Understood** block and add no other content to your bot, all questions from users will be answered directly by your knowledge base AI.
* If you have other intents in your bot, the intents will be triggered whenever there is a match with the expression from a user. Only when something is said by the user that isn't a match with any intent, the **Not Understood** block and thus knowledge base AI will be triggered. Get more inspiration on in our [handover with KBAI article](/navigation/knowledge-base-ai/manage-handover-where-kbai-is-unsatisfactory.md).


---

# 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.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.
