What is the proper way to handle LUIS intents when seeking extra information based on conversation state

Using Microsoft Bot Framework, I have a LUIS intent that requires certain information, such as location, etc.

If the user sends a message that gets the right intent, but is missing information, but needs clarification, what is the best way to handle this?

For example, if the user sends a message like "What is in Springfield?" the bot won't be able to determine which city the user is asking about (many cities with the same name but in different states).

The bot could determine that multiple matches exist and just demand that the user to repeat the request with all the required information (which makes each request basically stateless and unintelligent), but it seems like it could ideally remember the state and ask "Which state?" or "Did you mean Missouri or Illinois?"

The problem, of course, is that if the user responds with just the state, what intent will that hit when the second message comes in?

Should it have an intent that is just a straight answer for state? That seems a bit of an odd pattern just to get a specific answer from the user (and would have to be repeated for each specific answer type).

Or should the bot just ignore the second intent and use the conversation history to try and figure out that it is a state name? That seems like a bad practice that wastes a call to LUIS.

What I think the conversation should look like, but I don't know what the architecture should be:

user: What do you have in Springfield?
<hits "stuff" intent>

bot: Did you mean Springfield in Missouri, or Springfield in Illinois?

user: I meant Illinois.
<what intent could this be?>

bot: Great, we have _______.

1 answer

  • answered 2018-10-23 03:55 Mandar Dharmadhikari

    Do you know what data are you expecting from the user based upon the function of the bot? is it a tour guide bot?? IF so maybe you would be better off when you collect the data from the user first hand using form flows