Interaction Model Schemas
The interaction model resource has the same structure as if you create an interaction model with the developer console or the skill builder. You can create and modify the interaction model resource with ASK CLI commands or with Interaction Model API Operations.
See also: Alexa Skills Kit Command Line Interface and Alexa Skill Management API Overview
Interaction Model
| Field | Type | Description | Required? |
|---|---|---|---|
| languageModel | object | Conversational primitives for the skill | yes |
| dialog | object | Rules for conducting a multi-turn dialog with the user | no |
| prompts | array | Cues to the user on behalf of the skill for eliciting data or providing feedback | no |
languageModel
| Field | Type | Description | Required? |
|---|---|---|---|
| invocationName | string | Invocation name of the skill | yes |
| intents | array | Intents and their slots | yes |
| types | array | Custom slot types | no |
languageModel_intents
| Field | Type | Description | Required? |
|---|---|---|---|
| name | string | Name of the intent | yes |
| slots | array | List of slots within the intent | no |
| samples | array | Sample utterances for the intent | no |
slots
| Field | Type | Description | Required? |
|---|---|---|---|
| name | string | Name of the slot | yes |
| type | string | Type of the slot | yes |
| samples | array | Sample utterances for the slot | no |
types
| Field | Type | Description | Required? |
|---|---|---|---|
| name | string | Name of the custom slot type | yes |
| values | array | List of representative values for the slot. | no |
| valueSupplier | object | Definition of slot value supplier(s). | no |
Type_ValueCatalog
| Field | Type | Description | Required? |
|---|---|---|---|
| type | string | Type of the value supplier. CatalogValueSupplier is the only supported option. | yes |
CatalogValueSupplier
| Field | Type | Description | Required? |
|---|---|---|---|
| valueCatalog | object | The catalog reference definition. | yes |
valueCatalog
| Field | Type | Description | Required? |
|---|---|---|---|
| catalogId | string | The identifier of the catalog. | yes |
| version | string | The version of the catalog. | yes |
value
| Field | Type | Description | Required? |
|---|---|---|---|
| id | string | Identifier for a value of a custom slot type | yes |
| name | object | Describes a value of a custom slot type | yes |
values_name
| Field | Type | Description | Required? |
|---|---|---|---|
| value | string | A value for a custom slot type | yes |
values_synonyms
| Field | Type | Description | Required? |
|---|---|---|---|
| value | string | A value for a custom slot type | yes |
| synonyms | array | List of potential synonyms for a value of a custom slot type | no |
dialog
| Field | Type | Description | Required? |
|---|---|---|---|
| intents | array | List of intents that have dialog rules associated with them. | yes |
| delegationStrategy | string | Specifies whether dialogs in this skill should be automatically delegated to Alexa. This can be ALWAYS (auto-delegation is on for the overall skill) or SKILL_RESPONSE (auto-delegation is off for the overall skill). You can override this setting at the intent level. |
dialog_intents
| Field | Type | Description | Required? |
|---|---|---|---|
| name | string | Name of the intent that has dialog rules | yes |
| delegationStrategy | string | Specifies whether the dialog for this intent should be automatically delegated to Alexa. This can be ALWAYS (auto-delegation is on for this intent) or SKILL_RESPONSE (auto-delegation is off for the intent). When this property is not present, the intent uses the skill-level delegationStrategy. |
|
| slots | array | List of slots in this intent that have dialog rules | no |
| confirmationRequired | boolean | Describes whether confirmation of the intent is required | no |
| prompts | Map | Collection of prompts for this intent | no |
dialog_intent_prompt_type
| Field | Type | Description | Required? |
|---|---|---|---|
| confirmation | string | Enum value in the dialog_intents map to reference the confirmation prompt id | no |
dialog_slots
| Field | Type | Description | Required? |
|---|---|---|---|
| name | string | Name of the slot in the dialog intent | yes |
| type | string | Type of the slot in the dialog intent | yes |
| elicitationRequired | boolean | Describes whether elicitation of the slot is required | no |
| confirmationRequired | boolean | Describes whether confirmation of the slot is required | no |
| prompts | Map | Collection of prompts for this slot | no |
| validations | array | List of validation rules for this slot | no |
dialog_slot_validations
| Field | Type | Description | Required? |
|---|---|---|---|
| type | string | Enum value to reference the type of validation rule. See Validation rules | yes |
| prompt | string | ID to reference the set of prompts for this validation rule | yes |
The validation object includes additional properties specific to the available validations. See Validation rules.
dialog_slot_prompt_type
| Field | Type | Description | Required? |
|---|---|---|---|
| elicitation | string | Enum value in the dialog_slots map to reference the elicitation prompt id | no |
| confirmation | string | Enum value in the dialog_slots map to reference the confirmation prompt id | no |
prompts
| Field | Type | Description | Required? |
|---|---|---|---|
| id | string | Identifier of the prompt | yes |
| variations | array | List of variations of the prompt. | yes |
variations
| Field | Type | Description | Required? |
|---|---|---|---|
| type | enum | One of: "PlainText" or "SSML" | Yes |
| value | string | Text that Alexa says as a prompt. | Yes |
Sample Interaction Model Schema
The following sample schema includes three standard built-in intents, two custom intents, a dialog model, and a custom slot type.
{
"interactionModel": {
"languageModel": {
"invocationName": "my space facts",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"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."
}
]
}
]
}
}