QnAMakerOptions doesn't reset filters values
See original GitHub issueVersion
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
[bug]
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Ok, had time to get a repro properly this time. ^ 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 😃