# Prompts

The prompt defines the role of the bot, the purpose of the dialogue, the style of communication, restrictions and order of tasks. The more precise the rules, the more stable the bot responds, uses the knowledge base and triggers actions.

This section contains recommendations for creating and improving the ChatRex system prompt.

## Recommended procedure

1. [**How to write an effective prompt**](<./writing-chatbot-prompt.md>) - role, purpose, structure, constraints and testing.
2. [**Comparison of ChatGPT**](<./choosing-model.md>) - the choice of the model taking into account quality, speed and cost.
3. [**Prompt description**](<./describing-actions.md>) - call conditions, mandatory data, confirmation and processing of the result.
4. [**Knowledgebase Interaction**](<./prompt-and-knowledge-base.md>) — when to access downloaded files and how to use the information found.

## Where to edit the prompt

1. Open **My Bots**.
2. Press **Change** in front of the desired bot.
3. Go to **Bot Logic**.
4. Change the **System Prompt** field.
5. Press **Save changes**.

After each significant change, check several scenarios in **Testing**. Evaluate not only the wording of the answer, but also compliance with restrictions, clarifying questions and the correctness of calling actions.

!!!tip
Change the prompt in small blocks and repeat the same set of test dialogues after each change. This makes it easier to understand which rule affected the behavior of the bot.
!!!
