Understanding RASA-Core stories
Asked Answered
L

2

6

I was trying to understand the examples given in RASA core git. I have seen an example story

  • greet
  • utter_ask_howcanhelp
  • inform{"cuisine": "italian"}
  • utter_on_it
  • utter_ask_location

But I didn't understand what {"cuisine": "italian"} is. Whether it is the default value of the slot or user has to provide italian in the input string. Can anybody help me to understand how to write stories in RASA core

Regards

Linseylinseywoolsey answered 16/2, 2018 at 9:26 Comment(0)
D
8

One of the most powerful features of any dialog flow is stories. This is how you are telling the model what are the possible flows of conversational dialog.

In the questions you have asked about. Clearly the Italian is not the default value. inform{"cuisine": "italian"}

Here you are telling the machine learning engine that you are looking for an Intent 'Inform' which will have a slot named cuisine. Here Italian is an example. At the runtime, it can be anything. You can also have another story line where Intent inform without cuisine slot. That story might ask for cuisine in the next dialog.

Defining the story lines, should not be confused with programming language. It is just an indication for Machine learning algorithms.

More details about using slots can be found here and here

Desouza answered 10/8, 2018 at 10:9 Comment(2)
@Karthik Sunil Good one but any idea how to bring the value that we pass in run time to the chatbot. Example : I am interacting with bot via cmdline and when I type few sentences it has to take that particular word and pass it to the custom action as an argument. I am having a tough time to do that bit :(Baecher
Hi JKC, You need to create a entity slot in utterances and capture it. And you can read the slot variable in action.Desouza
P
3

This story describes how the dialogue model would behave in the case the user said something like "I want to eat Italian food". As you note, the slot "cuisine" is set to the value "italian".

In the restaurant example, the cuisine slot is a simple TextSlot. This means that the dialogue model only gets to see if the slot has a value or not. The behaviour would be exactly the same if the user had asked for chinese food, thai food, or anything else.

If you want the value of a slot to influence the dialogue going forward, you can use a different slot type, e.g. a categorical slot

Perreira answered 17/2, 2018 at 9:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.