diff --git a/.typo-ci.yml b/.typo-ci.yml index 92d31c73d962..6ea91972c2e0 100644 --- a/.typo-ci.yml +++ b/.typo-ci.yml @@ -217,5 +217,6 @@ excluded_words: - HashiCorp - sqltrackerstore - wsgi + - pypred spellcheck_filenames: false diff --git a/docs/docs/command-line-interface.mdx b/docs/docs/command-line-interface.mdx index 8fd24424aede..5e55425df36d 100644 --- a/docs/docs/command-line-interface.mdx +++ b/docs/docs/command-line-interface.mdx @@ -23,7 +23,7 @@ The following commands are relevant to all assistants built with Rasa. | `rasa run actions` | Starts an action server using the Rasa SDK. | | `rasa test e2e` | Runs end-to-end testing fully integrated with the action server that serves as acceptance testing. | | `rasa data split nlu` | Performs a 80/20 split of your NLU training data. | -| `rasa data validate` | Checks the domain, NLU and conversation data for inconsistencies. | +| `rasa data validate` | Checks the domain, NLU, flows and conversation data for inconsistencies. | | `rasa export` | Exports conversations from a tracker store to an event broker. | | `rasa evaluate markers` | Extracts markers from an existing tracker store. | | `rasa marker upload` | Upload marker configurations to Analytics Data Pipeline | @@ -562,7 +562,7 @@ rasa data migrate --help ## rasa data validate -You can check your domain, NLU data, or story data for mistakes and inconsistencies. +You can check your domain, NLU data, flows or story data for mistakes and inconsistencies. To validate your data, run this command: ```bash @@ -574,6 +574,7 @@ identical training examples. The validator also checks if you have any stories where different assistant actions follow from the same dialogue history. Conflicts between stories will prevent a model from learning the correct pattern for a dialogue. +To learn more about the checks performed by the validator on flows, continue reading in the [next section](./command-line-interface.mdx#validate-flows). :::info Searching for the `assistant_id` key introduced in 3.5 @@ -585,6 +586,25 @@ key is missing or if the default value has not been changed. If you pass a `max_history` value to one or more policies in your `config.yml` file, provide the smallest of those values in the validator command using the `--max-history ` flag. +### Validate flows + +The validator will perform the following checks on flows: +- determine whether flow names or descriptions are unique after stripping punctuation +- verify whether natural language conditions used in [branch steps](./concepts/flows.mdx#branching-conditions) or `collect` step [rejections](./concepts/flows.mdx#slot-validation) are valid `pypred` expressions +- determine whether slots used in flows are defined in the domain +- disallow `list` slots from being used in flows `collect` steps: CALM supports only filling slots with values of type `int`, `string` or `bool` in flows. +- disallow `dialogue_stack` internal slot from being used in flows + +For every failure, the validator will log an error and exit the command with exit code 1. + +You can validate flows only by running this command: + +```bash +rasa data validate flows +``` + +### Validate story structure + You can also validate only the story structure by running this command: ```bash