Interaction Model Schema
The interaction model schema is the JSON representation of your custom voice interaction model. The schema has the same structure as the model you create with the Alexa developer console. You can also create and modify the interaction model schema with ASK CLI commands or with the Interaction Model Management REST API.
For more details about custom voice interaction models, see About Voice Interaction Models.
Interaction model object
Property | Description | Type | Required |
---|---|---|---|
|
Conversational primitives for the skill. |
|
Yes |
|
Rules for conducting a multi-turn dialog with the user. |
|
No |
|
Cues to the user on behalf of the skill for eliciting data or providing feedback. |
Array of |
No |
LanguageModel object
Property | Description | Type | Required |
---|---|---|---|
|
Name used to invoke the skill. |
String |
Yes |
|
Intents and their slots. |
Array of objects |
Yes |
|
Name of the intent. |
String |
Yes |
|
List of slots defined for the intent. |
Array of Slot objects |
No |
|
Sample utterances for the intent. |
Array of strings |
No |
|
List of custom slot types defined in the intent. |
Array of objects |
No |
|
Name of the custom slot type. |
String |
Yes |
|
List of representative values for the slot. |
Array of SlotTypeValue objects |
No |
|
Definition of supplier that provides slot values. |
Supplier object |
No |
|
Optional settings for the interaction model. Available in supported locales. |
Object |
No |
|
Identifies the |
Object |
Yes |
|
Sensitivity level. The higher the level, the more customer utterances that aren't supported by the skill are captured by |
Object |
Yes |
Slot object
Property | Description | Type | Required |
---|---|---|---|
|
Name of the slot. |
String |
Yes |
|
Slot type. The type can be an Amazon built-in slot type or a custom slot type. |
String |
No |
|
Sample utterances for the slot. |
Array of strings |
No |
|
Determines whether this slot allows single values or multiple values. |
Object |
No |
|
Indicates whether the slot allows multiple values. |
Boolean |
Yes |
SlotTypeValue object
Property | Description | Type | Required |
---|---|---|---|
|
Custom slot type value ID. |
String |
No |
|
Describes a value of a custom slot type and optional synonyms for the value. |
Object |
Yes |
|
Expected value for a custom slot type. |
Object |
Yes |
|
List of synonyms for the |
Array of strings |
No |
Supplier object
Property | Description | Type | Required |
---|---|---|---|
|
Type of supplier. |
String |
Yes |
|
Catalog reference definition when type is |
Object |
Yes |
|
Identifies the catalog. |
String |
Yes |
|
Version of the catalog. |
String |
Yes |
Dialog object
Property | Description | Type | Required |
---|---|---|---|
|
List of intents that have dialog rules associated with them. |
Array of |
Yes |
|
Specifies whether dialogs in this skill should be automatically delegated to Alexa or left to the skill. |
String |
Yes |
DialogIntent object
Property | Description | Type | Required |
---|---|---|---|
|
Name of the intent that has dialog rules. |
String |
Yes |
|
Specifies whether dialogs in this intent should be automatically delegated to Alexa. |
String |
No |
|
List of slots in this intent that have dialog rules. |
Array of DialogSlotItems objects |
No |
|
Indicates whether Alexa should ask for confirmation of the intent. |
Boolean |
No |
|
Confirmation prompts associated with the intent. |
Map |
No |
|
Confirmation prompts associated with the intent. |
String |
No |
DialogSlotItems object
Property | Description | Type | Required |
---|---|---|---|
|
Name of the slot that has dialog rules. |
String |
Yes |
|
Slot type. |
String |
Yes |
|
Indicates whether Alexa should ask for elicitation of the slot value. |
Boolean |
No |
|
Indicates whether Alexa should ask for confirmation of the slot value. |
Boolean |
No |
|
Confirmation and elicitation prompts associated with the slot. |
Object |
No |
|
Prompt ID for the elicitation prompt. |
String |
No |
|
Prompt ID for the confirmation prompt. |
String |
No |
|
List of validations for the slot. |
Array of objects |
No |
|
Identifies the type of validation. |
String |
Yes |
|
Value to compare to. |
String |
No |
|
Set of values to validate against. |
Array of strings |
No |
|
Start of the duration interval.
|
Array of strings |
No |
|
End of the duration interval.
|
Array of strings |
No |
|
Prompt ID to play to the user if validation fails. |
String |
Yes |
Prompt object
Property | Description | Type | Required |
---|---|---|---|
|
Identifier of the prompt. |
String |
Yes |
|
List of variations of the prompt. |
Array of objects |
Yes |
|
Type of prompt. |
String |
Yes |
|
Text that Alexa says to prompt the user. |
String |
Yes |
Example interaction model schema
The following example shows an interaction model schema that includes three standard built-in intents, two custom intents, a dialog model, and a custom slot type.
{
"interactionModel": {
"languageModel": {
"invocationName": "my space facts",
"modelConfiguration": {
"fallbackIntentSensitivity": {
"level": "LOW"
}
},
"intents": [{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "AMAZON.FallbackIntent",
"samples": []
},
{
"name": "AMAZON.StartOverIntent",
"samples": []
},
{
"name": "GetNewFactIntent",
"slots": [],
"samples": [
"Give me a fact",
"tell me a fact"
]
},
{
"name": "GetTravelTime",
"slots": [{
"name": "DepartingPlanet",
"type": "Planet",
"samples": [
"I'm starting from {DepartingPlanet} ",
"{DepartingPlanet} ",
"I'm going from {DepartingPlanet} to {ArrivingPlanet} "
]
},
{
"name": "ArrivingPlanet",
"type": "Planet",
"samples": [
"I'm going to {ArrivingPlanet} ",
"{ArrivingPlanet} "
]
}
],
"samples": [
"calculate travel time",
"how long does it take to travel from {DepartingPlanet} to {ArrivingPlanet} "
]
}
],
"types": [{
"name": "Planet",
"values": [{
"name": {
"value": "Mercury"
}
},
{
"name": {
"value": "Venus"
}
},
{
"name": {
"value": "Earth"
}
},
{
"name": {
"value": "Mars"
}
},
{
"name": {
"value": "Jupiter"
}
},
{
"name": {
"value": "Saturn"
}
},
{
"name": {
"value": "Uranus"
}
},
{
"name": {
"value": "Neptune"
}
},
{
"name": {
"value": "Pluto"
}
}
]
}]
},
"dialog": {
"intents": [{
"name": "GetTravelTime",
"confirmationRequired": false,
"prompts": {},
"slots": [{
"name": "DepartingPlanet",
"type": "Planet",
"confirmationRequired": false,
"elicitationRequired": true,
"prompts": {
"elicitation": "Elicit.Intent-GetTravelTime.IntentSlot-DepartingPlanet"
},
"validations": [{
"type": "isNotInSet",
"prompt": "Slot.Validation.596358663326.282490667310.1526107495625",
"values": [
"the sun",
"sun",
"our sun"
]
},
{
"type": "hasEntityResolutionMatch",
"prompt": "Slot.Validation.596358663326.282490667310.1366622834897"
}
]
},
{
"name": "ArrivingPlanet",
"type": "Planet",
"confirmationRequired": false,
"elicitationRequired": true,
"prompts": {
"elicitation": "Elicit.Intent-GetTravelTime.IntentSlot-ArrivingPlanet"
}
}
]
}],
"delegationStrategy": "ALWAYS"
},
"prompts": [{
"id": "Elicit.Intent-GetTravelTime.IntentSlot-DepartingPlanet",
"variations": [{
"type": "PlainText",
"value": "Which planet do you want to start from?"
}]
},
{
"id": "Elicit.Intent-GetTravelTime.IntentSlot-ArrivingPlanet",
"variations": [{
"type": "PlainText",
"value": "Which planet do you want to travel to?"
}]
},
{
"id": "Slot.Validation.596358663326.282490667310.1526107495625",
"variations": [{
"type": "PlainText",
"value": "I can't answer this question about the sun, only planets. Please tell me a planet."
},
{
"type": "PlainText",
"value": "While the sun is the center of our solar system, it is not a planet. Please tell me a planet."
}
]
},
{
"id": "Slot.Validation.596358663326.282490667310.1366622834897",
"variations": [{
"type": "PlainText",
"value": "{DepartingPlanet} is not a planet. Please tell me one of the nine planets in our solar system. "
},
{
"type": "PlainText",
"value": "I don't recognize {DepartingPlanet} as a planet in our solar system. Please tell me a planet."
}
]
}
]
}
}
Related topics
Last updated: Aug 08, 2024