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

# Knowledge base

Questions and answers from which the agent takes information for customers

A knowledge base is a tool that allows Athena to use the information you provide to answer questions. It is an organized set of data that the bot refers to when looking for the necessary answers. An effective combination of the knowledge base and bot settings ensures the required results are achieved in how the system works.

{% hint style="warning" %}
**Important!**

Behavior instructions always have the highest priority, while the knowledge base serves as a supporting tool.
{% endhint %}

The knowledge base is similar to an FAQ section — it is a place where answers to possible questions are collected. If a client asks a question similar to those already in the knowledge base, the AI agent uses the accumulated information and provides the most accurate and relevant answer.

{% hint style="warning" %}
**Important!**

The knowledge base works by matching the meaning of a specific client message with the content in the “question” column.
{% endhint %}

## Question column:

![](https://4126380821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwirYrs8odJMFan3KqfzY%2Fuploads%2FZRUGQSozMW2oQbvkxuOw%2Fkb-01.webp?alt=media)

## Answer column:

![](https://4126380821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwirYrs8odJMFan3KqfzY%2Fuploads%2F21vcRK3Dh8Lz8A7gtDf6%2Fkb-02.webp?alt=media)

## Matched answer:

![](https://4126380821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwirYrs8odJMFan3KqfzY%2Fuploads%2FPRHXUDVamCjDEUNbYIFr%2Fkb-03.webp?alt=media)

To create a knowledge base, open the corresponding section in the main menu and click the “New Knowledge Base” button. After that, you can start filling it with the necessary information.

![](https://4126380821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwirYrs8odJMFan3KqfzY%2Fuploads%2FfAbxcIMBOc5Qv8m3ecOP%2Fkb-04.webp?alt=media)

You can add question-and-answer pairs that the AI agent will use as a reference in several ways:

![](https://4126380821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwirYrs8odJMFan3KqfzY%2Fuploads%2FvGP7xHsEG3R7rgnTXJPG%2Fkb-05.webp?alt=media)

**Adding a URL.** Specify the URLs of the websites whose information should be provided to the AI agent for further use.

{% hint style="warning" %}
**Important!**

We recommend uploading files and URLs one at a time for easier tracking of the resulting outcomes. After uploading, go to the “Answers” tab to review the automatically created questions and answers. If necessary, you can edit them to improve accuracy and better match your requirements.
{% endhint %}

1. **File upload.** You can upload files in TXT, DOC, DOCX, and PDF formats. Based on these files, Athena will generate questions and answers that will then be used by the AI agent.
2. **Import answers.** You can create a Google Sheet or Excel file with two columns: the first column contains the questions, and the second contains the corresponding answers. You can upload the spreadsheet using the “Import answers” button.
3. **Your own questions and answers.** You can manually add the required questions and answers to the knowledge base using the “Custom question-answer” option.

![](https://4126380821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwirYrs8odJMFan3KqfzY%2Fuploads%2FdFEPzWJs74c0Ll2NaN2Q%2Fkb-06.webp?alt=media)

You can edit or delete the created questions and answers at any time. If needed, you can attach an image, video, or file to each answer.

![](https://4126380821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwirYrs8odJMFan3KqfzY%2Fuploads%2FyBm1E9ql7Ak6mXmaHzit%2Fkb-07.webp?alt=media)

If the meaning of the client's message matches the information in the “question” column, Athena will select the appropriate answer. By default, the answer text may be automatically rephrased by AI. If you need the answer to be reproduced exactly as it is written in the “answer” column, enable the “Do not use AI in the answer” setting.

For convenient work with questions and answers, use search and filtering by information source.

At any time, you can export your knowledge base using the “Export answers” button.

Once the knowledge base is filled, it can be connected to the required channels. There are two ways to do this: through the “Channels” tab in the knowledge base section or through the settings of a specific channel.

After connecting the knowledge base, you can begin testing. Keep in mind that the knowledge base, unlike bot instructions, responds to specific messages — it is used only when the meaning of the interlocutor's message matches a question contained in the knowledge base.

You can tell whether the knowledge base was used and which question-answer pair was selected to form the response by using the “Info” button under the bot's message in the “Messages” section. If this button is missing, it means the knowledge base was not used when generating the answer.

If you are not satisfied with the AI agent's response, click the “Incorrect” button and manually adjust the answer. In this case, the new question-answer pair will be automatically added to the knowledge base.

![](https://4126380821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwirYrs8odJMFan3KqfzY%2Fuploads%2FGDbMn8cOtuiVypWG6UUF%2Fkb-08.webp?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.athenachat.ai/documentation/documentation-en/features/knowledge-base.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
