botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[.Net SDK, QnA Maker] How to lower confidence score threshold?

Open iantje31 opened this issue 8 years ago • 1 comments

Bot Info

  • SDK Platform: .NET
  • SDK Version: 3
  • Active Channels: Web chat, Microsoft Teams
  • Deployment Environment: Azure Bot Service

Issue Description

Ever since i migrated my bot to the GA QnAmaker portal. It seems like the amount of confidence score required to get an answer is higher than the preview version. Is there any way to lower this.

Reproduction Steps

  1. Ask the bot: Hoe krijg ik FutureFit? image

Expected Behavior

I expect the bot to answer the question.

Actual Results

The bot sends back: No good match in FAQ. While in application insights, the right answer is displayed: image

iantje31 avatar May 28 '18 13:05 iantje31

You will need to update the confidence threshold in your code to a lower value in order for the answers to be returned. The C# QnA template, the default threshold is 50%. Maybe playing with this threshold will help:

public BasicQnAMakerDialog() : base(new QnAMakerService(new QnAMakerAttribute(Utils.GetAppSetting('QnASubscriptionKey'), Utils.GetAppSetting('QnAKnowledgebaseId'), 'No good match in FAQ.', 0.5)))

fanidamj-zz avatar Jun 06 '18 22:06 fanidamj-zz