Force Followup Intent after utter

Hey,

I’m writing a bot that will take orders for food delivery. The bot already asks for the zip code to check whether it is in our delivery area at the beginning, so at the end I only need street name and number + name of the customer. It’s hard to train street and family names for entity and intent recognition, so my plan was to utter a message asking for the name (and after this being answered a message asking for the street name and number) and telling RASA that the next input will definitly be e.g. provide_customer_name (or provide_streetname) without writing any training data for said events. Thought about a custom fallback action, checking if last utter was the question for name / address, then setting slots accordingly, but I guess this would mess up the stories

tl;dr: I dont want to provide training data for an intent, because streetnames and family names are very different. I want to take the full message, validate/manipulate its content and set the slot in a custom action myself. Is there a way to force RASA to treat the next input as specific intent?

Ideas how to get this done?

I feel like a form might be perfect for this. I’m not sure why you wouldn’t want to add training data for that intent if you’re going to process it anyways, but you could definitely just capture the user’s message text and add special handling to verify that it’s a valid address by running it through an API like the UPS Address validator inside of the form handler.

You can simply just add the happy path for filling the form out along with some variations and the model should be able to pick that pattern up pretty easily.

Ha! @niveK posted a message as I was typing this. Looks like we’re both on the same page here.

I think what you’re looking to do is create a FormAction and have your bot ask a set of questions including the zip, address and customer name.

You could also have it ask for the items, and really any other things.

1 Like