Intents and Slots

The word Intent is derived from intention and, true to its meaning, an intent may map to one or many functionalities of an Alexa Skill. To understand intents better, let's map this to something we already know, that is, common action buttons. For example, an e-commerce app or a web page may have a Buy button and clicking on that button will result in a Buy Action. When designing for voice, this Buy Action will translate into Buy Intent. We will look at common usages of Buy Intent shortly.

Some intents/actions/functionalities are common to almost every skill, hence they are already predefined/pre-configured for each Alexa Skill. For example:

  • Help Intent
  • Cancel Intent
To get more information about built-in intents, please visit https://developer.amazon.com/docs/custom-skills/standard-built-in-intents.html.

Each intent has a unique name and a mapping of sample utterances. As a developer, you may ask: Why the sample utterances? And, the reason is very simple—designing for voice is a bit tricky, since the user can say multiple things for a single action/intent. For example, for a buy action/intent, a user may say/utter the following:

  • Buy [item-name]
  • Purchase [item-name]
  • Acquire [item-name]
  • Go for [item-name]
  • Hold [item-name]

To tackle this, we have utterances of an intent. The more utterances an intent has, the easier it is to invoke it. 

Hopefully, you will have a fair understanding of intents by now and that brings us to Slots: if an intent is an action, then slots are arguments to that action. In the "buy action/intent" example previously mentioned, the item-name will be the argument for the buy intent, hence item-name is a slot. We shall see how slots work together with intents in the coming chapters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.186.247