Reputation: 316
I have currently integrated LUIS with my chatbot. The scenario is:-
What i want now is, After step 2 in above scenario, depending on INTENT returned from LUIS, I want the follow-up questions to be presented from QnA rather than the BOT. Basically, I want to replace waterfall steps with QnA maker. Is it okay to do so or is it feasible?
The flow is something like described below:- USER:-Create task
-->>>>Intent returned from LUIS
-->>>>Call QnA based on INTENT returned
QnA:-In which project would you like to create task?
USER:- (provides project name)
QnA:- What is the description of the task?
USER:- (provides description)
Upvotes: 3
Views: 298
Reputation: 3030
addressing this part - I want to replace waterfall steps with QnA maker. Is it okay to do so or is it feasible?
The answer is no. QnA is a combination of your knowledge base with a search engine service. it dynamically picks up answers base don questions asked by you.
Now, moving on to a suggestion of a solution for your main question. (this is something I am doing already in my code)
You could catch user info collection before it even goes to the qna maker in your code. You could create prompts specifically for user info, and if your flow determines that it is user info, you branch out into your now user info gathering system (and thereby preventing qna from being triggered).
When it is not user info (or something you dont want to capture) you let the default flow of qna maker to take over.
var tempInputText = activity.Text;
if(tempInputText.Contains("batman") == true)
{
var tempActivityBatman = new Activity();
tempActivityBatman.Text = "did you just ask about batman, " + userProfile.Name + "?";
tempActivityBatman.Type = "message";
//await stepContext.Context.SendActivityAsync(_templateEngine.GenerateActivityForLocale("UnsupportedMessage", userProfile));
await stepContext.Context.SendActivityAsync(tempActivityBatman,cancellationToken);
return await stepContext.NextAsync();
}
The above code sample is a quick dirty code that I used to navigate around for specific words I wanted the chat to divert from the regular code.
Upvotes: 3
Reputation: 2754
QnA Maker vs LUIS
when to use QnA Maker vs LUIS. Fundamentally QnA Maker is a search service, while LUIS is a query understanding service.
· Use QnA Maker: If you have a large corpus of data, from where you need to respond with static content.
· Use LUIS: If you want to be able to trigger a task or a workflow based on the intent of the query.
QnA Maker and LUIS can be used to complement each other, but using a top level dispatch to arbitrate between the two services.
Upvotes: 2