Domain
In Rasa, your domain defines the universe in which your assistant operates.
Specifically, it lists:
- The
responsesthat can be used as templated messages to send to a user. - The custom
actionsthat can be predicted by dialogue policies. - The
slotsthat act as your assistant's memory throughout a conversation. - Session configuration parameters including inactivity timeout.
If you are building an NLU-based assistant, refer to the Domain documentation to see how intents, entities, slot mappings, and slot featurization can be configured in your domain.
Multiple Domain Files
The domain can be defined as a single YAML file or split across multiple files in a directory. When split across multiple files, the domain contents will be read and automatically merged together. You can also manage your responses, slots, custom actions in Rasa Studio.
Using the command line interface, you can train a model with split domain files by running:
rasa train --domain path_to_domain_directory
Responses
Responses are templated messages that your assistant can send to your user.
Responses can contain rich content like buttons, images, and custom json payloads.
Every response is also an action, meaning that it can be used directly in
an action step in a flow.
Responses can be defined directly in the domain file under the responses key.
For more information on responses and how to define them,
see Responses.
Actions
Actions are the things your bot can do. For example, an action could:
-
respond to a user,
-
make an external API call,
-
query a database, or
-
just about anything!
All custom actions should be listed in your domain.
Rasa also has default actions which you do not need to list in your domain.
Slots
Slots are your assistant's memory. They act as a key-value store which can be used to store information the user provided (e.g. their home city) as well as information gathered about the outside world (e.g. the result of a database query). Check out the Slots reference for more information.