Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document all the commands in CALM #12871

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 62 additions & 2 deletions docs/docs/concepts/dialogue-understanding.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ abstract: |
to progress the conversation.
---

import RasaProLabel from "@theme/RasaProLabel";

import RasaProBanner from "@theme/RasaProBanner";

:::info New in 3.7

The _Command Generator_ is part of Rasa's new
Expand All @@ -20,10 +24,11 @@ The `CommandGenerator` component performs _Dialogue Understanding_.
In the CALM approach, _Dialogue Understanding_ aims to represent how the end user
wants to progress the conversation.
There is currently only one command generator available: the `LLMCommandGenerator`.
You can find all generated commands in the [command reference](#command-reference) below.

## Using the LLMCommandGenerator in Your Bot
## Using the LLMCommandGenerator

To use this component in your bot, you need to add the
To use this component in your assistant, you need to add the
`LLMCommandGenerator` to your NLU pipeline in the `config.yml` file.

```yaml-rasa title="config.yml"
Expand Down Expand Up @@ -154,3 +159,58 @@ pipeline:
# highlight-next-line
prompt: prompts/command-generator.jinja2
```

## Command reference

Like its name indicates, the `CommandGenerator` generates "commands" that are then internally processed to
trigger operations on the current conversation. Here is a reference of all supported commands:

### Start Flow

This command indicates the assistant should start a new [flow](./flows.mdx).

### Cancel Flow

This command indicates the assistant should cancel the current [flow](./flows.mdx).
It powers [Conversation Repair's Cancellation use case](./conversation-repair.mdx#3-cancellations).

### Set Slot

This command indicates the assistant should set a [slot](./domain.mdx#slots) to a given value.

### Correct Slots

This command indicates the assistant should change the value of a given [slot](./domain.mdx#slots)
to a new value. It powers [Conversation Repair's Correction use case](./conversation-repair.mdx#2-corrections).

### Clarify

This command indicates the assistant should ask for clarification. It powers
[Conversation Repair's Clarification use case](./conversation-repair.mdx#6-clarification).

### Chit-Chat Answer

<RasaProLabel />

<RasaProBanner />

This command indicates the assistant should reply a chitchat style free-form answer.
It powers [Conversation Repair's Chitchat use case](./conversation-repair.mdx#4-chitchat).

### Knowledge Answer

<RasaProLabel />

<RasaProBanner />

This command indicates the assistant should reply a knowledge-based free-form answer. It works
hand in hand with the [DocSearch policy](./policies.mdx#docsearch-policy).

### Human Handoff

This command indicates the assistant should hand off the conversation to a human.

### Error

This command indicates the assistant failed to handle the dialogue due to
an [internal error](./conversation-repair.mdx#7-internal-errors).