0
votes

I coded a LUIS bot that forward some messages to a Qna maker dialog that enable active learning. It works perfectly when a question return a single answer, but when it detect multiple answers, it doesn't send any message but execute my Resume func.

This works if I use my QnaMaker like a root dialog.

Can you help me ?

Thanks

Here my forward func :

    [LuisIntent("None")]
    [LuisIntent("")]
    public async Task None(IDialogContext context, IAwaitable<IMessageActivity> activity, LuisResult result)
    {
        //Récupération du message
        var messageToForward = await activity;
        var cts = new CancellationTokenSource();
        var faq = new QnADialogWithOverrides();
        //Transfert du message une fois réponse retournée => AfterFAQDialog
        await context.Forward(faq, AfterFAQDialog, messageToForward, CancellationToken.None);
    }

    private async Task AfterFAQDialog(IDialogContext context, IAwaitable<object> result)
    {
        context.Wait(MessageReceived);
    }

My Qna Bot :

    [Serializable]
    [QnAMaker("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxx", "I don't understand this right now!", 0.50, 5)]
    public class QnADialogWithOverrides : QnAMakerDialog
    {
    }

Results :

What I have

What I want

1
unless you show more code it will be impossible to help you. Add the code to QnADialogWithOverrides pleaseEzequiel Jadib
You QnADialogWithOverrides is empty. is that ok?Ezequiel Jadib
Yes I just used the Overrides functions for debugging. The active learning doesn't need overrides functions to work.Adrien H.

1 Answers

0
votes

It seems that this condition from the QnAMakerDialog is not being met and so the dialog is ending via the default message path.

Strange though, that the condition indicates that you don't have answers, but per your screenshot, it seems that might not be the case.

I would try to override the RespondFromQnAMakerResultAsync to see what's going on, since that method is the one in charge of showing the results (which by default, the behavior is to show just the first answer, as seen here).

You can even use the QnADialogWithOverrides code from here.