Creating a retriever for an Amazon Q Business application - Amazon Q Business

Creating a retriever for an Amazon Q Business application

Before you can add data to your Amazon Q Business application, you must create and select the retriever and provision the index. A retriever pulls data from the index in real time during a conversation. An Amazon Q Business application needs to be connected to an index and retriever before you can add data sources or configure features like metadata boosting or document enrichment.

Amazon Q Business provides retrievers for a native index and also for Amazon Kendra indexes. You can choose between selecting an Amazon Q Business retriever and a Amazon Q Business native index or using an already configured Amazon Kendra index as a retriever.

To select a retriever and provision an index, you use the AWS Management Console or the API. If you use the API to create a Amazon Q Business retriever, you must first use the CreateIndex API operation to create and provision an Amazon Q Business index, and then use CreateRetriever to create your Amazon Q Business retriever.

Important

You can't change the retriever or index type for your application environment after your application environment has been created. To change your retriever or index type, you must create a new application environment.

Note

The data sources and indexes available to connect to your application environment change depending on your retriever choice.

For instructions on how to select a retriever and an index, choose a topic based on your retriever preference for Amazon Q.

Creating an Amazon Q Business retriever

To create a Amazon Q Business retriever and an index, you can use either the AWS Management Console, or the CreateIndex and CreateRetriever API operations.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

Console

To create an Amazon Q Business retriever

  1. Sign in to the AWS Management Console and open the Amazon Q Business console.

  2. Complete the steps to create your Amazon Q Business application.

  3. In Applications, select the name of your application from the list of applications.

  4. From your application page, scroll down and select Retriever settings.

  5. From Retriever settings, choose Select retriever.

  6. In the Select retriever to connect data sources modal that opens, do the following:

    1. For Retriever choose Native retriever (Recommended). This option creates an Amazon Q Business index that can connect to the Amazon Q Business supported data sources that you choose.

      Note

      Available data sources when you select this option include all Amazon Q Business supported data connectors and direct document upload.

    2. In Index provisioning, do the following:

      1. Choose between Starter and Enterprise index types based on your use case. For more information on index types, see Index types.

      2. For Number of units – Choose the Number of units that you need. Amazon Q Business charges you based on the document capacity that you choose. If you choose an Enterprise index, You can choose up to 50 units. If you choose a Starter index, you can choose up to 5 units. Each unit is 20,000 documents or 200 MB, whichever is reached first. For more information on index provisioning pricing, see Amazon Q Business pricing.

  7. To create your retriever and index, choose Confirm.

AWS CLI

To create an Amazon Q Business index

aws qbusiness create-index \ --application-id application-id \ --display-name display-name \ --description index-description \ --capacity-configuration units =<index-capacity-units> \ --type ENTERPRISE | STARTER

To create an Amazon Q Business retriever

aws qbusiness create-retriever \ --application-id application-id \ --display-name display-name \ --type NATIVE_INDEX \ --role-arn roleArn \ --configuration nativeIndexConfiguration="{indexId=<created-index-id>}" \ --tags tags

Selecting an Amazon Kendra retriever

To select an existing Amazon Kendra retriever to your Amazon Q Business application environment, you can use the AWS Management Console or the CreateRetriever API operation.

Note

If you use an Amazon Kendra retriever, data in your Amazon Kendra will be connected to your Amazon Q Business application environment. If you choose this option, you can't use Amazon Q Business data connectors or direct document upload for your application environment.

For more information about Amazon Kendra, see the following topics in the Amazon Kendra User Guide and API Reference:

The following tabs provide a procedure for the AWS Management Console and code samples for the AWS CLI.

Console

To create an Amazon Kendra retriever

  1. In Applications, select the name of your application from the list of applications.

  2. From your application page, scroll down and select Retriever settings.

  3. From Retriever settings, choose Select retriever.

  4. In the Select retriever to connect data sources modal that opens, do the following:

    1. In Retriever choose Kendra retriever to use an Amazon Kendra index you have previously created as a retriever. All data sources synced to your Amazon Kendra index will be connected to your Amazon Q Business application environment.

    2. In Amazon Kendra Indexes choose the Amazon Kendra index you want to use as a retriever for your Amazon Q Business application, and then do the following:

      1. For Choose a method to authorize Amazon Q Business – Create and use a new service role to connect Amazon Kendra to Amazon Q Business or use an existing one.

      2. For Service role name – Provide a name for your IAM access role. Or, choose to use the auto-generated role that's provided.

  5. Select Confirm, to connect your Amazon Kendra retriever to your application.

AWS CLI

To create an Amazon Kendra retriever

aws qbusiness create-retriever \ --display-name display-name \ --type KENDRA_INDEX \ --role-arn roleArn \ --configuration kendraIndexConfiguration="{indexId=<kendra-index-id>