Interaction Model Schemas


The interaction model resource has the same structure as when you create an interaction model with the developer console. You can create and modify the interaction model resource with ASK CLI commands or with interaction model operations.

See also: Alexa Skills Kit Command Line Interface (ASK CLI) 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
modelConfiguration object Optional settings for the interaction model. Available in supported locales. no

languageModel_intents

Field Type Description Required?
name string Name of the intent. For details about intent names, see Intent and slot name requirements. yes
slots array List of slots within the intent. no
samples array Sample utterances for the intent no

languageModel_intents_slots

Field Type Description Required?
name string Name of the slot. For details about slot names, see Intent and slot name requirements. yes
type string Type of the slot. yes
samples array Sample utterances for the slot. no
multipleValues object Determines whether this slot allows single values or multiple values. When this object isn't present, the slot defaults to allowing single values only. no
multipleValues.enabled boolean When true, the slot recognizes and collects multiple values spoken in list format, such as "pepperoni, mushrooms, and black olives." For details about multiple-value slots, see Collect Multiple Values in a Slot. No

languageModel_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

types_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

value_name

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

languageModel_modelConfiguration

Field Type Description Required?
fallbackIntentSensitivity object Object containing settings for adjusting AMAZON.FallbackIntent sensitivity. Valid when the model includes AMAZON.FallbackIntent. Available in supported locales. no

languageModel_modelConfiguration_fallbackIntentSensitivity

Field Type Description Required?
level enum Adjusts the sensitivity of AMAZON.FallbackIntent. One of: "HIGH", "MEDIUM", or "LOW". Defaults to "LOW". For more about how to determine when to change this setting, see Adjust AMAZON.FallbackIntent sensitivity. Available in supported locales. 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",
      "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."
          }
        ]
      }
    ]
  }
}

Was this page helpful?

Last updated: Nov 29, 2023