# Intent not defined in the domain

**URL:** <https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270>\
**Category:** Rasa Open Source\
**Created:** [January 9, 2020, 11:32am UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270 "2020-01-09T11:32:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 9, 2020, 11:32am UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/1 "2020-01-09T11:32:24Z")

</div>

Hi

I have recently upgraded my RASA:

Using `pip install -r requirements_dev.txt` I installed the following packages and their dependencies:

```auto
rasa==1.6.1
spacy==2.1.8
rasa-sdk==1.6.0
numpy==1.16.0
python-socketio==4.3.1
python-engineio==3.9.3
livereload
pytest==5.2.2
cx_Oracle==7.2.2
python-dateutil==2.8.0
multidict==4.6.1

```

To start the chatbot I did this:

**Terminal 1:**

```auto
rasa train 

```

**Terminal 2:**

```auto
rasa run --endpoints endpoints.yml --credentials credentials.yml --cors "*"

```

**Terminal 3:**

```auto
rasa run actions --actions actions

```

**Terminal 4:**

```auto
livereload

```

After loading the bot in the browser I start to chat with it. Afterwards I get the following warnings in terminal 2:

```auto
UserWarning: Interpreter parsed an intent 'name:' that is not defined in the domain.

UserWarning: Interpreter parsed an intent 'name_last:' that is not defined in the domain.

UserWarning: Interpreter parsed an intent 'street_name:' that is not defined in the domain.

UserWarning: Interpreter parsed an intent 'house_number:' that is not defined in the domain.

```

This is strange, since these intents are clearly defined in my domain-file:

domain.yml:

```auto
intents:
- name
- name_last
- street_name
- house_number

```

I tried using different formats but this was not helpful.

When I did `rasa train` it says that it found 37 distinct intens. One of them is the intent `name`, the other intens listed above are not mentioned.

It was never a problem. Maybe the new version has some requirements I do not know about?

Hope you can help me!

---

<div class="post-metadata">

**Author:** ![varunsapre10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/varunsapre10/32/6520_2.png) [@varunsapre10](https://forum.rasa.com/u/varunsapre10)\
**Post date:** [January 9, 2020, 11:46am UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/2 "2020-01-09T11:46:20Z")

</div>

Did you add the intents in nlu.md file?

example:

## intent:greet

- hey
- hello
- heya

---

<div class="post-metadata">

**Author:** ![Mappi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mappi/32/6579_2.png) [@Mappi](https://forum.rasa.com/u/Mappi)\
**Post date:** [January 9, 2020, 12:27pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/3 "2020-01-09T12:27:07Z")

</div>

> [@Chatbot\_Ra](#):
>
> an intent ‘name:’
> 
> an intent ‘name\_last:’

Did you accidently add a colon in your training data with those intents? The interpreter should parse ‘name’ and not ‘name:’

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 9, 2020, 1:43pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/4 "2020-01-09T13:43:54Z")

</div>

@ [varunsapre10](http://forum.rasa.com/u/varunsapre10) Yes and no. I just realized, that the intents only specified in domain.yml file were not found during training. However, I did so all the time and it was fine in previous versions.

Therefore, I have just included the intents in nlu.md file as well. However, I am not realy sure if these are actually intents. I use them effectively as slots that have to be filled.

- Bot asks for the name. User types name. Bot saves name in slot name.
- Bot asks for the last name. User types his last name. Bot saves last name in slot name\_last.
- etc.

In domain.yml file:

```auto
intents:
- name
- name_last
- street_name
- house_number

entities:
- name
- name_last
- street_name
- house_number

slots:
  name:
    type: unfeaturized
  name_last:
    type: unfeaturized
  street_name:
    type: unfeaturized
  house_number:
    type: unfeaturized

actions:
...

forms:
...

templates:

  utter_ask_name:
    - text: What is your first name?
      buttons:
        - title: "FirstName"
          payload: "name"

  utter_ask_name:
    - text: What is your last name?
      buttons:
        - title: "LastName"
          payload: "name_last"

```

Anything wrong with that? I try to set the intent value hard. This is why I am not sure if this realy is an intent. Also intent, entity and slot share all the same name. Not sure if this is good. Not even sure if I have to specify intent, entity and slot for what I want.

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 9, 2020, 1:47pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/5 "2020-01-09T13:47:56Z")

</div>

@Mappi I dont think so! I see why you ask this. I do not understand why the error message is written like this

---

<div class="post-metadata">

**Author:** ![Mappi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mappi/32/6579_2.png) [@Mappi](https://forum.rasa.com/u/Mappi)\
**Post date:** [January 9, 2020, 2:09pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/6 "2020-01-09T14:09:33Z")

</div>

An alternative to your way would be to make a generic intent (people usually do something like “inform”) and just fill in the proper slot depending on the one requested.

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 9, 2020, 2:11pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/7 "2020-01-09T14:11:51Z")

</div>

can you make a super simple example please (similar to the post that I did)? It sounds promising but I am mot sure what you mean excatly

---

<div class="post-metadata">

**Author:** ![Mappi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mappi/32/6579_2.png) [@Mappi](https://forum.rasa.com/u/Mappi)\
**Post date:** [January 9, 2020, 2:31pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/8 "2020-01-09T14:31:29Z")

</div>

There isn’t anything different to the way you are using it right now. You would just define your stories in a similar way, but replace the name/street\_name and house number intents with inform.

```
# Get name of the client
- utter_request_name
* inform # Instead of the "name" intent
- .... save the name

# Get streetname of the client
- utter_request_street_name
* inform # Instead of the "street_name" intent
- .... save the street name

```

The inform intent just represents a user providing some details.

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 10, 2020, 2:19pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/9 "2020-01-10T14:19:35Z")

</div>

@Mappi Hi and sorry for late response. This does not realy work. I need every value in a seperate slot for future reasons.

---

<div class="post-metadata">

**Author:** ![Mappi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mappi/32/6579_2.png) [@Mappi](https://forum.rasa.com/u/Mappi)\
**Post date:** [January 13, 2020, 8:29am UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/10 "2020-01-13T08:29:22Z")

</div>

You can still save every value in a seperate slot. The only thing that would change is the chatbot using the context (utter\_request\_name/utter\_request\_) to determine which slot to save.

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [January 14, 2020, 10:24am UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/11 "2020-01-14T10:24:46Z")

</div>

Can you provide the training data for a couple of those intents?

Also, run `rasa data validate`.

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [January 14, 2020, 3:15pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/12 "2020-01-14T15:15:03Z")

</div>

Hey, all my intents are in the form like this

```auto
## intent:name
- Mein Name ist [Peter](name)
- Ich heisse [Peter](name)
- Ich heiße [Peter](name)
- Man nennnt mich [Peter](name)
- Sie können mich Peter [Peter](name) nennen

```

Running `rasa data validate` gives me:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/c/c9202d6cbda21c3659c1bcd646b89a172257fff0.png)

Above, you can read an _old_ warning, which I think has nothing to do with this, because it used to appear some time before this problem came up, and is not so crucial according to what I found out.

There is a very related problem in [this post](http://forum.rasa.com/t/unable-to-parse-intent-throws-error-rasa-lib-site-packages-rasa-core-processor-py-userwarning-interpreter-parsed-an-intent-hey-that-is-not-defined-in-the-domain-f-interpreter-parsed-an-intent-intent/23477/7), in which the person asks the same question.There I have added most information to my problem.

---

<div class="post-metadata">

**Author:** ![btotharye](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/btotharye/32/5321_2.png) [@btotharye](https://forum.rasa.com/u/btotharye)\
**Post date:** [January 28, 2020, 12:36pm UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/13 "2020-01-28T12:36:43Z")

</div>

So picking back up on this, @Chatbot_Ra do you have any updated data or a repo for this so I can see what you are having? From my experience we should only see these messages when we truly are missing configurations somewhere. I want to help you get this resolved but I need to see your complete data if I can to help on this more.

Is that doable?

---

<div class="post-metadata">

**Author:** ![Chatbot\_Ra](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chatbot_ra/32/2238_2.png) [@Chatbot\_Ra](https://forum.rasa.com/u/Chatbot_Ra)\
**Post date:** [February 10, 2020, 9:41am UTC](https://forum.rasa.com/t/intent-not-defined-in-the-domain/23270/14 "2020-02-10T09:41:47Z")

</div>

Hey, the problem is solved. It was my mistake. Not Rasa’s mistake.

It was the index.html file in which I set the slots hard:

This is how it used to be:

```auto
res.value = `/${slot}:{"${slot}": "${res.value}"}`; // here I set the slot in the frontend
socket.emit('user_uttered', {message: res.value});

```

This is how it should be:

```auto
res.value = `/${slot}{"${slot}": "${res.value}"}`; // here I set the slot in the frontend
socket.emit('user_uttered', {message: res.value});

```

Thanks for all your help! I really appreciate it!
