0
votes

We are using BasicQnAMakerDialog (Azure QnA template) for a QnA bot. It can handle most questions, however when certain questions are asked, there is no reply (not even the default message: No good match found). The bot just hangs.

Scenario:
User: Hello
Bot: Hi
User: Can i do a booking
Bot:
(no reply, nothing!)

Code:

BasicQnAMakerDialog() : base(new QnAMakerService(newQnAMakerAttribute(RootDialog.GetSetting("QnAAuthKey"),Utils.GetAppSetting("QnAKnowledgebaseId"), "", 0, 5,Utils.GetAppSetting("QnAEndpointHostName"))))

Any idea whats wrong?

1
Without having your QnAMaker KB, hard to answer. Can you at least check the QnAMaker endpoint to see its reply when you ask Can i do a bookingNicolas R
'Can i do a booking' gives a reply when querying the endpoint directly, but does not give any answer when using BasicQnAMakerDialogNorwen
Hi @Norwen, you can try to override the RespondFromQnAMakerResultAsync method and check if you can get the matched answer. Or you can use fiddler to capture and monitor traffic to check if the request is sent from QnAMakerDialog as expected.Fei Han

1 Answers

0
votes

The 3rd parameter to QnAMakerAttribute is the default message to show if no results are returned from the service. In the code you shared, you are setting it to "", which would cause no message to be sent. Try changing it to a valid string:

BasicQnAMakerDialog() : base(new 
 QnAMakerService( 
  new QnAMakerAttribute( RootDialog.GetSetting("QnAAuthKey"), 
                         Utils.GetAppSetting("QnAKnowledgebaseId"), 
                         "Default no match message here", 
                         0, 
                         5,
                         Utils.GetAppSetting("QnAEndpointHostName"))))