Skip to content

aws.lex_models.get_utterances_view

Example SQL Queries

SELECT * FROM
aws.lex_models.get_utterances_view
WHERE
"bot_name" = 'VALUE'
AND "bot_versions" = 'VALUE'
AND "status_type" = 'VALUE';

Description

Use the GetUtterancesView operation to get information about the utterances that your users have made to your bot. You can use this list to tune the utterances that your bot responds to.

For example, say that you have created a bot to order flowers. After your users have used your bot for a while, use the GetUtterancesView operation to see the requests that they have made and whether they have been successful. You might find that the utterance "I want flowers" is not being recognized. You could add this utterance to the OrderFlowers intent so that your bot recognizes that utterance.

After you publish a new version of a bot, you can get information about the old version and the new so that you can compare the performance across the two versions.

Utterance statistics are generated once a day. Data is available for the last 15 days. You can request information for up to 5 versions of your bot in each request. Amazon Lex returns the most frequent utterances received by the bot in the last 15 days. The response contains information about a maximum of 100 utterances for each version.

If you set childDirected field to true when you created your bot, if you are using slot obfuscation with one or more slots, or if you opted out of participating in improving Amazon Lex, utterances are not available.

This operation requires permissions for the lex:GetUtterancesView action.

Table Definition

Column NameColumn Data Type
bot_name Required Input Column

The name of the bot for which utterance information was returned.

VARCHAR
bot_versions Required Input Column

An array of bot versions for which utterance information should be returned. The limit is 5 versions per request.

VARCHAR[]
Show child fields
bot_versions[]
status_type Required Input Column

To return utterances that were recognized and handled, use Detected. To return utterances that were not recognized, use Missed.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

utterances

An array of UtteranceList objects, each containing a list of UtteranceData objects describing the utterances that were processed by your bot. The response contains a maximum of 100 UtteranceData objects for each version. Amazon Lex returns the most frequent utterances received by the bot in the last 15 days.

STRUCT(
"bot_version" VARCHAR,
"utterances" STRUCT(
"utterance_string" VARCHAR,
"count" BIGINT,
"distinct_users" BIGINT,
"first_uttered_date" TIMESTAMP_S,
"last_uttered_date" TIMESTAMP_S
)[]
)[]
Show child fields
utterances[]
Show child fields
utterances[].bot_version

The version of the bot that processed the list.

utterances[].utterances[]
Show child fields
utterances[].utterances[].count

The number of times that the utterance was processed.

utterances[].utterances[].distinct_users

The total number of individuals that used the utterance.

utterances[].utterances[].first_uttered_date

The date that the utterance was first recorded.

utterances[].utterances[].last_uttered_date

The date that the utterance was last recorded.

utterances[].utterances[].utterance_string

The text that was entered by the user or the text representation of an audio clip.