Intent not defined in the domain

Hi

I have recently upgraded my RASA:

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

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:

rasa train 

Terminal 2:

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

Terminal 3:

rasa run actions --actions actions

Terminal 4:

livereload

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

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:

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!

Did you add the intents in nlu.md file?

example:

intent:greet

  • hey
  • hello
  • heya

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

@ 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:

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.

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

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.

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

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.

1 Like

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

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.

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

Also, run rasa data validate.

Hey, all my intents are in the form like this

## 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:

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, in which the person asks the same question.There I have added most information to my problem.

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?

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:

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:

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!