and I want to select the action based on the entity “concepto” sinche the intent “description” is the same in both cases.
After train, Rasa core don’t select the appropiate actions even though the tracker have the entity.
I get this
user intent: descripcion | user entities: (‘concepto’,) | previous action name: action_listen
Do I have the entity value in the second argument? lik (‘concepto’,‘sede electronica’) for example
There’s a subtle difference between deciding the next action based on entities vs. slots. Slots can direct a story based on both the name of the slot and its value, depending on the featurization. Entities can only direct a story based on the name, value is not taken into consideration.
What you can do, is create a categorical slot of the same name:
slots:
concepto:
type: categorical
values:
- clave firma
- sede electronica
This slot will be autofilled when the entity concepto is extracted, and you can then direct your stories based on the slot value:
Thanks. I understand it now.
I have seen that you can use the value of the entity in stories here: Stories and I thought that it was enough.
Besides, I have seen this: Domain where the example says: “This means the following two stories are equal:”
What’s the difference?
Are referring to a slot of typetext. That means, it is featurized one way if there is any value, and another way if it is empty. Categorical slot types are different.
I’m taking the topic to ask a second related question: It’s possible to activate an action depending on two values of a categorical variable? I mean, in first example, if I have concepto as categorical variable with [“clave firma”, “sede electronica”, “chatbot”, “email”] values, how do I trigger the same action when “chatbot” OR “email” is in the sentence?
Do I have to do two stories?
One thing to note (and I agree that this is confusing, and I recommend being explicit in your stories regardless), there is one case where specifying the entity value is necessary, and therefore supported - if you are autofilling e.g. a categorical slot with your entity, and you specify a value for the entity that matches directly one of the categories in your categorical slot, you can leave out the slot_was_set step; it is assumed.
Please see the Note in the documentation (linked above) for auto-filliing + influence_conversation: true.