Domains

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

User Guide

Domains

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

An example of a Domain

As an example, the domain created by rasa init has the following yaml definition:

intents:
  - greet
  - goodbye
  - affirm
  - deny
  - mood_great
  - mood_unhappy
  - bot_challenge

responses:
  utter_greet:
  - text: "Hey! How are you?"

utter_cheer_up:
  - text: "Here is something to cheer you up:"
    image: "https://i.imgur.com/nGF1K8f.jpg"

utter_did_that_help:
  - text: "Did that help you?"

utter_happy:
  - text: "Great, carry on!"

utter_goodbye:
  - text: "Bye"

utter_iamabot:
  - text: "I am a bot, powered by Rasa."

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true

What does this mean?

Your NLU model will define the intents and entities that you need to include in the domain. The entities section lists all entities extracted by any entity extractor in your NLU pipeline.

For example:

entities:
   - PERSON          # entity extracted by SpacyEntityExtractor
   - time            # entity extracted by DucklingHTTPExtractor
   - membership_type # custom entity extracted by CRFEntityExtractor
   - priority        # custom entity extracted by CRFEntityExtractor

Slots hold information you want to keep track of during a conversation. A categorical slot called risk_level would be defined like this:

slots:
   risk_level:
      type: categorical
      values:
      - low
      - medium
      - high

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