Adding FAQs

Amazon Kendra has a deep learning model that searches specifically for frequently asked questions (FAQ) that have been ingested as independent question-answer pairs. You can add questions and answers (FAQs) directly to your index using the console or the CreateFaq operation.

The data for the FAQ is contained in a file that you store in an Amazon Simple Storage Service (Amazon S3) bucket. You can use comma-separated values (.csv) files (either Basic without attributes or Custom with attributes) or, JSON files. You can find more details and a programmatic example on how to create FAQs in the documentation site.

FAQs do not have the same update scanning capability provided in the built-in connectors. As such, if you change a FAQ file you will need to delete that file from the index and then re-ingest

For this example we will create a custom CSV file that will allow us to add the attribute _source_uri to the results.

We will create a CSV file with the following content:

_question,_answer,_source_uri
Which AWS service has 11 nines of durability?,Amazon S3,https://aws.amazon.com/s3/
What is the AWS Well-Architected Framework?,The AWS Well-Architected Framework enables customers and partners to review their architectures using a consistent approach and provides guidance to improve designs over time.,https://aws.amazon.com/architecture/well-architected/
In what regions is Amazon Kendra available?,"Amazon Kendra is currently available in the following AWS regions: Northern Virginia, Oregon, and Ireland",https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/

You can also download this file here.

  1. Create a folder on your workshop bucket called faqs and upload the csv file.

  1. On the Amazon Kendra console, in the Workshop Index, click on FAQ

  1. Click on “Add FAQ”

  1. Enter a name for the new FAQ

  1. For format select “.csv file - Custom”

  1. Click on “Browse S3” and navigate to the csv file we uploaded:

  1. For role, select “Create a new Role”

  1. Click “Add”

  2. After the FAQ is created you will see a message like this:

  1. Go to the Search Console and try some queries: