Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [#4568] scoreThreshold no longer works in 4.17.0 and later #4575

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

ceciliaavila
Copy link
Collaborator

@ceciliaavila ceciliaavila commented Nov 30, 2023

Fixes #4568

Description

This PR reverts part of the changes in PR #4208 where the function that filtered the QnAMaker results using the score threshold value set in the QnAMaker options was removed.
It also includes a condition to skip the filter when the returned answer is the QnAMaker default answer.

Specific Changes

  • Adding back the sortAnswersWithinThreshold function in generateAnswerUtils.ts.
  • Restored the call to the sort function in the QnAMaker class before returning the results.

Testing

These images show the results returned when a score threshold is set with a value of 0.65:
image

@ceciliaavila ceciliaavila requested a review from a team as a code owner November 30, 2023 16:24
@coveralls
Copy link

coveralls commented Nov 30, 2023

Pull Request Test Coverage Report for Build 7049330782

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 9 of 9 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 84.645%

Totals Coverage Status
Change from base Build 7048575548: 0.009%
Covered Lines: 20346
Relevant Lines: 22770

💛 - Coveralls

@tracyboehrer tracyboehrer merged commit 363e0c9 into main Nov 30, 2023
14 checks passed
@tracyboehrer tracyboehrer deleted the southworks/fix/score-threshold-filter branch November 30, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scoreThreshold no longer works in 4.17.0 and later
3 participants