Labs Alexa Design Lab
In this lab, you'll use a design process to help you think through making a voice experience.
Human conversation is about exchanging meaning in ways that make sense in the current situation. Expressing and extracting meaning is not as simple as it may seem, and you’ll need to design conversations between Alexa and your customers carefully and intentionally. A great voice experience allows for the many ways people might express meaning and intent.
Conversational UI consists of turns starting with a person saying something, followed by Alexa responding. This is a new form of interaction for many people, so make sure that you’re aware of the ways in which users participate in the conversation so that you can design for it.
Learn more about Intents, Utterances, and slots in this video
Start with what people want to accomplish, and determine the capabilities of your skill and the benefits of using it.
Describe one or more scenarios in which people will find your skill useful and desirable. Determine the capabilities of the skill by asking the following questions:
- What is the purpose of the skill? Why will people want to use it?
- What will the person be doing before, during, and after interacting with the skill?
- What will people get from the skill that they cannot get another way?
Show the core value and experiences by writing 1-4 scripts between the user and Alexa. For this lab, assume that everything works perfectly. These are happy path scripts. For this, you can use a word processor, or paper and a template like this: Alexa Dialogue Design
A basic script doesn’t fully represent how people will interact with your skill in real life. Users may say too little, too much, or say things that you weren’t expecting. Use the following techniques to expand your script and catch various ways in which a user might accomplish tasks
Intents represent the unique things that your skill is able to do. A skill for planning a trip might have five intents, for example PlanATrip, BookTheTrip, Stop, Cancel, and Help.
Utterances include the robust list of words, phrases, and sentences users will say to engage and fulfill the intent. For example, to use the PlanATrip intent, the user might say “Plan a trip,” “Plan a trip for next Friday,” or “Plan a hiking trip to Portland.”
Slots allow people to specify variable parts of an utterance, for example city or date. Slots are common in task- and information-focused skills. Design how the slots show up in utterances, and then choose slot values from the built-in catalog or provide your own slot values. In the following example utterances, {toCity} and {travelDate} are slots:
- “I’d like to go to {toCity}”
- “book a trip for {travelDate}”
- “plan a vacation to {toCity}”
For this task, you can use more detailed dialog sketches
You'll bring your design to life using the Alexa Skill Builder. This is where you add your intents, utterances, and slots to create an interaction model.
Go to the Amazon Developer Portal and add a new skill. Then, after filling out the skill information, click the skill builder beta on the interaction model page. For detailed step by step instructions see steps 1-6
In the skill builder, click the intent ADD+
button and add your intents.
Then, for each intent, add your sample utterances and slots. For example, “I’d like to go to {toCity}” and “book a trip for {travelDate}” where {toCity}
and {travelDate}
are slots. Finally, for each slot, assign or create a slot type. For detailed step by step instructions see steps 7.2-7.10
Click on the Save Model button, and then click on the Build Model button.
Now that you have your VUI design sketched out and implemented in the skill builder, it's time to create the web service backend where all the logic will happen.
Create an alexa skill AWS Lambda function using the blueprint for "alexa-skill-kit-sdk-factskill". We'll replace all the code for that skill but it's a fast way to get up and running. In case you need, here's a step by step guide for building a skill using that blueprint.
From the skill builder, click code editor
and copy your interaction model. Then paste that into the skill code generator and click Generate
. This will produce code for your Lambda function. Copy this code (from the Lambda Template box) and paste it over the fact skill code you created in step 3.3.1. To do this, go to your lambda function and click the code tab. Select all the code and delete it. Then paste in the code for your new skill (from the Lambda Template box) and click save. As a final step, copy the ARN value from the top right corner of the screen. You will need this value in the next section of this guide.
Go to your skill on developer.amazon.com and click on the configuration tab (you may already be there). Choose AWS, North America, and paste your ARN and you're ready to test. For detailed steps see the step by step guide.