UserWarning: Interpreter parsed an entity '"user_name"' which is not defined in the domain. Please make sure all entities are listed in the domain

This error is showing up relentlessly in when I run rasa shell :

UserWarning: Interpreter parsed an entity '"user_name"' which is not defined in the domain. Please make sure all entities are listed in the domain.

Here is my domain.yml:

version: "2.0"

intents:
  - greet
  - give_name:
      use_entities: user_name

entities:
  - user_name

slots:
  user_name:
    type: text

responses:
  utter_greet:
  - text: "Hey! I'm eli. What's your name?"

  utter_how_can_i_help:
  - text: "How can I help you, {user_name}?"

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: false

Any ideas?

Rasa Version     : 2.0.6
Rasa SDK Version : 2.0.0
Rasa X Version   : None
Python Version   : 3.8.6

Hey @agm

Could you please also attach your NLU and Stories training data files?

Sure!

version: “2.0”

nlu:
- intent: greet
  examples: |
    - hey
    - hello
    - hi
    - hello there
    - good morning
    - good evening
    - moin
    - hey there
    - let's go
    - hey dude
    - goodmorning
    - goodevening
    - good afternoon
    - yo yo
    - yo

- intent: give_name
  examples: |
    - I'm [Kelsey]("user_name")
    - Hi, I'm [Mary Grace]("user_name")
    - Hello, my name is [Arthur]("user_name")
    - [Thomas]("user_name")
    - [Sarah Elizabeth]("user_name")
    - I'm [John Peter]("user_name")
    - You can call me [Andrew]("user_name")
    - My name is [Alex]("user_name")

Rules:

version: "2.0"

rules:

- rule: Greet the user
  steps:
  - intent: greet
  - action: utter_greet

Stories:

version: "2.0"

stories:

- story: introductions
  steps:
  - intent: greet
  - action: utter_greet
  - intent: give_name
  - action: utter_how_can_i_help

Hi @agm

Try removing the surrounding double quotes in the entity annotation user_name.

1 Like

Worked perfectly! Thanks!