aws-solutions/qnabot-on-aws

Score matching

dangollayan opened this issue · 3 comments

Hi devs!

Is there a way to control the threshold of score? For example, I would like to only proceed to specific QID when the score is above 20
image

Please refer to the implementation guide at https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/
More specifically check the section https://docs.aws.amazon.com/solutions/latest/qnabot-on-aws/modifying-configuration-settings.html with the ES_MINIMUM_SHOULD_MATCH parameter.

@dangollayan I believe score as determined by opensearch is only relative to the other qids identified in the current search. Its not a percentage or anything that can be compared between different searches. Hence there is no mechanism to configure a minimum score result. If keyword matching is enabled, the setting referenced by @fhoueto-amz could be used to control the minimum number of keyword matches required.

@dangollayan You can control the score thresholds when you using embeddings through settings EMBEDDINGS_SCORE_THRESHOLD, EMBEDDINGS_SCORE_ANSWER_THRESHOLD, and EMBEDDINGS_TEXT_PASSAGE_SCORE_THRESHOLD settings.

For more information, please Semantic question matching using text embeddings