aws-solutions / qnabot-on-aws

AWS QnABot is a multi-channel, multi-language conversational interface (chatbot) that responds to your customer's questions, answers, and feedback. The solution allows you to deploy a fully functional chatbot across multiple channels including chat, voice, SMS and Amazon Alexa.
https://aws.amazon.com/solutions/implementations/aws-qnabot
Apache License 2.0
401 stars 253 forks source link

Processing pollution of text item passages coming from item answers #669

Closed marcburnie closed 11 months ago

marcburnie commented 12 months ago

Describe the bug There is an issue when you query for text passages while having the answer query also enabled. They should work independently with their specific thresholds and results. However, in the current code, when the query is constructed for the text passages, the answer flag is still active/true. This leads to search results that may have been matched with the answer items instead of just the text passages. If you have a lower threshold for text passages than for answer items and if the match is better against the answer item, then this leads to an unexpected outcome: the answer is returned to the user instead of letting the normal flow run (text passages to be compared against the threshold and then have the LLM compose the final answer).

Please complete the following information about the solution:

To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, "(SO0189) QnABot [...] v0.0.1".

Screenshots If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).

Additional context Add any other context about the problem here.

marcburnie commented 12 months ago

Fix proposed in PR: https://github.com/aws-solutions/qnabot-on-aws/pull/644

marcburnie commented 11 months ago

Fixed as of v5.5.0