Amazon Lex Model Building V2

2024/02/29 - Amazon Lex Model Building V2 - 3 updated api methods

Changes  This release makes AMAZON.QnAIntent generally available in Amazon Lex. This generative AI feature leverages large language models available through Amazon Bedrock to automate frequently asked questions (FAQ) experience for end-users.

CreateIntent (updated) Link ¶
Changes (both)
{'qnAIntentConfiguration': {'bedrockModelConfiguration': {'modelArn': 'string'},
                            'dataSourceConfiguration': {'bedrockKnowledgeStoreConfiguration': {'bedrockKnowledgeBaseArn': 'string'},
                                                        'kendraConfiguration': {'exactResponse': 'boolean',
                                                                                'kendraIndex': 'string',
                                                                                'queryFilterString': 'string',
                                                                                'queryFilterStringEnabled': 'boolean'},
                                                        'opensearchConfiguration': {'domainEndpoint': 'string',
                                                                                    'exactResponse': 'boolean',
                                                                                    'exactResponseFields': {'answerField': 'string',
                                                                                                            'questionField': 'string'},
                                                                                    'includeFields': ['string'],
                                                                                    'indexName': 'string'}}}}

Creates an intent.

To define the interaction between the user and your bot, you define one or more intents. For example, for a pizza ordering bot you would create an OrderPizza intent.

When you create an intent, you must provide a name. You can optionally provide the following:

  • Sample utterances. For example, "I want to order a pizza" and "Can I order a pizza." You can't provide utterances for built-in intents.

  • Information to be gathered. You specify slots for the information that you bot requests from the user. You can specify standard slot types, such as date and time, or custom slot types for your application.

  • How the intent is fulfilled. You can provide a Lambda function or configure the intent to return the intent information to your client application. If you use a Lambda function, Amazon Lex invokes the function when all of the intent information is available.

  • A confirmation prompt to send to the user to confirm an intent. For example, "Shall I order your pizza?"

  • A conclusion statement to send to the user after the intent is fulfilled. For example, "I ordered your pizza."

  • A follow-up prompt that asks the user for additional activity. For example, "Do you want a drink with your pizza?"

See also: AWS API Documentation

Request Syntax

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

Parameters

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

rtype

dict

returns

Response Syntax

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

Response Structure

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

DescribeIntent (updated) Link ¶
Changes (response)
{'qnAIntentConfiguration': {'bedrockModelConfiguration': {'modelArn': 'string'},
                            'dataSourceConfiguration': {'bedrockKnowledgeStoreConfiguration': {'bedrockKnowledgeBaseArn': 'string'},
                                                        'kendraConfiguration': {'exactResponse': 'boolean',
                                                                                'kendraIndex': 'string',
                                                                                'queryFilterString': 'string',
                                                                                'queryFilterStringEnabled': 'boolean'},
                                                        'opensearchConfiguration': {'domainEndpoint': 'string',
                                                                                    'exactResponse': 'boolean',
                                                                                    'exactResponseFields': {'answerField': 'string',
                                                                                                            'questionField': 'string'},
                                                                                    'includeFields': ['string'],
                                                                                    'indexName': 'string'}}}}

Returns metadata about an intent.

See also: AWS API Documentation

Request Syntax

client.describe_intent(
    intentId='string',
    botId='string',
    botVersion='string',
    localeId='string'
)
type intentId

string

param intentId

[REQUIRED]

The identifier of the intent to describe.

type botId

string

param botId

[REQUIRED]

The identifier of the bot associated with the intent.

type botVersion

string

param botVersion

[REQUIRED]

The version of the bot associated with the intent.

type localeId

string

param localeId

[REQUIRED]

The identifier of the language and locale of the intent to describe. The string must match one of the supported locales. For more information, see Supported languages.

rtype

dict

returns

Response Syntax

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

Response Structure

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

UpdateIntent (updated) Link ¶
Changes (both)
{'qnAIntentConfiguration': {'bedrockModelConfiguration': {'modelArn': 'string'},
                            'dataSourceConfiguration': {'bedrockKnowledgeStoreConfiguration': {'bedrockKnowledgeBaseArn': 'string'},
                                                        'kendraConfiguration': {'exactResponse': 'boolean',
                                                                                'kendraIndex': 'string',
                                                                                'queryFilterString': 'string',
                                                                                'queryFilterStringEnabled': 'boolean'},
                                                        'opensearchConfiguration': {'domainEndpoint': 'string',
                                                                                    'exactResponse': 'boolean',
                                                                                    'exactResponseFields': {'answerField': 'string',
                                                                                                            'questionField': 'string'},
                                                                                    'includeFields': ['string'],
                                                                                    'indexName': 'string'}}}}

Updates the settings for an intent.

See also: AWS API Documentation

Request Syntax

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

Parameters

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

rtype

dict

returns

Response Syntax

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation

Response Structure

# This section is too large to render.
# Please see the AWS API Documentation linked below.

AWS API Documentation