I’m trying to get a reasonable understanding of how Rasa Core handles stories. I basically have 3 entities - occasion , relationship and gender
Based on the different values of each of these, I’d like to utter certain templates. However, there are times when say occasion is Christmas , and no matter what relationship or gender slots are filled with, I’d still want to use a certain template.
However, the only way I seem to get around this is by entering all permutation values of relationship and gender for a given value of occasion as Christmas .
However when I put in a query for “Where would you suggest I should take my brother for Christmas”, Rasa NLU identifies the slot occasion as Christmas and relationship as brother , and my story line is never called, since now relationship is set to brother . I wouldn’t say its intuitive to permute every possible combination for relationship with occasion as Christmas , rather I’d achieve this programatically through actions then. However, I just thought I’d be able to take the benefit of Rasa stories and understand the concept better.
@flynnJ are your slots categorical? Because if not, then you can put any value in there and rasa_core won’t pay attention to what the value is, but just whether it’s filled or not
After trying a variety of iterations with the slot types, I believe my doubt is more of a fundamental one. Maybe you can help correct me if I am thinking in the right direction.
I am basically trying to make a bot which can give flower suggestions based on the occasion or a relationship. For ex. If the bot is asked to suggest flowers for Valentine’s Day, it’d suggest Red flowers, if asked for a friend, maybe suggest a House Plant, flowers for funeral would be Lilies, etc. so on and so forth.
I initially tried to build the bot with text based slots. Where occasion and relationship were entities and slots with the same names. I ended up writing stories with different combinations of occasion and relationship to make the bot more intuitive.
But the one situation which I potentially want to be handled with the least number of stories (1 story to be precise) is when for ex. occasion is funeral, so no matter what the relationship is, I’d really want the bot to throw the funeral template, since no matter what the relationship entity/slot is filled with (or not filled), I’d want to suggest the same set of flowers.
I then tried the complete setup using categorical slots, I gave all possible values for occasion and relationship in my domain.yml, but I still am in the same boat when I want the funeraloccasion to be handled by the bot.
In both the situations, for the slot occasion value being funeral, I have to permute that with every possible combination of the relationship slot to handle and ensure the funeral template is displayed for any possible combination. Also, in future if I plan to complicate this setup more by adding up 1 more entity, I’ll have to fit that eventually add more permutations with the third entity, unless there is a more intuitive way to handle this?
@flynnJ Have you looked at forms yet? The use case you’re describing sounds like it would work very well with that. Here’s the link to the docs about that: Slot Filling