# Choice of model

The model processes client messages, reads the system prompt, and decides when to trigger an action. A more powerful model usually handles complex rules better, but can last longer and cost more.

The list of models and their cost change. Topical options are always shown in the bot settings.

## Where to choose a model

1. Open **My Bots**.
2. Press **Change** in front of the desired bot.
3. On the **Basic** tab, open the **Model** field.
4. Select the option and press **Save changes**.

In the list of models are divided into categories, for example **Recommended**, **Fast and economical** and **Old**. The relative level of value is displayed next to the name: the more `$` characters, the more expensive the processing.

## Which category to choose

| Scenario | Where to start |
|---|---|
| Simple FAQ and short answers | Fast and economical model |
| Consultation on several rules | Recommended model |
| Working with action and long dialogue | Recommended model with the best quality |
| Difficult qualification or many limitations | More accurate model after testing comparison |
| Old bot that already works | Save the current model until retested |

For a new bot, start with a model from the **Recommended** category. Switch to a cheaper one only after checking that the quality remains acceptable.

## What to check before choosing

The model must be correct:

- respect the role and limitations of the Prompt;
- Ask clarifying questions;
- Find information in the knowledge base;
- compile mandatory variables;
- call the necessary actions in the right order;
- Do not invent facts in the absence of data;
- Transfer a complex request to an employee.

## An honest comparison of the two models

1. Prepare 10-20 identical test dialogues.
2. Save the current model and go through all scenarios.
3. Write down errors, response time and cost.
4. Select another model without changing the pump and other settings.
5. Repeat the same set of tests.
6. Leave the option that gives the right quality at an acceptable cost.

Don’t compare models on one question: a randomly successful answer doesn’t show stability.

## What the cost depends on

The model doesn’t just handle the customer’s last message. The cost may include:

- system prompt;
- history of dialogue;
- found fragments of the knowledge base;
- input and output data of actions;
- model's answer.

To reduce the cost, remove repetitions from the prompt, do not connect unnecessary files and do not pass unnecessary data to the action.

## When to change the model

Consider replacing if the bot regularly breaks the rules, confuses the sequence of actions, fails to cope with long context, or is too expensive. After any replacement, repeat the full testing before launching on real customers.

!!!warning
Do not choose an outdated model for a new project just because of a familiar name. Its functionality and support may be limited.
!!!
