QNAMaker Bot - Incorrect DefaultAnswer returned when testing in Webchat

149 Views Asked by At

I have deployed a simple QNA bot and published a knowledgebase via QNAMaker. The bot is working insofar as it is returning the expected answers to questions defined in the KB, both when tested in QNAMaker.ai and the Webchat channel. Unfortunately, I have an issue with the default answer.

I customised the DefaultAnswer (which will used when an answer does not exist in the KB), by navigating to the "App Service" "Application settings" under "Configuration", and then editing the value for the key "DefaultAnswer" to my customised default answer "Please rephrase the question"

When I test in QNAMaker.ai, I get the correct customised DefaultAnswer "Please rephrase the question"

When I test in webchat, I get the standard DefaultAnswer "No QnAMaker answers found."

Has anyone else encountered this issue?

1

There are 1 best solutions below

1
yakherder On

I found the answer myself, but maybe this will help others..

From App Service, I ended up editing the QnAMakerBaseDialog.cs file in the App Service Editor.

I edited the const "DefaultNoAnswer"

public const string DefaultNoAnswer = "Please rephrase the question"

After I made the changes to the online code editor, I redployed the build, (click the console icon on the left vertical menu, type "build.cmd" in the console and hit enter), and then restarted the app service.

https://github.com/microsoft/botframework-sdk/issues/3727