Keyword filters and custom “Don’t know” answers - QnABot on AWS

Keyword filters and custom “Don’t know” answers

Keyword filters

The keyword filter feature helps the solution to be more accurate when answering questions via Amazon OpenSearch Service, and to admit more readily when it doesn’t know the answer.

The keyword filter feature works by using Amazon Comprehend to determine the part of speech that applies to each word you say to QnABot on AWS. By default, nouns (including proper nouns), verbs, and interjections are used as keywords. Any answer returned by AWS QnABot must have questions that match these keywords, using the following (default) rule:

  • If there are one or two keywords, then all keywords must match.

  • If there are three or more keywords, then 75% of the keywords must match.

If QnABot on AWS can’t find any answers that match these keyword filter rules, then it will admit that it doesn’t know the answer rather than guessing an answer that doesn’t match the keywords. The solution logs every question that it can’t answer so you can see them in the Kibana Dashboard.

Custom “Don’t Know” answers

When QnABot on AWS can’t find an answer, by default you’ll see or hear the response, “You stumped me! Sadly I don’t know how to answer your question”. You can customize this answer by creating a new item in content designer, called the no_hits item.

  1. From content designer, choose ADD to create a new item:

    • Enter ID: CustomNoMatches

    • Enter question: no_hits

    • Enter answer: Terribly sorry, but I don’t know that one. Ask me another.

  2. Choose CREATE to save the item.

  3. Use the web UI to ask: “What are Echo Buds?”