Interaction Model Files for Alexa Conversations


An interaction model file specifies the invocation name, intents, and types for your skill. All custom skills have an interaction model file.

File location

When you create a skill with the Alexa Skills Kit Command-Line Interface (ASK CLI), the interaction model files are in <skill-directory>/skill-package/interactionModels/custom/>. Each locale has one interaction model file. For example, the name of the interaction model file for en-US is en-US.json.

File contents

Interaction model files are in JSON format. For a list of the fields, see Interaction Model Schema.

Notes for Alexa Conversations skills

For Alexa Conversations, your interaction model file must, at a minimum, have the following items:

  • An invocation name.
  • The AMAZON.FallbackIntent.
  • A custom intent with at least one sample utterance. The text content of the sample utterance isn't important.

If you want to use a custom type in an utterance set, you must declare the type in the interaction model file. For details about interaction models and how you can use types in utterance sets, see Types in ACDL. You don't need to declare built-in types, such as AMAZON.US_CITY and AMAZON.DATE, in the interaction model file.

Example

The following example shows the interaction model file for a weather skill. GetWeatherIntent is a custom intent.

{
  "interactionModel": {
    "languageModel": {
      "invocationName": "custom type",
      "intents": [
        {
          "name": "GetWeatherIntent",
          "samples": [
            "What is the weather",
            "How is the weather",
            "Tell me the weather"
          ]
        },
        {
          "name": "AMAZON.FallbackIntent",
          "samples": []
        }
      ],
      "types": [
        {
          "name": "CityName",
          "values": [
            {
              "id": "GOP",
              "name": {
                "value": "Gorakhpur",
                "synonyms": [
                ]
              }
            },
            {
              "id": "LKO",
              "name": {
                "value": "Lucknow",
                "synonyms": [
                  "nawab city"
                ]
              }
            },
            {
              "id": "DEL",
              "name": {
                "value": "Delhi",
                 "synonyms": [
                  "capital"
                ]
              }
            },
            {
              "id": "BLR",
              "name": {
                "value": "Bangalore",
                "synonyms": [
                  "it city"
                ]
              }
            },
            {
              "id": "HYD",
              "name": {
                "value": "Hyderabad",
                "synonyms": [
                  "nizaam city"
                ]
              }
            },
            {
              "id": "CCU",
              "name": {
                "value": "Kolkata",
                "synonyms": [
                  "old city"
                ]
              }
            }
          ]
        }
      ]
    }
  }
}

Was this page helpful?

Last updated: Aug 08, 2024