Botbuilder-dotnet: Question: Where does the QnA action take the input from?

Created on 4 Aug 2020  路  12Comments  路  Source: microsoft/botbuilder-dotnet

When I add a QnA action, the tutorial shows that by adding an unknown intent trigger. That works fine, but I would like to have an explicit QnA call in my bot, read: I would like to ask my QnA service using a variable as input.

What kind of input does the QnA action use? There seems to be nothing I can use as an input in the QnA action itself, so I believe it uses a predefined input variable.

By the way, this would be an excellent addition to the Bot Framework Composer Docs.

Adaptive Bot Services customer-replied-to customer-reported

All 12 comments

Screen Shot 2020-08-04 at 9 39 58 AM
Screen Shot 2020-08-04 at 9 40 07 AM

Hi @eluchsinger - you can add a QnAAction anywhere inside a flow (see above), but I don't think thats what you're asking about.

As far as what gets sent as input to the action, it's the user's utterance and the knowledge base looks to resolve the utterance to a key in the knowledge-base. You cannot change this value before it gets sent to the knowledgebase.

We're actively making a change to how QnAMaker fits into Composer, allowing a more integrated experience along with language data (.lu).

@cwhitten I have now embedded the QnA Action into the flow and am getting a really interesting behavior. As you can see in the screenshots below, I first read a question and save it into the dialog.question variable. Then I print the variable once before and once after the QnA action and I get the wrong output and the variable is null during the second print.

image

image

@vishwacsena @Stevenic does running the QnaMaker dialog blow away the calling dialog's dialog memory scope?

This is a bug. QnA action should not alter dialog in any way. @pchoudhari can you have someone take a look? Will transfer to dotnet repo.

I would like to add it's not just the dialog's memory. The whole response is somehow duplicated aswell. The last response in the screenshot should start with a 2.

@vishwacsena When QnA Maker can't find an answer it just returns a "No QnAMaker answers found" response. It doesn't influence the dialog state in anyway. It is possible that there is a bug in how the response is handled thereafter at the composer end?

In the scenario when QnA maker does return a multi-prompt answer and user does select one of the prompts, I believe the fallback intent is triggered again and that's why the dialog loop executes again.

@DishaAgarwal can you get someone to debug this? I suspect something in qnamaker dialog is causing the parent adaptive dialog's dialog scope to get overwritten. Also the issue is not with fallback intent triggering or multi-turn etc. In a simple flow, after qnamaker action completes, the dialog state as it was prior to qnamaker action should be available.

I've built a custom service to query QnA via REST, because the QnA Action right now is not good enough to use it in our customer projects. It even seems to throw errors when the Action is deactivated.

Would be happy to hear any news about the debugging and or further advancements with the QnA action.

@vishwacsena We will look into it and get back to you.

@DishaAgarwal - Any update here?

@lauren-mills I apologize for the delay. We tried replicating the issue on new BF SDK and we found that the same issue doesn't occur with the new BF SDK (4.10.*). The relevant screenshots are included below:

image
image

However, the issue is existent on BF SDK (4.9.*) which is used by composer by default. This would probably be fixed in the next composer release.

Meanwhile, this issue can be mitigated by the user on updating the runtime of bot to latest version.

These steps should update the runtime of bot to refer to BF SDK (4.10.*).

With Composer 1.1.1 released this issue should be fixed. Please re-open if you encounter the problem again.

Was this page helpful?
0 / 5 - 0 ratings