From b152bbcb57c95acee816b3e8a5623dcff91bc09a Mon Sep 17 00:00:00 2001 From: m-vdb Date: Tue, 26 Sep 2023 10:58:34 +0200 Subject: [PATCH 1/3] document all the commands in CALM --- docs/docs/concepts/dialogue-understanding.mdx | 61 ++++++++++++++++++- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/docs/docs/concepts/dialogue-understanding.mdx b/docs/docs/concepts/dialogue-understanding.mdx index cb6e3b7957db..7fc05ac929b9 100644 --- a/docs/docs/concepts/dialogue-understanding.mdx +++ b/docs/docs/concepts/dialogue-understanding.mdx @@ -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 @@ -21,9 +25,62 @@ In the CALM approach, _Dialogue Understanding_ aims to represent how the end use wants to progress the conversation. There is currently only one command generator available: the `LLMCommandGenerator`. -## Using the LLMCommandGenerator in Your Bot +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: + +### StartFlowCommand + +This command indicates the assistant should start a new [flow](./flows.mdx). + +### CancelFlowCommand + +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). + +### SetSlotCommand + +This command indicates the assistant should set a [slot](./domain.mdx#slots) to a given value. + +### CorrectSlotsCommand + +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). + +### ClarifyCommand + +This command indicates the assistant should ask for clarification. It powers +[Conversation Repair's Clarification use case](./conversation-repair.mdx#6-clarification). + +### ChitChatAnswerCommand + + + + + +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). + +### KnowledgeAnswerCommand + + + + + +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). + +### HumanHandoffCommand + +This command indicates the assistant should hand off the conversation to a human. + +### ErrorCommand + +This command indicates the assistant failed to handle the dialogue due to +an [internal error](./conversation-repair.mdx#7-internal-errors). + +## 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" From 0bb8817da2b3edfd4bf5988ca023ee59dc1679e5 Mon Sep 17 00:00:00 2001 From: m-vdb Date: Tue, 26 Sep 2023 14:41:39 +0200 Subject: [PATCH 2/3] move command reference at the bottom --- docs/docs/concepts/dialogue-understanding.mdx | 109 +++++++++--------- 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/docs/docs/concepts/dialogue-understanding.mdx b/docs/docs/concepts/dialogue-understanding.mdx index 7fc05ac929b9..ebda4a018516 100644 --- a/docs/docs/concepts/dialogue-understanding.mdx +++ b/docs/docs/concepts/dialogue-understanding.mdx @@ -24,59 +24,7 @@ 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`. - -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: - -### StartFlowCommand - -This command indicates the assistant should start a new [flow](./flows.mdx). - -### CancelFlowCommand - -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). - -### SetSlotCommand - -This command indicates the assistant should set a [slot](./domain.mdx#slots) to a given value. - -### CorrectSlotsCommand - -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). - -### ClarifyCommand - -This command indicates the assistant should ask for clarification. It powers -[Conversation Repair's Clarification use case](./conversation-repair.mdx#6-clarification). - -### ChitChatAnswerCommand - - - - - -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). - -### KnowledgeAnswerCommand - - - - - -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). - -### HumanHandoffCommand - -This command indicates the assistant should hand off the conversation to a human. - -### ErrorCommand - -This command indicates the assistant failed to handle the dialogue due to -an [internal error](./conversation-repair.mdx#7-internal-errors). +You can find all generated commands in the [command reference](#command-reference) below. ## Using the LLMCommandGenerator @@ -211,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: + +### StartFlowCommand + +This command indicates the assistant should start a new [flow](./flows.mdx). + +### CancelFlowCommand + +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). + +### SetSlotCommand + +This command indicates the assistant should set a [slot](./domain.mdx#slots) to a given value. + +### CorrectSlotsCommand + +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). + +### ClarifyCommand + +This command indicates the assistant should ask for clarification. It powers +[Conversation Repair's Clarification use case](./conversation-repair.mdx#6-clarification). + +### ChitChatAnswerCommand + + + + + +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). + +### KnowledgeAnswerCommand + + + + + +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). + +### HumanHandoffCommand + +This command indicates the assistant should hand off the conversation to a human. + +### ErrorCommand + +This command indicates the assistant failed to handle the dialogue due to +an [internal error](./conversation-repair.mdx#7-internal-errors). From b8bb84c469b4e4493f91ed6c87e19a18cde17846 Mon Sep 17 00:00:00 2001 From: m-vdb Date: Tue, 26 Sep 2023 14:42:39 +0200 Subject: [PATCH 3/3] update command titles --- docs/docs/concepts/dialogue-understanding.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/docs/concepts/dialogue-understanding.mdx b/docs/docs/concepts/dialogue-understanding.mdx index ebda4a018516..abe169853706 100644 --- a/docs/docs/concepts/dialogue-understanding.mdx +++ b/docs/docs/concepts/dialogue-understanding.mdx @@ -165,30 +165,30 @@ pipeline: 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: -### StartFlowCommand +### Start Flow This command indicates the assistant should start a new [flow](./flows.mdx). -### CancelFlowCommand +### 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). -### SetSlotCommand +### Set Slot This command indicates the assistant should set a [slot](./domain.mdx#slots) to a given value. -### CorrectSlotsCommand +### 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). -### ClarifyCommand +### Clarify This command indicates the assistant should ask for clarification. It powers [Conversation Repair's Clarification use case](./conversation-repair.mdx#6-clarification). -### ChitChatAnswerCommand +### Chit-Chat Answer @@ -197,7 +197,7 @@ This command indicates the assistant should ask for clarification. It powers 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). -### KnowledgeAnswerCommand +### Knowledge Answer @@ -206,11 +206,11 @@ It powers [Conversation Repair's Chitchat use case](./conversation-repair.mdx#4- 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). -### HumanHandoffCommand +### Human Handoff This command indicates the assistant should hand off the conversation to a human. -### ErrorCommand +### Error This command indicates the assistant failed to handle the dialogue due to an [internal error](./conversation-repair.mdx#7-internal-errors).