The Domain defines the universe in which your bot operates.
It specifies the intents, entities, slots, and actions
your bot should know about. Optionally, it can also include templates
for the things your bot can say.

As an example, the DefaultDomain has the following yaml definition:

# all hashtags are comments :)intents:-greet-default-goodbye-affirm-thank_you-change_bank_details-simple-hello-why-next_intententities:-nameslots:name:type:texttemplates:utter_greet:-"heythere{name}!"# {name} will be filled by slot (same name) or by custom action codeutter_goodbye:-"goodbye😢"-"byebye😢"# multiple templates - bot will randomly pick one of themutter_default:-"defaultmessage"actions:-utter_default-utter_greet-utter_goodbye

What does this mean?

Your NLU model will define the intents and entities that you
need to include in the domain.

slots are the things you want to keep track of during a conversation,
see Using Slots . A categorical slot called risk_level would be
defined like this:

slots:risk_level:type:categoricalvalues:-low-medium-high

Here is the full list of slot types defined by
Rasa Core, along with syntax for including them in your domain file.

actions are the things your bot can actually do.
For example, an action can:

To reference slots in your domain, you need to reference them by
their module path. To reference custom actions, use their name.
For example, if you have a module called my_actions containing
a class MyAwesomeAction, and module my_slots containing
MyAwesomeSlot, you would add these lines to the domain file:

actions:-my_custom_action...slots:-my_slots.MyAwesomeSlot

The name function of MyAwesomeAction needs to return
my_custom_action in this example (for more details,
see Actions).

Utterance templates are messages the bot will send back to the user. There are
two ways to use these templates:

if the name of the template starts with utter_, the utterance can
directly be used like an action. You would add the utterance template
to the domain

templates:utter_greet:-text:"Hey!Howareyou?"

Afterwards, you can use the template as if it were an action in the
stories:

## greet the user* intent_greet- utter_greet

When utter_greet is run as an action, it will send the message from
the template back to the user.

You can use the templates to generate response messages from your
custom actions using the dispatcher:
dispatcher.utter_template("utter_greet").
This allows you to separate the logic of generating
the messages from the actual copy. In you custom action code, you can
send a message based on the template like this:

Please keep in mind that it is up to the implementation of the output
channel on how to display the defined buttons. E.g. the cmdline
interface can not display buttons or images, but tries to mimic them in
the command line.

You can also use variables in your templates to insert information
collected during the dialogue. You can either do that in your custom python
code or by using the automatic slot filling mechanism. E.g if you
got a template like this:

templates:utter_greet:-text:"Hey,{name}.Howareyou?"

Rasa will automatically fill that variable with a value found in a slot called
name.

If you want entities to be ignored for certain intents, you can
add the use_entities:false parameter to the intent in your domain
file like this:

intents:-greet:{use_entities:false}

This means that entities for those intents will be unfeaturized and therefore
will not impact the next action predictions. This is useful when you have
an intent where you don’t care about the entities being picked up. If you list
your intents as normal without this parameter, the entities will be
featurized as normal.

Note

If you really want these entities not to influence action prediction we
suggest you make the slots with the same name of type unfeaturized

We have a very active support community on Rasa Community Forum
that is happy to help you with your questions. If you have any feedback for us or a specific
suggestion for improving the docs, feel free to share it by creating an issue on Rasa Core
GitHub repository.