sateesh
sateesh

Reputation: 605

How to find out when user has enter wrong input when chatting with bot?

i am developing one Bot Framework related application in that i am showing like near by places for that user enter like this way "show me nearby places" here i am pass the key value "places" to google API and its producing the exact results, But here my question is when user enter wrong input like "show nearby places" and show places nearby me" at this time i want to show message "please enter correct input" for this how to show the user friendly message. please give the proper suggestion for me.

Thanks in advance.

Upvotes: 0

Views: 227

Answers (1)

Sohan
Sohan

Reputation: 1287

You will have to use a NLP tool such as wit.ai, luis.ai or api.ai. The jury is out on which is the best tool so my advice will be to try out all and see for yourself.

You will essentially define stories and tell the NLP engine what the components of a statement are. So if you pass a statement to the NLP engine, it will parse the intents and objects to you.

For example your statement is "show me places nearby". Set your intent as 'nearby' and your entity as 'wit/location'. The tool should recognize variants of the above statement.

You can check out the recipe wit.ai have created for it here.

Else if you want just a string matching mechanism, check if your user's message has the substring 'location' and then show nearby places. Check out gupshup.io which has a Bot Builder that allows you to do this easily. (disclosure: I work there)

Upvotes: 2

Related Questions