Stories

Stories

Rasa stories are a form of training data used to train the Rasa’s dialogue management models.

A story is a representation of a conversation between a user and an AI assistant, converted into a specific format where user inputs are expressed as corresponding intents (and entities where necessary) while the responses of an assistant are expressed as corresponding action names.

A training example for the Rasa Core dialogue system is called a story. This is a guide to the story data format.

Format

Here’s an example of a dialogue in the Rasa story format:

## greet + location/price + cuisine + num people    <!-- name of the story - just for debugging -->
* greet
   - action_ask_howcanhelp
* inform{"location": "rome", "price": "cheap"}  <!-- user utterance, in format intent{entities} -->
   - action_on_it
   - action_ask_cuisine
* inform{"cuisine": "spanish"}
   - action_ask_numpeople        <!-- action that the bot should execute -->
* inform{"people": "six"}
   - action_ack_dosearch

What makes up a story?

User Messages

While writing stories, you do not have to deal with the specific contents of the messages that the users send. Instead, you can take advantage of the output from the NLU pipeline.

Actions

While writing stories, you will encounter two types of actions: utterance actions and custom actions.

Events

Events such as setting a slot or activating/deactivating a form have to be explicitly written out as part of the stories.

Checkpoints and OR statements

Checkpoints and OR statements should both be used with caution, if at all.

End-to-End Story Evaluation Format

The end-to-end story format is a format that combines both NLU and Core training data into a single file for evaluation.