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: [#6792] Composer Bot with QnA Intent recognized triggers duplicate QnA queries #6793

Merged
merged 2 commits into from
May 28, 2024

Conversation

sw-joelmut
Copy link
Collaborator

Fixes #6792

Description

This PR fixes an issue where QnA traces and requests to the CQA service were duplicated.
This issue was related to how the QnA Intent recognized trigger is structured, it contains a TextInput and an Emit Custom Event. Both actions emit an "activityReceived" event, the first when an activity is received as a prompt response, and the second on purpose, which both execute the "recognized" functionality that triggers the duplication.

Specific Changes

  • Updated AdaptiveDialog to avoid reprocessing recognized activities by adding a condition if the recognized event was already processed.
  • Added unit tests to validate the new condition works.

Testing

The following image shows how it emits the double trace, and how it behaves after the fix.
image

@sw-joelmut sw-joelmut added the Automation: Parity with js The PR needs to be ported to JS label May 16, 2024
@sw-joelmut sw-joelmut requested a review from a team as a code owner May 16, 2024 15:12
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 389235

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 61 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.009%) to 78.166%

Files with Coverage Reduction New Missed Lines %
/libraries/AdaptiveExpressions/LRUCache.cs 4 87.18%
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/AdaptiveDialog.cs 57 88.72%
Totals Coverage Status
Change from base Build 389234: -0.009%
Covered Lines: 26184
Relevant Lines: 33498

💛 - Coveralls

@tracyboehrer tracyboehrer merged commit 411e092 into main May 28, 2024
13 checks passed
@tracyboehrer tracyboehrer deleted the southworks/fix/qna-double-trace branch May 28, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation: Parity with js The PR needs to be ported to JS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Composer Bot with QnA Intent recognized triggers duplicate QnA queries
3 participants