Skip to content

Commit 745e701

Browse files
author
AWS
committed
Amazon Lex Runtime Service Update: Amazon Lex supports intent classification confidence scores along with a list of the top five intents.
1 parent 1ed030e commit 745e701

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Lex Runtime Service",
4+
"description": "Amazon Lex supports intent classification confidence scores along with a list of the top five intents."
5+
}

services/lexruntime/src/main/resources/codegen-resources/service-2.json

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@
140140
},
141141
"BotAlias":{"type":"string"},
142142
"BotName":{"type":"string"},
143+
"BotVersion":{
144+
"type":"string",
145+
"max":64,
146+
"min":1,
147+
"pattern":"[0-9]+|\\$LATEST"
148+
},
143149
"Button":{
144150
"type":"structure",
145151
"required":[
@@ -303,6 +309,7 @@
303309
"Failed"
304310
]
305311
},
312+
"Double":{"type":"double"},
306313
"ErrorMessage":{"type":"string"},
307314
"FulfillmentState":{
308315
"type":"string",
@@ -394,6 +401,21 @@
394401
}
395402
},
396403
"HttpContentType":{"type":"string"},
404+
"IntentConfidence":{
405+
"type":"structure",
406+
"members":{
407+
"score":{
408+
"shape":"Double",
409+
"documentation":"<p>A score that indicates how confident Amazon Lex is that an intent satisfies the user's intent. Ranges between 0.00 and 1.00. Higher scores indicate higher confidence.</p>"
410+
}
411+
},
412+
"documentation":"<p>Provides a score that indicates the confidence that Amazon Lex has that an intent is the one that satisfies the user's intent.</p>"
413+
},
414+
"IntentList":{
415+
"type":"list",
416+
"member":{"shape":"PredictedIntent"},
417+
"max":4
418+
},
397419
"IntentName":{"type":"string"},
398420
"IntentSummary":{
399421
"type":"structure",
@@ -578,6 +600,20 @@
578600
"location":"header",
579601
"locationName":"x-amz-lex-intent-name"
580602
},
603+
"nluIntentConfidence":{
604+
"shape":"String",
605+
"documentation":"<p>Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the user's intent. The score is between 0.0 and 1.0.</p> <p>The score is a relative score, not an absolute score. The score may change based on improvements to the Amazon Lex NLU.</p>",
606+
"jsonvalue":true,
607+
"location":"header",
608+
"locationName":"x-amz-lex-nlu-intent-confidence"
609+
},
610+
"alternativeIntents":{
611+
"shape":"String",
612+
"documentation":"<p>One to four alternative intents that may be applicable to the user's intent.</p> <p>Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's intent. The intents are sorted by the confidence score.</p>",
613+
"jsonvalue":true,
614+
"location":"header",
615+
"locationName":"x-amz-lex-alternative-intents"
616+
},
581617
"slots":{
582618
"shape":"String",
583619
"documentation":"<p>Map of zero or more intent slots (name/value pairs) Amazon Lex detected from the user input during the conversation. The field is base-64 encoded.</p> <p>Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined by the <code>valueSelectionStrategy</code> selected when the slot type was created or updated. If <code>valueSelectionStrategy</code> is set to <code>ORIGINAL_VALUE</code>, the value provided by the user is returned, if the user value is similar to the slot values. If <code>valueSelectionStrategy</code> is set to <code>TOP_RESOLUTION</code> Amazon Lex returns the first value in the resolution list or, if there is no resolution list, null. If you don't specify a <code>valueSelectionStrategy</code>, the default is <code>ORIGINAL_VALUE</code>.</p>",
@@ -594,7 +630,7 @@
594630
},
595631
"sentimentResponse":{
596632
"shape":"String",
597-
"documentation":"<p>The sentiment expressed in and utterance.</p> <p>When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains the result of the analysis.</p>",
633+
"documentation":"<p>The sentiment expressed in an utterance.</p> <p>When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains the result of the analysis.</p>",
598634
"location":"header",
599635
"locationName":"x-amz-lex-sentiment"
600636
},
@@ -632,6 +668,12 @@
632668
"shape":"BlobStream",
633669
"documentation":"<p>The prompt (or statement) to convey to the user. This is based on the bot configuration and context. For example, if Amazon Lex did not understand the user intent, it sends the <code>clarificationPrompt</code> configured for the bot. If the intent requires confirmation before taking the fulfillment action, it sends the <code>confirmationPrompt</code>. Another example: Suppose that the Lambda function successfully fulfilled the intent, and sent a message to convey to the user. Then Amazon Lex sends that message in the response. </p>"
634670
},
671+
"botVersion":{
672+
"shape":"BotVersion",
673+
"documentation":"<p>The version of the bot that responded to the conversation. You can use this information to help determine if one version of a bot is performing better than another version.</p> <p>If you have enabled the new natural language understanding (NLU) model, you can use this to determine if the improvement is due to changes to the bot or changes to the NLU.</p> <p>For more information about enabling the new NLU, see the <a href=\"https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements\">enableModelImprovements</a> parameter of the <code>PutBot</code> operation.</p>",
674+
"location":"header",
675+
"locationName":"x-amz-lex-bot-version"
676+
},
635677
"sessionId":{
636678
"shape":"String",
637679
"documentation":"<p>The unique identifier for the session.</p>",
@@ -689,6 +731,14 @@
689731
"shape":"IntentName",
690732
"documentation":"<p>The current user intent that Amazon Lex is aware of.</p>"
691733
},
734+
"nluIntentConfidence":{
735+
"shape":"IntentConfidence",
736+
"documentation":"<p>Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the user's intent. The score is between 0.0 and 1.0. For more information, see <a href=\"https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html\">Confidence Scores</a>.</p> <p>The score is a relative score, not an absolute score. The score may change based on improvements to the Amazon Lex natural language understanding (NLU) model.</p>"
737+
},
738+
"alternativeIntents":{
739+
"shape":"IntentList",
740+
"documentation":"<p>One to four alternative intents that may be applicable to the user's intent.</p> <p>Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's intent. The intents are sorted by the confidence score.</p>"
741+
},
692742
"slots":{
693743
"shape":"StringMap",
694744
"documentation":"<p> The intent slots that Amazon Lex detected from the user input in the conversation. </p> <p>Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined by the <code>valueSelectionStrategy</code> selected when the slot type was created or updated. If <code>valueSelectionStrategy</code> is set to <code>ORIGINAL_VALUE</code>, the value provided by the user is returned, if the user value is similar to the slot values. If <code>valueSelectionStrategy</code> is set to <code>TOP_RESOLUTION</code> Amazon Lex returns the first value in the resolution list or, if there is no resolution list, null. If you don't specify a <code>valueSelectionStrategy</code>, the default is <code>ORIGINAL_VALUE</code>.</p>"
@@ -724,9 +774,31 @@
724774
"sessionId":{
725775
"shape":"String",
726776
"documentation":"<p>A unique identifier for the session.</p>"
777+
},
778+
"botVersion":{
779+
"shape":"BotVersion",
780+
"documentation":"<p>The version of the bot that responded to the conversation. You can use this information to help determine if one version of a bot is performing better than another version.</p> <p>If you have enabled the new natural language understanding (NLU) model, you can use this to determine if the improvement is due to changes to the bot or changes to the NLU.</p> <p>For more information about enabling the new NLU, see the <a href=\"https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements\">enableModelImprovements</a> parameter of the <code>PutBot</code> operation.</p>"
727781
}
728782
}
729783
},
784+
"PredictedIntent":{
785+
"type":"structure",
786+
"members":{
787+
"intentName":{
788+
"shape":"IntentName",
789+
"documentation":"<p>The name of the intent that Amazon Lex suggests satisfies the user's intent.</p>"
790+
},
791+
"nluIntentConfidence":{
792+
"shape":"IntentConfidence",
793+
"documentation":"<p>Indicates how confident Amazon Lex is that an intent satisfies the user's intent.</p>"
794+
},
795+
"slots":{
796+
"shape":"StringMap",
797+
"documentation":"<p>The slot and slot values associated with the predicted intent.</p>"
798+
}
799+
},
800+
"documentation":"<p>An intent that Amazon Lex suggests satisfies the user's intent. Includes the name of the intent, the confidence that Amazon Lex has that the user's intent is satisfied, and the slots defined for the intent.</p>"
801+
},
730802
"PutSessionRequest":{
731803
"type":"structure",
732804
"required":[

0 commit comments

Comments
 (0)