I was trying to understand the examples given in RASA core git. I have seen an example story
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
A story is a representation of a conversation between a user and an AI assistant, converted into a specific format where user inputs are expressed as intents (and entities when necessary), while the assistant's responses and actions are expressed as action names.
Rules are a type of training data used to train your assistant's dialogue management model. Rules describe short pieces of conversations that should always follow the same path. Don't overuse rules.
RASA (25 Part Series) You can use checkpoints to modularize and simplify your stories. Checkpoints can be useful, but do not overuse them. Using lots of checkpoints can quickly make your example stories hard to understand, and will slow down training. Here is an example that contains checkpoints: # stories.yml # ...
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With