Understanding Slots in Stories

I struggle to understand the usage of Slots within stories. I read the blog about it and there is this example:

I dont understand this line:

* inform {"email":"example@example.com"}
    - slot{"email":"example@example.com"}

First of all, what does the inform {“email":"example@example.com”} line even mean? According to Usage of slots in stories the second line (slot{“email":"example@example.com”}) acts as a conditional check if the slot email is set to a value, so what does the first line do?

Also I don’t understand how the slot email can be used in the first line, when the SlotSet-Event is defined one line later.

Can someone clear me up?

Thanks in advance

It means that the user wrote a sentence with the intent “inform” and provided the slot “email” with the value “example@example.com”.

Rasa uses the intents and values of categorical slots to determine the context and select the bot response.

Ok, I got this, but if we already know that the user wrote a sentence with the intent “inform” and gave a value to the email-slot within that sentence i dont understand the second line

- slot{"email":"example@example.com"}

We already know the slot has a present value, so why this second slot-line?


In the event that your NLU picks up the entity “email”, and your domain has a slot with the same name, ‘email’, the slot will be set automatically. In that case you won’t have to include the slot statement in your stories

Hi there, The way I understand it, the line inform is the intent inform with the entity email and the value example@example.com

The line slot actually stores the value of the recognised entity in the slot with the same name.

1 Like