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

languageModel

Conversational primitives for the skill.

LanguageModel object

Yes

dialog

Rules for conducting a multi-turn dialog with the user.

Dialog object

No

prompts

Cues to the user on behalf of the skill for eliciting data or providing feedback.

Array of Prompt objects

No

LanguageModel object

Property Description Type Required

invocationName

Name used to invoke the skill.
For details about invocation names, see Choose the Invocation Name for a Custom Skill.

String

Yes

intents

Intents and their slots.

Array of objects

Yes

intents[].name

Name of the intent.
For details about intent names, see Intent and slot name requirements.

String

Yes

intents[].slots

List of slots defined for the intent.

Array of Slot objects

No

intents[].samples

Sample utterances for the intent.
Phrases the user can speak to trigger an intent or provide a value for a slot elicitation.

Array of strings

No

types

List of custom slot types defined in the intent.

Array of objects

No

types[].name

Name of the custom slot type.

String

Yes

types[].values

List of representative values for the slot.

Array of SlotTypeValue objects

No

types[].valueSupplier

Definition of supplier that provides slot values.

Supplier object

No

modelConfiguration

Optional settings for the interaction model. Available in supported locales.

Object

No

modelConfiguration.fallbackIntentSensitivity

Identifies the AMAZON.FallbackIntent sensitivity to utterances that are outside of the model definition.
Valid when the model includes AMAZON.FallbackIntent.

Object

Yes

modelConfiguration.fallbackIntentSensitivity.level

Sensitivity level. The higher the level, the more customer utterances that aren't supported by the skill are captured by AMAZON.FallbackIntent.
For more about how to determine when to change this setting, see Adjust AMAZON.FallbackIntent sensitivity.
Default value: LOW.
Valid values: HIGH, MEDIUM, LOW.

Object

Yes

Slot object

Property Description Type Required

name

Name of the slot.
For details about slot names, see Intent and slot name requirements.

String

Yes

type

Slot type. The type can be an Amazon built-in slot type or a custom slot type.

String

No

samples

Sample utterances for the slot.

Array of strings

No

multipleValues

Determines whether this slot allows single values or multiple values.
When this object isn't present, the default is single values only.

Object

No

multipleValues.enabled

Indicates whether the slot allows multiple values.
When set to 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.

Boolean

Yes

SlotTypeValue object

Property Description Type Required

id

Custom slot type value ID.

String

No

name

Describes a value of a custom slot type and optional synonyms for the value.

Object

Yes

name.value

Expected value for a custom slot type.

Object

Yes

name.synonyms

List of synonyms for the name.value.

Array of strings

No

Supplier object

Property Description Type Required

type

Type of supplier.
Valid values: CatalogValueSupplier.

String

Yes

valueCatalog

Catalog reference definition when type is CatalogValueSupplier.

Object

Yes

valueCatalog.catalogId

Identifies the catalog.

String

Yes

valueCatalog.version

Version of the catalog.

String

Yes

Dialog object

Property Description Type Required

intents

List of intents that have dialog rules associated with them.

Array of DialogIntent objects

Yes

delegationStrategy

Specifies whether dialogs in this skill should be automatically delegated to Alexa or left to the skill.
To turn on delegation for the overall skill, set to ALWAYS.
You can override this setting at the intent level.
Valid value: ALWAYS, SKILL_RESPONSE.

String

Yes

DialogIntent object

Property Description Type Required

name

Name of the intent that has dialog rules.

String

Yes

delegationStrategy

Specifies whether dialogs in this intent should be automatically delegated to Alexa.
To turn on delegation for the intent, set to ALWAYS.
This value overrides the dialog-level setting.
Valid value: ALWAYS, SKILL_RESPONSE.

String

No

slots

List of slots in this intent that have dialog rules.

Array of DialogSlotItems objects

No

confirmationRequired

Indicates whether Alexa should ask for confirmation of the intent.

Boolean

No

prompts

Confirmation prompts associated with the intent.

Map

No

prompts.<promptID>

Confirmation prompts associated with the intent.

String

No

DialogSlotItems object

Property Description Type Required

name

Name of the slot that has dialog rules.

String

Yes

type

Slot type.

String

Yes

elicitationRequired

Indicates whether Alexa should ask for elicitation of the slot value.

Boolean

No

confirmationRequired

Indicates whether Alexa should ask for confirmation of the slot value.

Boolean

No

prompts

Confirmation and elicitation prompts associated with the slot.

Object

No

prompts.elicitation

Prompt ID for the elicitation prompt.

String

No

prompts.confirmation

Prompt ID for the confirmation prompt.

String

No

validations

List of validations for the slot.
The validation object might contain additional properties available to the specific validations. For more details, see Validation rules.

Array of objects

No

validations[].type

Identifies the type of validation.
Valid values: isLessThan, isGreaterThan, IsGreaterThanOrEqualTo, IsLessThanOrEqualTo, IsInSet, isNotInSet, IsInDuration, IsNotInDuration, HasEntityResolutionMatch.

String

Yes

validations[].value

Value to compare to.
Required for comparison validations: isLessThan, isGreaterThan, IsGreaterThanOrEqualTo, IsLessThanOrEqualTo.

String

No

validations[].values

Set of values to validate against.
Required for IsInSet and isNotInSet.

Array of strings

No

validations[].start

Start of the duration interval.
Required for IsInDuration and IsNotInDuration. Validates that the given date or time slot value is within a given interval. You create the interval with the start and end values. Both start and end are in reference to the current date/time of the user's request. Defined in ISO 8601 duration format:

  • Date: Duration using Y, M or D components or calendar date in YYYY-MM-DD format.
  • Time: Duration using H or M components or 24-Hour clock time in hh:mm format.

Array of strings

No

validations[].end

End of the duration interval.
Required for IsInDuration and IsNotInDuration. Validates that the given date or time slot value is within a given interval. You create the interval with the start and end values. Both start and end are in reference to the current date and time of the user's request. Defined in ISO 8601 duration format:

  • Date: Duration using Y, M or D components or calendar date in YYYY-MM-DD format.
  • Time: Duration using H or M components or 24-Hour clock time in hh:mm format.

Array of strings

No

validations[].prompt

Prompt ID to play to the user if validation fails.

String

Yes

Prompt object

Property Description Type Required

id

Identifier of the prompt.

String

Yes

variations

List of variations of the prompt.

Array of objects

Yes

variations.type

Type of prompt.
Valid values: PlainText, SSML.

String

Yes

variations.value

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."
                    }
                ]
            }
        ]
    }
}

Was this page helpful?

Last updated: Aug 08, 2024