Reputation: 499
I have the scenario
In my BOT framework, i handled both LUIS and QnA maker using the following criteria
IF the INTENT is NONE - connect to the QnA maker and get answers
SOME OTHER INTENT - Corresponding answers will be triggered.
It works perfectly fine untill i endup with the following scenario:
1) I have a question in QnA Maker as - how do i search for a hotel
2) in the LUIS utterance search hotels in Newyark - BOT framework has dedicated API method for this intent and get the results based on the selected entity.
Now, I got into trouble - if the user type as 'how do i search for a hotel' - it goes to the LUIS intent instead of QnA maker - IS there any better way to handle this scenario without ambiguity
Here is my sample code:
[LuisIntent("")]
[LuisIntent("None")]
///If NO INTENT MATCHES - CALL QnA Maker
public async Task None(IDialogContext context, LuisResult result)
{
try
{ /* QnA maker call */ }
[LuisIntent("GetHotel")]
///If NO INTENT MATCHES - CALL QnA Maker
public async Task None(IDialogContext context, LuisResult result)
{
try
{ /* API call to get the results */ }
Upvotes: 3
Views: 544
Reputation: 27793
You can try to correct top scoring intent after you update and train your LUIS app, which can help us select the correct intent for the utterance.
After you assign it to correct intent, you can retrain your LUIS and do a new test to check if it shows correct result.
Another approach: handle it in your code logic. If you want to get hotel in specific location when it reach GetHotel intent , you can detect if the returned LUIS result contains location
entity, if no location
entity returned, you can make QnA Maker call to retrieve answer.
Besides, if possible, you can modify your code structure and logic to call QnA Maker first, and if no answer meets a specific threshold score, then call LUIS.
Upvotes: 4