Rasa: inform{"cuisine": "italian"} is cusisine slot or entity

Created on 8 Mar 2018  路  4Comments  路  Source: RasaHQ/rasa

I am learning supervised bot https://core.rasa.ai/tutorial_supervised.html tutorial.In that they gave below story example.In that what is entity and what is slot inform{"cuisine": "italian"} cuisine is entity or slot? If it is entity than how to define slot in story file.

story_00914561

  • greet

    • utter_ask_howcanhelp

  • inform{"cuisine": "italian"}

    • utter_on_it

    • utter_ask_location

  • inform{"location": "paris"}

    • utter_ask_numpeople

  • inform{"people": "six"}

    • utter_ask_price

Most helpful comment

If you take a look at the contents of restaurant_domain.yml, you could see that cuisine belongs to both entity and slot. Which means, rasa NLU will identify cuisine as an entity (if present in the user message), and will send it to rasa core. rasa core will assign this value to cuisine slot for later use. So, the thumb rule is, if you want store an entity being parsed from user utterance for later use, you should set the same item (like cuisine in this case) as both entity and slot. This part of documentation explains it in detail.

All 4 comments

If you take a look at the contents of restaurant_domain.yml, you could see that cuisine belongs to both entity and slot. Which means, rasa NLU will identify cuisine as an entity (if present in the user message), and will send it to rasa core. rasa core will assign this value to cuisine slot for later use. So, the thumb rule is, if you want store an entity being parsed from user utterance for later use, you should set the same item (like cuisine in this case) as both entity and slot. This part of documentation explains it in detail.

Very good explanation, I'll close this. Let me know if there are any further questions related to this.

Please update the link.

You can find the domain documentation right here http://rasa.com/docs/core/domains/

And the restaurant yaml is here: https://github.com/RasaHQ/rasa_core/blob/master/examples/restaurantbot/restaurant_domain.yml (make sure to choose the correct version on github though - this is the one for the latest master version)

Was this page helpful?
0 / 5 - 0 ratings