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
* inform {"email":"example@example.com"} //this line is just condition that the and here "email" means entity
- slot{"email":"example@example.com"} // this is for setting slot "email"
in rasa entity and slots are two different things if name of entity and slot is same there is no need to specify the -slot{“email":"example@example.com”} but if names for slot and entity are different then second line plays important role
Almost, the line inform doesn’t set virtually a slot. As @tusharvpatil wrote it is a condition needed, that the NLU identifies the intent inform and the entity recogniser gets the entity email. Here the bot knows what the intent was and that there was a recognised entity but the bot uses slots as internal memory to save the entity values.
The process of the bot storing the recognised entity in its internal memory (for using it latter) happens in the slot line.
In principle, you don’t need to save the recognised entities if those values aren’t important, that’s why in the domain file you can specify if an intent uses or not an entity.