Voice

3 Takeaways from Alexa Dev Day

Key tools and practices for the creation of effective Alexa skills

Guy Tonye

March 5, 2018

As a software developer based out of Toronto (and one of the organizers of Voice Tech TO), I recently took a trip down to NYC to attend one of Amazon’s infamous Alexa Dev Days. For those unfamiliar with the event, Alexa Dev Days are recurring, multi-city developer workshops that are free and open to the public. Full of helpful info, they are geared toward the design and development of third-party skills for Alexa-enabled devices.

It’s quite a trip from Toronto to New York just to take a one-day workshop, but looking back on all the things I learned and discovered, it was 100% worth it.

In a nutshell, the event covered three major topics:

  1. How to Design a Conversation
  2. An Overview of Amazon’s Developer Tools
  3. New Features for Alexa

Let’s go through these one by one.

1. How to Design a Conversation

Since designing for the ear is so different from designing for the eye, the Alexa team conducted a number of small exercises to get people into the right headspace.

First ExerciseAfter grouping us into teams, the Alexa instructors challenged us to design a simple recommendation skill. We had to figure out: what does our skill recommend, exactly? And how, conversationally, do users arrive at those recommendation(s)?

My team chose to build a bike recommendation engine.

As we learned, everything begins with writing the conversation in its ideal form, commonly referred to as the “happy path.” Using nothing but plain old paper, this is the dialogue we came up with:

User (U): Open bike assistant.
Alexa (A): Hi, I can help you find a bike. Are you looking for a city bike or a mountain bike?
(U): A city bike.
(A): Okay. How often do you ride your bike on average?
(U): Twice a week.
(A): Got it. What is your budget?
(U): Around $200.
(A): Okay. Searching… I would recommend a carbon road bicycle from Amazon at $220. Would you like me to send the information to your phone?
(U): Yes.
(A): Sending now.

Second ExerciseOn the basis of our happy path, our next exercise was to formally document the user’s overall intention, as well as the kinds of information necessary for the skill to satisfy that intention, aka the different input types, or slots. Finally, we needed to identify the actual inputs that could legitimately be entered under each of these slots, aka the values. As you’ll see in the next section, we needed to do this because, when you build the actual skill, you can’t just type up and submit a transcript of your desired conversation. You need to build the program in terms of intentions, slots, and legitimate value entries.

User Intention: An appropriate bike recommendation
Slots: Bike type, frequency, budget
Values: City Bike or Mountain Bike (for Bike Type); Once a week, twice a week, daily, or often (for the Ride frequency); Any number (for Budget)
User Intention: Receiving the recommendation on your phone
Slot: Preference
Values: Yes, No

At this point in the exercise, the Alexa team emphasized the need to perform and test our skill with real users in order to learn more about their intentions and add/remove slots and values accordingly.

2. Amazon Developer Tools: An Overview

After designing your happy path and identifying the relevant slots and values, the workshop’s focus shifted toward actually developing the skill. The Alexa team walked us through a number of tools to help with that, loosely divided into “graphical” tools and more traditional “console” tools.

Graphical Tools

“Graphical” skill building, remarkably, does not require any coding, occurring entirely in your web browser using a combination of the Alexa Skills Kit Developer Console, Skill Code Generator, and AWS Lambda Console (don’t be misled by the word “console” here — these are GUIs). Let’s go through these one by one.

Alexa Skills Kit Developer Console
Many of you may already know this tool, though it got a pretty solid facelift. Basically, it allows developers to define the intention, slots, and values using its GUI.

Defining the slots: bikeType, bikeRidingFrequencyType, and budget.
Defining the values for bikeRidingFrequencyType, with synonyms.

Notice in the above image that there’s a column for synonyms: for each slot, you can define values and add synonyms that would resolve to the same value.

You can also quickly define what information is mandatory for each utterance and automate the question that will be prompted to the user if that info is missing (below).

BikeType is defined as a mandatory input for the recommendation, so that if it is not provided already, Alexa will automatically prompt the user.

Skill Code Generator
Skill Code was one of the most impressive tools presented during the event. After building everything in the Alexa Skills Kit Developer Console and receiving a model of your skill (in the form of a json file), Skill Code lets you copy it into a little console which automatically generates the code for that skill in JavaScript. One click and your index.js is ready for download and use.

The code on the right is generated from the skill’s model json and is ready for use in the Adapter Lambda.

AWS Lambda Console
AWS Lambda Console lets you define the lambda that will fulfill the skill’s request — in our case, finding an appropriate bicycle recommendation from the immense sea of bikes out there. Then the previously generated index.js can be uploaded to your lambda et voilà, the skill is ready for you to try out in Alexa Skills Kit Developer Console or through a configured device.

Console

If GUIs aren’t your favourite, or if versioning and continuous deployment are necessary for your project (they often are), an old-fashioned terminal is the choice for you. For the developers in the room, Amazon presented their command line “ask-cli.” It allows builders to manage skill configuration directly from the console.

Another benefit of ask-cli is that it gives developers tools for lambda management that were previously only available via non-Amazon software such as Apex and Serverless. (More information here.)

Whether you’re a designer or a developer, a product manager or simply a voice enthusiast, Amazon provides the tools for you to make a skill.

3. Alexa’s New Features

Another interesting moment of the day was the presentation of some upcoming features Amazon had in store for Alexa, relevant for developers no less than users.

Gadget API

Amazon is offering a new type of voice experience through an extended product line they’re calling Gadget. The first product available is called Echo Button and it was released in the US in December 2017. It is meant to enhance the gaming experience on Alexa, with a trivia game for example, allowing users to race each other to answer questions. An API allowing third-party skills to interact with these gadgets will be made available soon.

Progressive Response

When a user makes their request, depending on the network or the query processing, the user could end up waiting for a significant amount of time. As of November 2017, Alexa now supports progressive response, which allows skills to send intermediate responses to the user while processing the real request.

Alexa for Business

As of November 2017, AWS is offering a series of features around Alexa for Business. It provides a suite of management tools (like fleet management for company devices) and easily integrates with enterprise software (like conferencing and help desk). Developers also have the opportunity to build skills for corporations in a private skill store using a wider range of APIs.

Notifications

Currently, Domino’s pizza is the only service that can notify users on Alexa. However, a notification option for all skills are in the works. It’s a sensitive topic, but a developer preview will be available soon.

Voice ID

Voice recognition is already available for users on Alexa, but soon developers will be able to use it to provide customized experiences. Stay tuned here.

SearchQuery slot

To leverage less predictable user utterances, Alexa added a SearchQuery slot-type to its Skill Kit that can be applied to specific slots to allow for open-ended inputs/values to simplify the design of a skill. See an example here.

IoT

Though not new, the team showed how integrating Alexa Voice Service (AVS) into a device allows you to interact with it via Alexa. To illustrate their point, they showed how Alexa could be used to control your web browser to find images quickly online.

Conclusion

After a jam-packed day at the W Hotel in midtown Manhattan, the strongest impression I was left with is that Amazon is committed to sharpening their skill-building tools for designers and developers alike, no doubt in order to boost production and provide their users with the best experiences possible. Smart.

If you don’t have a chance to attend one of these Dev Days, feel free to reach out or come to the next meeting of Voice Tech TO. A Toronto-based event that explores Google Home, Amazon Alexa, and the wide world of voice, it’s our own personal Dev Day ;-)

Related Posts

Connected Goes to Cannes!

Connected Lab to compete in the first ever Cannes Lions “Change for Good” Hackathon

3 Takeaways from CES 2018

Like many consultants in the software space, I went to CES this year. Infamous for its energy and scale, CES is so noisy that it can be hard for...

How We Built a Google Home Office Assistant

A Connected Butler Story