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

Creating and selecting a retriever for an Amazon Q Business application

After creating your Amazon Q Business application, you create and select the retriever and provision the index that will power your generative AI web experience. The retriever pulls data from the index in real time during a conversation.

Amazon Q Business provides retrievers for Amazon Kendra indexes and also for a native index. 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, you use the AWS Management Console or the CreateRetriever API operation. If you use the console and choose to use a Amazon Q Business retriever, Amazon Q Business creates an index for you as part of the application configuration process. You can then configure provisioning for the created index.

For easy tracking, you can tag both the retriever and index. 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 retriever.

Important

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

Note

The data sources and indexes available to connect to your application 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 select a Amazon Q Business retriever, you can use either the AWS Management Console, or the CreateIndex and CreateRetrieverAPI 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. Then, for Select retriever, choose Use native retriever – Build an Amazon Q Business retriever for your Amazon Q Business application. 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.

  4. 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.

  5. For Tags – Choose whether you want to add Index tags.

  6. To create your retriever and index, choose Create.

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, you can use the AWS Management Console or the CreateRetriever API operation.

If you use the API, you select and connect your Amazon Kendra retriever when you use the CreateRetriever API operation.

If you use the console, selecting and connecting an Amazon Kendra retriever is a two-step process. This topic provides instructions for the first step: Selecting an Amazon Kendra retriever. For instructions for the second step, see Connecting an Amazon Kendra retriever to an Amazon Q Business application.

Note

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

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. 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. The, in Select retriever choose Use existing retriever – Choose 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.

  4. In Tags – Choose whether you want to add Retriever tags.

  5. To connect your application to your data sources, choose Next.

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>