I am currently facing a new feature for a chatbot. The feature is that sometimes, the user can ask for the same information of another location, example:
User: How many habitants are in Madrid?
Bot: Madrid has XXXXX habitants
User: And Barcelona?
Bot: Barcelona has ....
User: And Zaragoza?
And continuing in that way. How can I approach this. I thought about deactivating last executed action so in my story I am always expecting the intent another_city until I got another one but I don’t think its the best option. Any recommendations??
Hi @AlvaroMonteagudo. For this situation I would suggest having an intent for these follow-up questions (the way you did with another_city works well). This intent will simply update the entity and slot value and the action_population should extract the data for a correct city. Do you have any other situations where the users would ask similar questions about something else other than population?
Yes, for example, asking for the surface of a city, the major, the address, email, fax of the town hall. My fear is that whenever a user asks for another city, the story ends so if the user asks for another city, the Core of my agent would not know what story to start because there is no one declared with another_city at the beginning.
I only think about the deactivate function within an action, I did not try yet to do this because I am setting up other stuff but wanted to know your thoughts on this solution I came up with
The thing is that I don’t know how many times a user is going to request info for another city, it can be 3 as your example, but it could be 5, 15 or even 100, and there is my problem, how stories can handle that variability in the number of times that a user would repeat an intent.
may I ask what was you solution to this problem? I want to do something very similar. I’m not sure ahead how many consequent questions will be asked from the users. I’m guessing after enough training data, you don’t have to hardcode the number of another_locations. Is this true? If so, but how much is enough?