I'm trying to create a bot that integrates LUIS whose purpose is to search for recipes and products, but I'm struggling to understand a few concepts.
To begin with, I have an issue regarding the flow of the conversation. Let's say the user asks for a recipe but doesn't specify what products he would like to filter. The bot will check if there are any entities (products) in this utterance and if not, it will reply asking for the specific products. So something like:
User: "I want to see recipes"
Bot: "Please specify the ingredients"
User: "Bananas"
This is where I find my first problem. How will the bot be able to understand that the user's last utterance (bananas) is directed to the Recipes Intent and not the Products one?
To try and work around this, I've trained LUIS to direct these entities to go to the None Intent. I've also created a flag that allows me to detect which was the last Intent the user went through. From this I can redirect the bot to the correct intent.
I feel like there must be a better solution than this. Am I missing something here? Is there a way to keep track of the history of intents used? I've also tried using context.Wait, but I believe the method doesn't receive (or return) a LuisResult, which makes it impossible for me to later detect if there are any entities in the user's message.
My second question is, if it is possible for the user to send a message that won't enter any intent and will just be directed to a certain method?