# Knowledge base

The knowledge base stores the information a bot uses in its answers, such as company details, products, services, delivery, warranties, and operating rules. Information is organized into files, and files are grouped into storages.

## Setting up

1. Prepare clear documents without duplicates and contradictions.
2. Create storage and add files to it.
3. Connect the storage to the bot on the **Primary** tab.
4. Indicate in the system prompt when to use the knowledge base.
5. Ask the bot control questions and compare the answers to the files.

## Instructions

- [**Use of the knowledge base**](<./prepare-knowledge-base-files.md>) - requirements for the structure of documents and recommendations for working with information.
- [**Manage repositories and files**](<./manage-storages-and-files.md>) — creating storage, downloading and creating files, connecting multiple databases to a bot.
- [**Use of media files**](<./media-files.md>) — uploading images and other materials to users.

## What to store in the database

Appropriate rules, reference materials and facts that the bot needs to know. Do not download passwords, access keys, personal data of customers and information that cannot be shared with users.

!!!tip
Start with a few small files on individual topics. After checking, add new materials gradually – it is easier to find the source of the wrong answer.
!!!
