Entity Resolution for Built-in Slot Types


Alexa uses entity resolution to resolve the user's utterance for a slot value to a single, known entity. A subset of built-in slot types fully support entity resolution and Alexa entities. You can also extend many built-in slot types with your own values to use with entity resolution.

For more about entity resolution, see Entity Resolution.

Slot types that support entity resolution and Alexa Entities

A subset of built-in slot types support entity resolution. For these types, a user utterance might resolve to an Alexa entity in the Alexa knowledge graph. An entity has a unique ID in the form of an internationalized URI (IRI). You can use the IRI for an Alexa entity with the Linked Data API to retrieve data about the entity from the knowledge graph. For example, for a person, you can retrieve the person's birthdate.

When a slot type supports entity resolution, the authority for the entity resolution results is AlexaEntities.

The following example shows results for a slot called Person that uses the AMAZON.Person built-in slot type. The utterance "bezos" resolved to five possible entities.

{
  "version": "1.0",
  "session": {},
  "context": {},
  "request": {
    "type": "IntentRequest",
    "requestId": "amzn1.echo-api.request.1",
    "locale": "en-US",
    "timestamp": "2021-01-15T22:49:26Z",
    "intent": {
      "name": "WhoIsIntent",
      "confirmationStatus": "NONE",
      "slots": {
        "Person": {
          "name": "Person",
          "value": "bezos",
          "resolutions": {
            "resolutionsPerAuthority": [
              {
                "authority": "AlexaEntities",
                "status": {
                  "code": "ER_SUCCESS_MATCH"
                },
                "values": [
                  {
                    "value": {
                      "name": "Jeff Bezos",
                      "id": "https://ld.amazonalexa.com/entities/v1/6ZmdJgzS4ipuScmQo0ppz4"
                    }
                  },
                  {
                    "value": {
                      "name": "Mackenzie Bezos",
                      "id": "https://ld.amazonalexa.com/entities/v1/4r51itmsh0aQsz2yyVVEER"
                    }
                  },
                  {
                    "value": {
                      "name": "Yannis Bezos",
                      "id": "https://ld.amazonalexa.com/entities/v1/z0fYLagm4L0X3deptSiodB"
                    }
                  },
                  {
                    "value": {
                      "name": "Mike Bezos",
                      "id": "https://ld.amazonalexa.com/entities/v1/F9GKAu5mLT4iPP5d5xRetG"
                    }
                  },
                  {
                    "value": {
                      "name": "Mark Bezos",
                      "id": "https://ld.amazonalexa.com/entities/v1/fQxk1G8jtN4F7fe1NntcCH"
                    }
                  }
                ]
              }
            ]
          },
          "confirmationStatus": "NONE",
          "source": "USER",
          "slotValue": {
            "type": "Simple",
            "value": "bezos",
            "resolutions": {
              "resolutionsPerAuthority": [
                {
                  "authority": "AlexaEntities",
                  "status": {
                    "code": "ER_SUCCESS_MATCH"
                  },
                  "values": [
                    {
                      "value": {
                        "name": "Jeff Bezos",
                        "id": "https://ld.amazonalexa.com/entities/v1/6ZmdJgzS4ipuScmQo0ppz4"
                      }
                    },
                    {
                      "value": {
                        "name": "Mackenzie Bezos",
                        "id": "https://ld.amazonalexa.com/entities/v1/4r51itmsh0aQsz2yyVVEER"
                      }
                    },
                    {
                      "value": {
                        "name": "Yannis Bezos",
                        "id": "https://ld.amazonalexa.com/entities/v1/z0fYLagm4L0X3deptSiodB"
                      }
                    },
                    {
                      "value": {
                        "name": "Mike Bezos",
                        "id": "https://ld.amazonalexa.com/entities/v1/F9GKAu5mLT4iPP5d5xRetG"
                      }
                    },
                    {
                      "value": {
                        "name": "Mark Bezos",
                        "id": "https://ld.amazonalexa.com/entities/v1/fQxk1G8jtN4F7fe1NntcCH"
                      }
                    }
                  ]
                }
              ]
            }
          }
        }
      }
    }
  }
}

For a list of built-in slot types that support entity resolution, see the Alexa Entities Reference.

Slot types that you extend

You can extend many built-in slot types with your own values. When you extend a slot type, entity resolution takes place and the resolutions property is included on all values for the slot. You can add synonyms and custom IDs for your values.

For an extended built-in slot type, the authority is the name of the built-in type, in the format amzn1.er-authority.echo-sdk.<skill-id>.<BuiltinSlotTypeName>.

The following example shows the entity resolution results for a slot that uses the built-in slot type AMAZON.Color. The AMAZON.Color slot type doesn't support entity resolution, but the type has been extended with a custom value "blue" with the synonym "cobalt". Alexa resolved the user's utterance "cobalt" to this custom entity.

{
  "intent": {
    "name": "FavoriteColorIntent",
    "confirmationStatus": "NONE",
    "slots": {
      "favoriteColor": {
        "name": "favoriteColor",
        "value": "cobalt",
        "resolutions": {
          "resolutionsPerAuthority": [
            {
              "authority": "amzn1.er-authority.echo-sdk.amzn1.ask.skill.1.AMAZON.Color",
              "status": {
                "code": "ER_SUCCESS_MATCH"
              },
              "values": [
                {
                  "value": {
                    "name": "blue",
                    "id": "colorIdBlue"
                  }
                }
              ]
            }
          ]
        },
        "confirmationStatus": "NONE",
        "source": "USER",
        "slotValue": {
          "type": "Simple",
          "value": "cobalt",
          "resolutions": {
            "resolutionsPerAuthority": [
              {
                "authority": "amzn1.er-authority.echo-sdk.amzn1.ask.skill.1.AMAZON.Color",
                "status": {
                  "code": "ER_SUCCESS_MATCH"
                },
                "values": [
                  {
                    "value": {
                      "name": "blue",
                      "id": "colorIdBlue"
                    }
                  }
                ]
              }
            ]
          }
        }
      }
    }
  }
}

Your custom values might include values that were already part of the built-in slot type data set and assign your own IDs and synonyms. In the previous example, the value "blue" was already a value in the AMAZON.Color slot type. The version you add as a custom value overrides the original, so the resolutions property includes your custom ID for this utterance.

You can also add a value that was already part of the built-in type data set as a synonym to your own value. This also overrides the original. For example, you could add the custom value "super dark blue" to AMAZON.Color and give it the synonym "blue". The user's utterance "blue" sends your skill the following:

  • The value they spoke ("blue")
  • Your custom value "super dark blue"
{
  "intent": {
    "name": "FavoriteColorIntent",
    "confirmationStatus": "NONE",
    "slots": {
      "favoriteColor": {
        "name": "favoriteColor",
        "value": "blue",
        "resolutions": {
          "resolutionsPerAuthority": [
            {
              "authority": "amzn1.er-authority.echo-sdk.amzn1.ask.skill.1.AMAZON.Color",
              "status": {
                "code": "ER_SUCCESS_MATCH"
              },
              "values": [
                {
                  "value": {
                    "name": "super dark blue",
                    "id": "colorIdBlue"
                  }
                }
              ]
            }
          ]
        },
        "confirmationStatus": "NONE",
        "source": "USER",
        "slotValue": {
          "type": "Simple",
          "value": "blue",
          "resolutions": {
            "resolutionsPerAuthority": [
              {
                "authority": "amzn1.er-authority.echo-sdk.amzn1.ask.skill.1.AMAZON.Color",
                "status": {
                  "code": "ER_SUCCESS_MATCH"
                },
                "values": [
                  {
                    "value": {
                      "name": "super dark blue",
                      "id": "colorIdBlue"
                    }
                  }
                ]
              }
            ]
          }
        }
      }
    }
  }
}

For more about how to extend a built-in slot type, see Extend a Built-in Slot Type with Additional Values. For the list of extensible types, see Slot Types You Can Extend.

Slot types that don't support entity resolution

For a built-in slot type that doesn't support entity resolution, when you use the type without extending it, the slot type value spoken by the user is sent to your skill with just the name, value, and confirmationStatus properties. For example, assume you didn't extend the AMAZON.Color slot with your own values. Alexa doesn't do any entity resolution and returns the value that the user spoke.

{
  "intent": {
    "name": "FavoriteColorIntent",
    "confirmationStatus": "NONE",
    "slots": {
      "favoriteColor": {
        "name": "favoriteColor",
        "value": "blue",
        "confirmationStatus": "NONE",
        "source": "USER",
        "slotValue": {
          "type": "Simple",
          "value": "blue"
        }
      }
    }
  }
}

Was this page helpful?

Last updated: Nov 28, 2023