Let’s build a skill: program Alexa

Voice assistants like Amazon’s Alexa are much more than jukeboxes, weather services or comedians. Voice assistants are an exciting topic that will continue to occupy the online marketing world in 2020 and 2021. One reason for this is the ever increasing use and demand for language assistants in Germany. The number of skills, i.e. the possible applications that come onto the market, is increasing and in this article we would like to take you on our journey to develop an Alexa skill.

But what are skills? It’s a skill
is an app for Amazon’s voice assistant Alexa. Just like an app
Android and Apple devices must have the skill via the Amazon App Store
can be downloaded. Then the skill on Alexa is determined by certain
Word combinations activated.

Step 1: the conception

We develop a skill. But what kind of skill do we want to develop? The skill should of course offer added value for others and for us too. So something that makes everyday work easier. The idea is to control the time recording via the skill or to make calls. But here came the first problem: data protection. How can we ensure that sensitive data from Amazon employees or customers is not stored and processed?

Info: When using Alexa Skills, personal data is automatically passed on to Amazon and stored. Skill developers have no influence on what happens to this data.

So how can we develop a skill that both provides added value and does not pose any problems in terms of data protection? The solution: We let the skill tell something. Why not something about ourselves? We are building an HR skill!

Step 2: the preparation

What should our skill actually do? Our skill is supposed to
meet the following criteria:

  • information about the enterprise give,
  • Contain current job advertisements,
  • inform about further education / training and support programs,
  • name the HR contact person.

With the help of these criteria, as much information as possible is collected in order to create a skill. You should deal early with terms such as interaction path or user guidance, which we will go into further below.

Info – Interaction Path: An interaction path is understood to be the path that a user travels within a skill in order to get from one piece of information to the next. Specifically, this means: How can I ensure that all information about my skill is clearly visible and accessible? For this, it is recommended in the first step to record or outline the course of the conversation in an Excel file.

Step 3: creating a skill

And how do I actually create a skill now? First, an Amazon developer account is required. Amazon distinguishes two systems here:

1. Amazon Web Services

Amazon Web Services is Amazon’s in-house cloud service that offers a variety of different functions and services. One of these functions is the provision of a backend for Alexa skills. In this article, however, we will only deal with the Amazon Developer Console.

2. Amazon Developer Console

As the name suggests, the Developer Console is used to develop a wide variety of Alexa applications. This also includes the Alexa skill. We decide to develop a custom skill, which is hosted by Alexa itself. The advantage here is that only one platform is required to develop the skill. The disadvantage of a custom skill is a limitation in the size of the skill and in certain functions, which we did not need in our HR skill.

How is a skill structured?

Before we dive deeper into the development of a skill, let’s first look at the different components of a skill.

Wake Word:

With
Alexa itself is activated in the wake word. This is still in none
Connection to the actual skill.

Launch:

Launch phrases are certain command words like “question” or “Open”,

With
which the user Alexa signals that a certain skill addresses or
should be opened.

Invocation name:

The invocation name is the activation word of the skill. This is not with that
Confuse names of the actual skill. That’s our skill name
for example “ask network effect”. But the skill is through the
Activation word “h. r. network effect “opened.

Intents:

The
Intents are at the heart of every skill
possible questions (utterances) and answers (responses) of the skill
programmed. There are three types of intents:

  1. Built-in intents: These are pre-made intents that Amazon makes available.
  2. Required intents: Similar to the build-in intents, these types of intents are pre-made intents. In contrast to the build-in intents, these are absolutely necessary for the functionality of the skill.
  3. Custom intents: Custom intents include all intents that are created independently by the developer.

Utterances:

Under
Utterances are understood to be different requests from a user to one
certain intent.

Slots: Slots are variables that are built into an intent. With slots, requests from a user can be more specific, related to certain variables, and thus also trigger specific responses, without having to create a separate intent for each variable. Slots are not absolutely necessary for a skill to work. They only simplify handling. Amazon itself has predefined variables such as the date or the city, which are automatically recognized by the skill. In the case of manually created slots, these must be programmed manually.

Let’s build a skill

Now it’s time to get down to business – we create the skill. After we have selected which type of skill we want to create, we end up in the actual development environment of the Alexa skill. This is very clearly designed and contains the elements of a skill already described. In addition, the development environment takes you by the hand to develop your own skill step by step.

Step 1: creating the invocation name

As suggested by Alexa, we start with the
Creation of an invocation name. When looking for an invocation name, are
a few basic points to consider:

  • The Invocation Name must consist of at least two
    Words exist. This does not apply to brands.

  • The Invocation Name is not allowed
    Launch phrases like “ask” or “open” included.

  • Abbreviations such as “HR” have to go through
    Dots and spaces are separated: “h. r. “

Tip: There is the possibility to use abbreviations as Invocation Name. With our skill, however, it has been shown that the users have problems with controlling the skill. We therefore advise against this type of invocation name.

Step 2: creating the intents

The second step is the actual work. A
Good preparation saves a lot of work at this point. As before
mentioned, we had previously had points when developing the skill
Interaction path or user guidance barely busy. This led to the following
Problems:

  • Which utterances lead to which intent?
  • How is the user best through the skill
    headed?

  • Which intents end the skill and which ones
    are needed for the continuation?

Tips for one
optimal preparation:

  1. In the first step, all planned intents and answers should be listed. For each intent, one or two keywords should be defined that appear in the utterances. It is advisable to use an Excel spreadsheet or a Google sheet for this.
  2. In the second step you should look for duplicates within the keywords. If there are duplications here, you should consider whether you can target the intent to another keyword or whether the intent is needed at all.
  3. After there are no more duplications, the third and perhaps most important step begins: creating different conversation courses. Here the intents should be divided into different levels, similar to the structure of a website. Then you think about how you connect the different levels.
  4. In the last step, the responses of the different intents should be adjusted so that they continue to the next intents.

Danger:

Should he
Intent not to end the session, must end the answer with a question,
so that the user can react to the intent.

Once all intents have been created, the appropriate utterances are created
defined for the individual intents. This is where the keywords that came before come into play
were determined. Most utterances have a similar structure in form
from “Tell me something about XY”
or
What does an “XY” do

. Here you can
create a list with different types of formulation and this with the
Combine keywords. The manual insertion of specific utterances will be yours
not completely spared.

Tip: You should initially create at least eight utters per intent. Alexa uses artificial intelligence to independently add new utters as soon as she recognizes a pattern in the questions. The more utterances that have been implemented here initially, the better this process works.

Step 3: It doesn’t work without code

After all intents have been created and the logic for the course of the conversation has been determined, the skill is programmed. If you use built-in intents in your skill that are provided by Amazon, the code for these intents is generated when you create the skill. The code of the intents is always in the same format and can easily be transferred to other intents using copy and paste. We show you which areas you need to pay attention to:

In the second step, you must insert handlers into the following code snippets at the end of the code:

Step 5: test and publish

If all intents are stored in the code, the skill must still be
be tested. Amazon provides its own test environment for this –
that’s really cool. You can easily use the different intents and
Check the course of the call.

Tip:

Preferably
support you in this process, people who have not had any points of contact
the skill. Even users from outside will not later
Know the course of the conversation that you thought about before.

Does the skill work properly? Then finally it says: We publish the skill. To do this, the skill must be certified by Amazon in the first step. For the certificate in “Certification” –The pre-defined fields can be filled in. If there are problems with the certification, you will be informed by Amazon by email. During our first attempt at certification, we encountered the following problems:

  • We have considered using the name of our company as the invocation name. However, Amazon does not accept this. Therefore our invocation name is now h.r. network effect.
  • In addition, we did not take care to use the correct sample phrase for certification. This should be structured as follows:
  • And finally a point that still gave us a bit of work: As already mentioned when creating the skill, it should be carefully considered which intents end the skill or the session and which ones continue. At the time, we were unaware that all of the skills that should continue must end in one question in order to keep the skill going. That’s why we had to adjust all the answers again at this point. All the more important: think about this point when creating the conversation.

Info: The certification request can be made as often as necessary. This means that you will never be punished by Amazon. If you have solved all problems, the skill will be released by Amazon and you can now publish it in the App Store.

Step 6: the skill is live, what now?

Finally, the skill is live. But even after
The publication of the skill needs to be further optimized. Here Amazon poses
even its own monitoring tool is available, which the different
Monitor requests to the skill. There are two points to emphasize in particular,
that can help you optimize the skill as much as possible:

  • On the overview page you will find a list of which intent has been activated and how often. On the one hand, you can determine which intents are particularly interesting for the user, but on the other hand you can also see whether there could be errors in the user guidance. For example, the fallback intet, which always takes effect when none of your intents is addressed by the user’s request, has been activated very often. This is an indication that the course of the conversation is not yet optimal.
  • The second point that helped us with the optimization
    has so-called Interaction Path Analytics, in which the exact
    The course of the conversation of the various inquiries is shown. Here you can
    Reconcile planned calls and exactly the points
    identify where there are problems.

What happens now?

“I’m still at the very first chapter,” is the answer when you ask Google or Alexa how old they are and that’s what it looks like to us. Developing a skill without programming knowledge initially involves some hurdles. A few simple tricks help here. It is also a lot of fun and a great sense of achievement when the skill answers your self-created question for the first time. So we can only recommend trying a skill yourself. For us, the second chapter begins with Alexa, in which we now deal with the topic of voice applications. So be excited …



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *