Skip to main content Skip to complementary content

Creating a Cohere (Amazon Bedrock) connection

To communicate with Cohere, create a connection to the Cohere (Amazon Bedrock) analytics source. Create the connection in the hub, Data load editor, or Script editor.

Data received from these connections can be used in the load script and in chart expressions to enhance your Qlik Sense analytics apps.

Configurations and configurable settings

Set up your Cohere (Amazon Bedrock) analytics connection with one of the following configurations. Each connection can consist of a single configuration.

More information about model types, and their intended purposes, can be found in the official Cohere documentation: Models

Cohere - Generate

Use this configuration to access the standard Command models from Cohere.

See the Amazon Bedrock and Coheredocumentation for more information about the parameters:

Configurable settings in the connection dialog
Field Description
Cohere Model

Select a model to use to generate the responses.

AWS Region Choose the appropriate geographical region where the AWS resources are hosted.
Use FIPS Endpoint (US Regions Only) Select whether communication between the connection and AWS uses encryption compliant with some version of the Federal Information Processing Standard (FIPS).
AWS Access Key

Enter the AWS Access Key ID, which is one part of the access key pair (the other being the secret key) that you will need to provide as credentials to authenticate the AWS account.

AWS Secret Key Enter the AWS Secret Key, which is one part of the access key pair (the other being the Access Key ID) that you will need to provide as credentials to authenticate the AWS account.
Maximum Token Count Set the length of the response generated by the model.
Temperature Control the randomness of the response from the model. The lower the value, the lower the randomness.
p

Also referred to as Top P. Control how probable the token usage is. A lower value leads to higher exclusion of less probable tokens.

A value of 0 or 1.0 indicates the setting is disabled. See external documentation to learn how this setting interacts with the K parameter.

K Also referred to as Top K. Adjust how many token choices are considered when creating the next token in the response. See external documentation to learn how this setting interacts with the p parameter.
Association Field

Specify an Association Field, a field from the input data table containing a unique identifier.

It is required to include this field in the source data when making an endpoint request for the results table returned to be associated with the source field table using a key. The designated field will be returned as a field in the response and enable the response to be associated with the source data in the data model. This can be any field with a unique ID, either from the source data or as part of the table load process.

Name The name of the connection. The default name is used if you do not enter a name.

Cohere - Embed

Use this configuration to access Cohere's Embed models. These are also sometimes referred to as Representation models. These models generate embeddings and can help with text classification tasks.

See the Amazon Bedrock and Cohere documentation for more information about the parameters:

Configurable settings in the connection dialog
Field Description
Cohere Embed Model

Select a model to use to generate the responses.

AWS Region Choose the appropriate geographical region where the AWS resources are hosted.
Use FIPS Endpoint (US Regions Only) Select whether communication between the connection and AWS uses encryption compliant with some version of the Federal Information Processing Standard (FIPS).
AWS Access Key

Enter the AWS Access Key ID, which is one part of the access key pair (the other being the secret key) that you will need to provide as credentials to authenticate the AWS account.

AWS Secret Key Enter the AWS Secret Key, which is one part of the access key pair (the other being the Access Key ID) that you will need to provide as credentials to authenticate the AWS account.
Input Type

Select from an input type from the available list. This is a technical configuration and will depend on your embeddings use case. See the external documentation for details.

The following options are available:

  • Search Document

  • Search Query

  • Classification

  • Clustering

Association Field

Specify an Association Field, a field from the input data table containing a unique identifier.

It is required to include this field in the source data when making an endpoint request for the results table returned to be associated with the source field table using a key. The designated field will be returned as a field in the response and enable the response to be associated with the source data in the data model. This can be any field with a unique ID, either from the source data or as part of the table load process.

Name The name of the connection. The default name is used if you do not enter a name.

Creating a new connection

You can create a connection to the analytic connector from the hub, from Data load editor in an existing app, or from Script editor in an existing script. Follow the steps below to create a connection.

  1. Access the connector through Data load editor or Script editor.

    Click Create new connection and select the Cohere (Amazon Bedrock) connector from the list.

  2. Fill out the connection dialog fields.

  3. Click Create.

The data connection is saved to the space where the app is created, so it can be reused in other Qlik Sense apps and scripts. It is also listed under Data connections in Data load editor or Script editor.

Once you have created the connection, you can use it to load data with the requests and the platform's responses to them. Additionally, you can use it in chart expressions. For more information, see Select and load data from a Cohere (Amazon Bedrock) connection and Using AI21 Labs (Amazon Bedrock) connections in visualization expressions.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!