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

# Dialogue evaluation

## Configuration

1. Go to the **"Workflows"** tab and then click the "Add" button.

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

2. Select the **"Dialogue evaluation"** action.

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

3. Go to step configuration.

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

Two evaluation options are available:

**Like/Dislike**

**Star rating from 1 to 5**

Select the option that suits you best.

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

Specify the function name and its description.

{% hint style="info" %}
The function name should reflect the action it will perform. The description helps the agent understand the exact purpose of the function. These two fields enable the agent to use the configured action more reliably. Avoid names that do not reflect the function’s meaning and unclear descriptions.
{% endhint %}

In the agent’s main instructions, it is mandatory to include a line in the following format after describing the conditions for calling the function:

{% hint style="info" %}
Call the evaluation\_request function and return its result to the user.
{% endhint %}

## An alternative way to use the workflow

Call an action via follow-up:

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

We select generation by an existing bot and write the generation instructions:

{% hint style="info" %}
Ask the client to rate the quality of the conversation, invoke the dialogue\_evaluation function, and send the result of this function to the user in the chat, unpacking the {rate} variable.
{% endhint %}

Additionally, you can write an LLM instruction to check the trigger conditions before invoking the follow-up.

For example, you can write a code so that the dialogue evaluation request is not sent if the client has been negative or aggressive in the dialogue:

{% hint style="info" %}
If the client showed aggression or obvious dissatisfaction during the dialogue, then\
Return false\
Otherwise, return true\
EndIf
{% endhint %}

## Evaluation result

You can see the evaluation result in your personal account in the corresponding dialogue.

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