Please correct me if I am wrong. As far as I understand, rasa determines the next action based on the intent, slots (whether it is filled or not) and previous actions.
Let’s take an example of a bot which answers questions of any given country. E.g: “What is the GDP of India in 2017?”, “What was the life expectancy in Germany in 2001?” etc. In this case, we have 1 intent (“ask_value”), 4 entities and corresponding slots (“time”, “country”, “economy_metric”, “health_metric”) and 2 actions (“action_economy_metric_value”, “action_health_metric_value”).
Conversation flow:
“What is the GDP of India in 2017?”
intent = “ask_value”
slots filled = “time”, “country”, “economy_metric”
next action = “action_economy_metric_value”
“What was the life expectancy in Germany in 2001?”
intent = “ask_value”
slots filled = “time”, “country”, “economy_metric”, “health_metric”
The problem is that the “economy_metric” slot was filled because of the 1st question and remains filled. Rasa sees that both “economy_metric” and “health_metric” slots are filled and gets confused while deciding the next action. If “economy_metric” slot wasn’t filled, it could have easily decided that the next action is “action_health_metric_value”.
Am I missing something here? If not, how do we deal with this situation?
Thanks for the reply Virendra. This would solve the problem but it will create a new one. I want the bot to remember common slots like time and country. E.g:
“What is the GDP of India in 2017?”
“What is its average income?”
“What was the life expectancy in 2001?”
I want the bot to remember that country=India and the time=2017 for 2nd question and country=India in Q3. AllSlotsReset() will clear all the previous information.
One solution (which I have implemented in-house) is to have two classes of entities (and slots): common slots and specific slots. The former won’t be cleared after every question and the latter will be cleared after every question.
I was wondering whether there is a better solution. I believe that this a good feature to have in rasa_core.