These docs are for version 1.x of Rasa Open Source.

### User Guide

- [Installation](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/installation/)
- [Rasa Tutorial](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/rasa-tutorial/)
- [Command Line Interface](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/command-line-interface/)
- [Architecture](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/architecture/)
- [Messaging and Voice Channels](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/messaging-and-voice-channels/)
- [Evaluating Models](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/evaluating-models/)
- [Validate Data](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/validate-files/)
- [Running the Server](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/running-the-server/)
- [Running Rasa with Docker](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/running-rasa-with-docker/)
- [Cloud Storage](https://legacy-docs-v1.rasa.com/1.3.10/user-guide/cloud-storage/)

### NLU

- [About](https://legacy-docs-v1.rasa.com/1.3.10/nlu/about/)
- [Using NLU Only](https://legacy-docs-v1.rasa.com/1.3.10/nlu/using-nlu-only/)
- [Training Data Format](https://legacy-docs-v1.rasa.com/1.3.10/nlu/training-data-format/)
- [Choosing a Pipeline](https://legacy-docs-v1.rasa.com/1.3.10/nlu/choosing-a-pipeline/)
- [Language Support](https://legacy-docs-v1.rasa.com/1.3.10/nlu/language-support/)
- [Entity Extraction](https://legacy-docs-v1.rasa.com/1.3.10/nlu/entity-extraction/)
- [Components](https://legacy-docs-v1.rasa.com/1.3.10/nlu/components/)

### Core

- [About](https://legacy-docs-v1.rasa.com/1.3.10/core/about/)
- [Stories](https://legacy-docs-v1.rasa.com/1.3.10/core/stories/#)
- [Domains](https://legacy-docs-v1.rasa.com/1.3.10/core/domains/)
- [Responses](https://legacy-docs-v1.rasa.com/1.3.10/core/responses/)
- [Actions](https://legacy-docs-v1.rasa.com/1.3.10/core/actions/)
- [Policies](https://legacy-docs-v1.rasa.com/1.3.10/core/policies/)
- [Slots](https://legacy-docs-v1.rasa.com/1.3.10/core/slots/)
- [Forms](https://legacy-docs-v1.rasa.com/1.3.10/core/forms/)
- [Retrieval Actions](https://legacy-docs-v1.rasa.com/1.3.10/core/retrieval-actions/)
- [Interactive Learning](https://legacy-docs-v1.rasa.com/1.3.10/core/interactive-learning/)
- [Fallback Actions](https://legacy-docs-v1.rasa.com/1.3.10/core/fallback-actions/)
- [Knowledge Base Actions](https://legacy-docs-v1.rasa.com/1.3.10/core/knowledge-bases/)

### Conversation Design

- [Dialogue Elements](https://legacy-docs-v1.rasa.com/1.3.10/dialogue-elements/dialogue-elements/)
- [Small Talk](https://legacy-docs-v1.rasa.com/1.3.10/dialogue-elements/small-talk/)
- [Completing Tasks](https://legacy-docs-v1.rasa.com/1.3.10/dialogue-elements/completing-tasks/)
- [Guiding Users](https://legacy-docs-v1.rasa.com/1.3.10/dialogue-elements/guiding-users/)

### API Reference

- [Action Server](https://legacy-docs-v1.rasa.com/1.3.10/api/action-server/)
- [HTTP API](https://legacy-docs-v1.rasa.com/1.3.10/api/http-api/)
- [Jupyter Notebooks](https://legacy-docs-v1.rasa.com/1.3.10/api/jupyter-notebooks/)
- [Agent](https://legacy-docs-v1.rasa.com/1.3.10/api/agent/)
- [Custom NLU Components](https://legacy-docs-v1.rasa.com/1.3.10/api/custom-nlu-components/)
- [Events](https://legacy-docs-v1.rasa.com/1.3.10/api/events/)
- [Tracker](https://legacy-docs-v1.rasa.com/1.3.10/api/tracker/)
- [Tracker Stores](https://legacy-docs-v1.rasa.com/1.3.10/api/tracker-stores/)
- [Event Brokers](https://legacy-docs-v1.rasa.com/1.3.10/api/event-brokers/)
- [Lock Stores](https://legacy-docs-v1.rasa.com/1.3.10/api/lock-stores/)
- [Training Data Importers](https://legacy-docs-v1.rasa.com/1.3.10/api/training-data-importers/)
- [Featurization](https://legacy-docs-v1.rasa.com/1.3.10/api/featurization/)
- [Migration Guide](https://legacy-docs-v1.rasa.com/1.3.10/migration-guide/)
- [Rasa Change Log](https://legacy-docs-v1.rasa.com/1.3.10/changelog/)

### Migrate from (beta)

- [Dialogflow](https://legacy-docs-v1.rasa.com/1.3.10/migrate-from/google-dialogflow-to-rasa/)
- [Wit.ai](https://legacy-docs-v1.rasa.com/1.3.10/migrate-from/facebook-wit-ai-to-rasa/)
- [LUIS](https://legacy-docs-v1.rasa.com/1.3.10/migrate-from/microsoft-luis-to-rasa/)
- [IBM Watson](https://legacy-docs-v1.rasa.com/1.3.10/migrate-from/ibm-watson-to-rasa/)

### Reference

- [Glossary](https://legacy-docs-v1.rasa.com/1.3.10/glossary/)

### Versions

viewing: 1.3.10

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.

Note: You can also **spread your stories across multiple files** and specify the folder containing the files for most of the scripts (e.g. training, visualization). The stories will be treated as if they would have been part of one large file.

## 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?

- A story starts with a name preceded by two hashes `## story_03248462`. You can call the story anything you like, but it can be very useful for debugging to give them descriptive names!
- The end of a story is denoted by a newline, and then a new story starts again with `##`.
- Messages sent by the user are shown as lines starting with `*` in the format `intent{"entity1": "value", "entity2": "value"}`.
- Actions executed by the bot are shown as lines starting with `-` and contain the name of the action.
- Events returned by an action are on lines immediately after that action. For example, if an action returns a `SlotSet` event, this is shown as `slot{"slot_name": "value"}`.

### 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, which lets you use just the combination of an intent and entities to refer to all the possible messages the users can send to mean the same thing.

### Actions

While writing stories, you will encounter two types of actions: utterances and custom actions. Utterances are hardcoded messages that a bot can respond with. Custom actions, on the other hand, involve custom code being executed.

### Events

Events such as setting a slot or activating/deactivating a form have to be explicitly written out as part of the stories. Having to include the events returned by a custom action separately, when that custom action is already part of a story might seem redundant. However, since Rasa cannot determine this fact during training, this step is necessary.

#### Slot Events

Slot events are written as `- slot{"slot_name": "value"}`. If this slot is set inside a custom action, it is written on the line immediately following the custom action event. If your custom action resets a slot value to None, the corresponding event for that would be `-slot{"slot_name": null}`.

#### Form Events

There are three kinds of events that need to be kept in mind while dealing with forms in stories.

- A form action event (e.g. `- restaurant_form`) is used in the beginning when first starting a form, and also while resuming the form action when the form is already active.
- A form activation event (e.g. `- form{"name": "restaurant_form"}`) is used right after the first form action event.
- A form deactivation event (e.g. `- form{"name": null}`), which is used to deactivate the form.

### Writing Fewer and Shorter Stories

You can use `> checkpoints` to modularize and simplify your training data. Checkpoints can be useful, but **do not overuse them**. Here is an example story file which contains checkpoints:

```
## first story
* greet
   - action_ask_user_question
> check_asked_question

## user affirms question
> check_asked_question
* affirm
  - action_handle_affirmation
> check_handled_affirmation

## user denies question
> check_asked_question
* deny
  - action_handle_denial
> check_handled_denial

## user leaves
> check_handled_denial
> check_handled_affirmation
* goodbye
  - utter_goodbye
```

### OR Statements

Another way to write shorter stories, or to handle multiple intents the same way, is to use an `OR` statement. For example, if you ask the user to confirm something, and you want to treat the `affirm` and `thankyou` intents in the same way:

```
## story
...
  - utter_ask_confirm
* affirm OR thankyou
  - action_handle_affirmation
```

### 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.
