Need advice on creating a search filter based form

I need help on creating a domain specific form that creates a search filter based on users input and sends a request to an API and I have a question

Suppose the form asks the user to enter a country name, I can fill a bunch of entities with synonyms and such for the country names to fill the slot but if the user makes a typo that isn’t registered as a synonym, is it possible to pass the user’s input into a custom built classifier to predict the correct Entity?

Like for example:

Form: University Search Country: from_entity

Bot: Which country would you like to study in? User: grrmany (typo for Germany)

grrmany isn’t a registered entity, so the user’s last message gets sent to a classifier and predicts that the user meant Germany

Bot: Did you mean Germany? User: Yes

And the slot gets filled with what the classifier predicts if the user says yes.

I just want to know if something like this is possible to implement.


Hi @BillNyeSenpai, yes this can be implemented using Forms. You can use a custom ValidationForm method (documented here: Forms) to perform any entity checks and use the dispatcher.utter_message function (Dispatcher) to provide any additional messages to the user.

1 Like