I'm playing with the bot framework and the cognitive services from Microsoft by doing a chatbot for Slack.
intent
.It works pretty well for well-known cities. However, for some others, Luis won't match a specific city as a geographyV2
entity (the prebuilt entity I picked).
Because of that the request to the weather API will be failing since no city has been recognised by Luis.
Should I avoid geographyV2
for another entity or can I help Luis in the process?
Here are some classic examples of users inputs:
Here are a few tips based on my experience with that kind of use-cases:
Prebuilt entities are often good accelerators but if you are in a "non-US" context, you often have problems with things not recognized like you said
As a consequence, create your own entity and train your LUIS App with a lot of samples and variations in terms of sentences (don't train it only with the same sentence and just another city name)
You will still have missing values sometimes (or sometimes things that are not cities which are found), but it will be better because as you are in a bot:
if know no entity has been found, you can ask the user "Ok I see that you are looking for the weather, but could you precise where?" and then use directly the result
if you have a wrong city name, you can see it when you call your weather API and also tell your end-user that you did not understand the city properly