Announcing Alexa Entities (Beta): Create More Intelligent and Engaging Skills With Easy Access to Alexa’s Knowledge

Emma Flint Feb 09, 2021
Share:
Launch Productivity Build

We are excited to announce Alexa Entities (Beta), a new suite of tools that provides access to information about popular entities including people, places and things from Alexa’s Knowledge Graph. With Alexa Entities, you can now resolve strings in a customer’s utterance to common entities from a built-in catalog, using those entities as an entry point to traverse Alexa’s structured knowledge. Alexa Entities is currently supported for all customers with 15 Built-in Slot Types in English (US) and English (CA). Check out the technical documentation here to start building skills with Alexa’s knowledge.

Alexa Entities provides access to Alexa’s high-quality, continuously updated Knowledge Graph containing facts about popular entities including people (e.g. George Clooney’s birthday), places (e.g. the population and capital of Belgium) and things (e.g. the average weight of a hippo). 

Why Use Alexa Entities

Build More Intelligent & Engaging Skills: Alexa Entities makes Built-in Slot Types more useful by linking entities to Alexa’s knowledge, which can be used to build more engaging and intelligent experiences for customers. Connections between entities can be used to create more natural dialogues, for example “Add Alias Grace to my reading list”, “Got it. Have you thought about reading The Testaments, also written by Margaret Atwood in 2019?” Knowledge can also be used to easily disambiguate between similarly named entities, e.g. “Did you mean Anne Hathaway, born in 1556, or the actress in films such as Les Misérables?” or simply presented on-screen to create more engaging visual experiences. For example, the company Vocala recently used Alexa Entities to improve their new skill “Voice Blast”, which allows customers to compete against other players to guess celebrity voices. Alexa’s knowledge is used to provide additional facts about celebrities on-screen, complementing the spoken response with useful & interesting information. Simply say “Alexa, play Voice Blast” to see Alexa Entities in action. 

Easy Access to Alexa’s Knowledge: With Alexa Entities, you no longer have to source, acquire or manage your own catalogues of general knowledge information for use in your skills. Knowledge is automatically updated as Alexa learns new facts (e.g. when a new movie is released), reducing the effort it takes to keep skills up-to-date. For example, a developer building an educational skill to allow kids to explore an interactive map no longer needs to find a list of all the countries with key facts such as population, capital cities, currency, as this information is readily available from Alexa’s Knowledge Graph. When a new political leader is elected, the developer doesn’t have to manually update the country’s facts, since these are automatically refreshed by Alexa Entities. 

How Alexa Entities Works

Slot values in your custom intents will be automatically resolved to Alexa Entity IDs for supported Built-in Slot Types, which can be used to make additional calls to fetch data via our Linked Data API from within your skill’s code. For example, suppose you have defined a custom intent CelebrityBirthdayIntent with a sample utterance “When was {celebrity} born?”, where the slot {celebrity} is assigned to the Built-in Slot Type AMAZON.Person. When a customer asks your skill “When was Beyoncé born?”, you will receive the Alexa Entity ID corresponding to Beyoncé in your intent request. This ID can then be used to fetch additional knowledge (e.g. Beyoncé’s birthday). 

Alexa Entities consists of 2 primary capabilities:

Entity Resolution: Each Entity Resolution value will contain the name of the entity, as well as that entity’s unique global identifier within Alexa’s Knowledge Graph (an Alexa Entity ID). For example, when searching for the entity “Canada” in a slot assigned to the AMAZON.Country Built-in Slot Type, you would receive the following in your intent request: 

Copied to clipboard
{
  "request": {
    "type": "IntentRequest",
    ...
    "intent": {
      "name": "CountryIntent",
      "confirmationStatus": "NONE",
      "slots": {
        "country": {
          "name": "country",
          "value": "Canada",
          "resolutions": {
            "resolutionsPerAuthority": [
              {
                "authority": "AlexaEntities",
                "status": {
                  "code": "ER_SUCCESS_MATCH"
                },
                "values": [
                  {
                    "value": {
                      "name": "Canada",
                      "id": "https://ld.amazonalexa.com/entities/v1/KergWGkJmd9FT9YSvzn3AL"
                    }
                  }
                ]
              }
            ]
          },
          ...
        }
      }
    }
  }
}

Linked Data API: Use the Linked Data API to retrieve interesting facts about the entities your skill customers ask about. Each Alexa Entity ID is a URL that can be used to make an HTTP GET request to the Linked Data API, which will return a JSON response containing headline properties Alexa knows about that entity. For example, in the below example for the entity “Canada”, you get back properties including bordering countries, currency, population and political leader. You can also use the Linked Data API to traverse the Knowledge Graph via Alexa Entity IDs to fetch additional information about related entities returned in the response, for example to fetch Justin Trudeau’s birthplace. 

Copied to clipboard
{
  "@context": {
    "@vocab": "https://schema.amazonalexa.com/core/1.0/",
    ...
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  "@id": "https://ld.amazonalexa.com/entities/v1/KergWGkJmd9FT9YSvzn3AL",
  "@type": [
    "Country"
  ],
  "borderingCountry": [
    {
      "@id": "https://ld.amazonalexa.com/entities/v1/AJGFaH8FpvdBHPuUlYi9rX",
      "@type": [
        "Country"
      ],
      "name": [
        {
          "@language": "en",
          "@value": "United States"
        }
      ]
    }
  ],
  "capital": [
    {
      "@id": "https://ld.amazonalexa.com/entities/v1/4UReWIgsWRxD1BJaIUA2Ad",
      "@type": [
        "City"
      ],
      "name": [
        {
          "@language": "en",
          "@value": "Ottawa"
        }
      ]
    }
  ],
  "currency": [
    {
      "@type": [
        "Currency"
      ],
      "name": [
        {
          "@language": "en",
          "@value": "Canadian dollar"
        }
      ]
    }
  ],
  "humanPopulation": [
    {
      "@type": "xsd:integer",
      "@value": "37700000"
    }
  ],
  "name": [
    {
      "@language": "en",
      "@value": "Canada"
    }
  ],
  "politicalLeader": [
    {
      "@id": "https://ld.amazonalexa.com/entities/v1/4v7JvEnQrCSDpwtl6qA05A",
      "@type": [
        "Person"
      ],
      "name": [
        {
          "@language": "en",
          "@value": "Justin Trudeau"
        }
      ]
    }
  ]
}

Alexa Entities is currently supported on the following 15 Built-in Slot Types: (1) AMAZON.Person, (2) AMAZON.Movie, (3) AMAZON.Animal, (4) AMAZON.City, (5) AMAZON.Country, (6) AMAZON.Book, (7) AMAZON.Author, (8) AMAZON.TVSeries, (9) AMAZON.Actor, (10) AMAZON.Director, (11) AMAZON.Food, (12) AMAZON.MusicGroup, (13) AMAZON.Musician, (14) AMAZON.MusicRecording, (15) AMAZON.MusicAlbum. If you are currently extending a Built-in Slot Type with your own values, you can still use Alexa Entities - Alexa Entities will resolve as an independent authority that can be used alongside your developer-provided catalog.

Throughout the year, we will continue to expand the Built-in Slot Types, properties and features supported by Alexa Entities. Please let us know what you would like to see supported via Alexa Skills - Developer Voice and Vote, or you can engage with us in the Alexa Community Slack at http://alexa.design/slack (search for the #beta-alexa-entities channel). 

Get Started

To get started, simply rebuild your skill’s interaction model to start receiving Alexa Entity IDs. To learn more, visit the developer documentation here. You can also find code samples here.

Subscribe