question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QnAMakerOptions doesn't reset filters values

See original GitHub issue

Version

4.3.2

Describe the bug

We are working with a bot using QnAMaker class from Microsoft.Bot.Builder.AI.QnA StrictFilters from QnAMakerOptions doesn’t work with an empty value after using it with a filter

To Reproduce

Call GetAnswersAsync using an QnAMakerOptions without any StrictFilter

var options1 = new QnAMakerOptions
{
    Top = 10,
    ScoreThreshold = 0.6f,
};
var response = await _services.QnAServices[QnAMakerKey].GetAnswersAsync(turnContext, options1);
if (response != null && response.Length > 0)
{
    await turnContext.SendActivityAsync($"QnA Results: {response.Length}");
}

Now, make another call with a StrictFilter

var options2 = new QnAMakerOptions
{
    Top = 10,
    ScoreThreshold = 0.6f,
    StrictFilters = new Metadata[] { new Metadata() { Name = "Topic", Value = "sharepoint" } },
};
var response2 = await _services.QnAServices[QnAMakerKey].GetAnswersAsync(turnContext, options2);
if (response2 != null && response2.Length > 0)
{
    await turnContext.SendActivityAsync($"QnA Results: {response2.Length}");
}

Repeat the first call without and StrictFilter

var options3 = new QnAMakerOptions
{
    Top = 10,
    ScoreThreshold = 0.6f,
};
var response3 = await _services.QnAServices[QnAMakerKey].GetAnswersAsync(turnContext, options3);
if (response3 != null && response3.Length > 0)
{
    await turnContext.SendActivityAsync($"QnA Results: {response3.Length}");
}

Expected behavior

From the third call, I expected to have the same results we had on the first one, but for any reason the StrictFilters didn’t reset its values well.

Screenshots

image

[bug]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
cleemullinscommented, May 16, 2019

The PR for this has been merged. The fix will start showing up on our daily build server tonight, and be shipped in the 4.5 cycle currently planned around July 15.

1reaction
Zerrythcommented, May 7, 2019

Ok, had time to get a repro properly this time. image ^ last one should be 4

Still unsure how I wasn’t able to repro it properly last time… But regardless, should have a fix sometime before EoD 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - QnA Maker - Azure AI services
Navigate to the site/wwwroot/Data/QnAMaker/ directory. Remove all the folders whose name begins with rd . Do not delete the following:.
Read more >
How can I pre-filter answers from user input in QnA Maker?
1 Answer 1. Sorted by: Reset to default. Highest score (default) ...
Read more >
'Reset Filters' button doesn't bring back all avai...
At this point it is supposed to show all possible values but it still shows only the applicable values from the selection made...
Read more >
Fix the Reset All Filters Button in Tableau
Sometimes when we create the Reset All Filters button in Tableau, it doesn't initially work. In this video and post I will troubleshoot...
Read more >
Can we Reset filters with dynamic slicer values
Hi, We have a report with 2 tabs, 1 tab is a summary report contains the a slicer (parent program code has values...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found