SlideShare a Scribd company logo
Design and Develop
Alexa Skills
Alessandra Petromilli and Federico Baron
Rome | March 22 - 23, 2019
Alessandra
Petromilli
CXO, I drive the User Experience
Strategy and Teams at ibuildings
Italia
@aleanan
Federico
Baron
Principal Solution Architect at
ibuildings Italia
Find me on Linkedin!
User
Under the hood
Device FulfillmentArtificial
Intelligence
Filastrocche della buona
notte
The purest
design
challenge
Communication
The process
Goal Definition
Personas
and User
Stories
Script and
Conversation
Flow
Usability Testing
Goal Definition
Customer
Development
Interviews
Cindy Alvarez
Francesca
and Luigi
Beatrice
Target users –
personas
La
cantastorie
The Storyteller
system
personas
Define Context
user stories
Utente: Alexa apri Filastrocche della buona notte
Alexa: Ciao, con Filastrocche della buona notte possiamo ascoltare
insieme delle belle filastrocche! Posso suggerirtene alcune io, puoi
chiedermi tu un titolo preciso tra quelli disponibili sull'app o puoi
ascoltare tutta la collezione dall'inizio alla fine. Vuoi ascoltare la luna,
Guido il Ghiro o il sole?
Interactions
Interactions
Conversation
Flow
Interactions
Conversation Flow
Launch
request
First
run?
Welcome to text
(introduce your skill)
Welcome to text
(introduce your
skill)
Welcome to text
(introduce your
skill)
< intent > Nursery
rhyme suggested
by alexa
< intent > Nursery
rhyme suggested
by the user
< intent > play all
(audio player
mode)
Help
yes
no
Intent and utterances
https://www.utterance-generator.com/
Utterances Generator
https://www.utterance-generator.com/
Teaming up
Teaming up
put your
ego aside
Curiosity
Technology is not somebody
else’s problem
Feedbacks
Feedbacks
Test di
usabilità
Voice X
Anil Kumar Krishnashetty
founder of Berlin Lean
Prototyping
What we
should not
forget
User control
and freedom
EXIT
Flexibility
and
efficiency of use
Help documentation
and error recovery
Always
expect the
unexpected
Developer console:
define the interaction
model using the web
application
Let’s start!
Register to Amazon developers and open
your Alexa Developer Console
• Web console to create and
manage the lifecycle of your
skills
• UI to configure skill's manifest
and models
• Browser test environment
(device simulator)
• Certification process
management
• Analytics
Use the web GUI to setup you
interaction model
Interaction model:
use Alexa’s built-in
elements as much as you
can
Some built-in elements you can take
advantage of defining your model
• built-in intents (AMAZON.YesIntent,
AMAZON.NextIntent, AMAZON.RepeatIntent, …)
• built-in slot types (AMAZON.Date,
AMAZON.Number, AMAZON.City, …)
• use dialog model to delegate to Alexa a multi-
turn conversation with the user
Sample Utterances
• reproduce flexibility and variation of spoken
language in the real world
• add utterances to start interaction ("Alexa, ask
Daily Horoscopes for/about/to")
• it is better to provide too many samples than to
provide too few
• tools to generate utterances (ex. amazon-echo-
utterance-expander)
Back-end:
One minute setup with AWS
lambda and NodeJs
• Log in to the AWS Management Console and navigate to AWS
Lambda.
• Create new Lamda function
• Define a role for the function from “Simple Microservice” permissions
template
• Add and Configure the Alexa Skills Kit Triggers (insert skill-id)
• Add Lambda endpoint (arn) to the skill
resource "aws_iam_role" "my-skill-role" {
name = "my-skill-role"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
}
resource "aws_iam_role_policy_attachment" "my-skill-role-policy-dynamo-att" {
role = "${aws_iam_role.my-skill-role.name}”
policy_arn = "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess"
}
resource "aws_iam_role_policy_attachment" "my-skill-role-policy-lambda-att" {
role = "${aws_iam_role.my-skill-role.name}”
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
resource "aws_lambda_function" "my-skill-lambda" {
filename = "index.zip"
function_name = "my-skill-name"
role = "${aws_iam_role.my-skill-role.arn}”
handler = "src/index.handler"
runtime = "nodejs8.10"
}
resource "aws_lambda_permission" "my-skill-lambda-perm" {
statement_id = "AllowExecutionFromAlexa"
action = "lambda:InvokeFunction"
function_name = "${aws_lambda_function.my-skill-lambda.function_name}”
principal = "alexa-appkit.amazon.com"
event_source_token = "${var.skill-id}"
}
move to a comfortable
development environment
• ask init (setup cli tool linking
Amazon Developer and AWS
accounts)
• ask clone
• ask deploy
Development:
Simple introduction to NodeJS sdk
const Alexa = require('ask-sdk’);
// …
exports.handler = Alexa.SkillBuilders.standard()
.addResponseInterceptors(SavePersistentAttributesResponseInterceptor)
.addRequestHandlers(
LaunchRequestHandler,
PlayRhymeHandler,
PlayRandomHandler,
ReplayHandler,
PreviousHandler,
PlayAllHandler,
AudioPlayerEventHandler,
ResumeHandler,
YesHandler,
NoHandler,
HelpHandler,
SessionEndedHandler,
ExitHandler
)
.addErrorHandlers(ErrorHandler)
.withTableName('my-skill-table')
.withAutoCreateTable(true)
.lambda();
Simple introduction to NodeJS sdk
// ...
const PlayRhymeHandler = {
canHandle(handlerInput) {
// Conditions to determine the requests this handler can handle
const request = handlerInput.requestEnvelope.request;
return request.type === ‘IntentRequest’
&& request.intent.name === ‘PlayRhymeIntent’;
},
handle(handlerInput, error) {
// Execution logic for the handler
return handlerInput.responseBuilder
.speak(‘Mi dispiace ma questa filastrocca non è presente. Vuoi che te ne
suggerisca una io?’)
.reprompt(‘Vuoi che te ne suggerisca una io?’)
.getResponse();
},
};
// ...
The importance of “session”
for a voice app
• The skill session continues as the user speaks to
Alexa and your skill responds to Alexa
• The skill session ends when the user fails to
respond (8 seconds plus 8 more if re-prompt is
specified) or when the skill sets the
shouldEndSession property to true
• Once you are out of the session, you must invoke
the skill by saying something, such as "Alexa, open
[skill's invocation name]"
Using attributes
Saving the skill state is really important in order to
personalize the user experience and to implement multi-turn
conversations
Session attributes
• maintaned during the session
• Ex. store the request’s history to implement multi-turn
conversation
Persistent attributes
• persisted on database
• Ex. store last interaction date
Certification:
a very helpful feedback
• follow the submission checklist
• write Testing Instructions to help the
validation team
Thank you!

More Related Content

Similar to Design and Develop Alexa Skills - Codemotion Rome 2019

Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding WorkshopDigital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Dinah Barrett
 
Alexa101 course slides
Alexa101 course slidesAlexa101 course slides
Alexa101 course slides
Dan Bloy
 
Voice enable all the things with Alexa
Voice enable all the things with AlexaVoice enable all the things with Alexa
Voice enable all the things with Alexa
Mark Bate
 
Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
 Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski... Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
Amazon Web Services
 
Get Started Developing with Alexa and Drupal
Get Started Developing with Alexa and DrupalGet Started Developing with Alexa and Drupal
Get Started Developing with Alexa and Drupal
Amber Matz
 
David Isbitski - Enabling new voice experiences with Amazon Alexa and AWS Lambda
David Isbitski - Enabling new voice experiences with Amazon Alexa and AWS LambdaDavid Isbitski - Enabling new voice experiences with Amazon Alexa and AWS Lambda
David Isbitski - Enabling new voice experiences with Amazon Alexa and AWS Lambda
WithTheBest
 
NUS-ISS Learning Day 2017 - Voice Computing - The Next Digital Disruption!
NUS-ISS Learning Day 2017 - Voice Computing - The Next Digital Disruption!NUS-ISS Learning Day 2017 - Voice Computing - The Next Digital Disruption!
NUS-ISS Learning Day 2017 - Voice Computing - The Next Digital Disruption!
NUS-ISS
 
Screencast dave dev-introtoask-andecho-july2015
Screencast dave dev-introtoask-andecho-july2015Screencast dave dev-introtoask-andecho-july2015
Screencast dave dev-introtoask-andecho-july2015
David Isbitski
 
How to develop Alexa Skill Kit based on Serverless Architecture
How to develop Alexa Skill Kit based on Serverless ArchitectureHow to develop Alexa Skill Kit based on Serverless Architecture
How to develop Alexa Skill Kit based on Serverless Architecture
Hidetaka Okamoto
 
Behaviour-Driven Development for Conversational Applications
Behaviour-Driven Development for Conversational ApplicationsBehaviour-Driven Development for Conversational Applications
Behaviour-Driven Development for Conversational Applications
Florian Georg
 
IT Camp 2019: How to build your first Alexa skill in under one hour
IT Camp 2019: How to build your first Alexa skill in under one hourIT Camp 2019: How to build your first Alexa skill in under one hour
IT Camp 2019: How to build your first Alexa skill in under one hour
Ionut Balan
 
Marcel Pociot "Alexa, let's build a voice-powered app"
Marcel Pociot "Alexa, let's build a voice-powered app"Marcel Pociot "Alexa, let's build a voice-powered app"
Marcel Pociot "Alexa, let's build a voice-powered app"
Fwdays
 
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Amazon Web Services
 
WIN205-Building a Better .NET Bot with AWS Services
WIN205-Building a Better .NET Bot with AWS ServicesWIN205-Building a Better .NET Bot with AWS Services
WIN205-Building a Better .NET Bot with AWS Services
Amazon Web Services
 
Getting Started With Alexa Skills
Getting Started With Alexa SkillsGetting Started With Alexa Skills
Getting Started With Alexa Skills
Andy Hahn
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Manuel Bernhardt
 
An Introduction to Using AWS and ASK to Build Voice Driven Experiences
An Introduction to Using AWS and ASK to Build Voice Driven ExperiencesAn Introduction to Using AWS and ASK to Build Voice Driven Experiences
An Introduction to Using AWS and ASK to Build Voice Driven Experiences
Amazon Web Services
 
How to create a Voice – Enabled IoT solution for Alexa
How to create a Voice – Enabled IoT solution for AlexaHow to create a Voice – Enabled IoT solution for Alexa
How to create a Voice – Enabled IoT solution for Alexa
Amazon Web Services
 
Hackster DFW - Amazon Echo Workshop
Hackster DFW - Amazon Echo WorkshopHackster DFW - Amazon Echo Workshop
Hackster DFW - Amazon Echo Workshop
Ron Dagdag
 
Your First Amazon Alexa Skill
Your First Amazon Alexa SkillYour First Amazon Alexa Skill
Your First Amazon Alexa Skill
Mike Christianson
 

Similar to Design and Develop Alexa Skills - Codemotion Rome 2019 (20)

Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding WorkshopDigital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
 
Alexa101 course slides
Alexa101 course slidesAlexa101 course slides
Alexa101 course slides
 
Voice enable all the things with Alexa
Voice enable all the things with AlexaVoice enable all the things with Alexa
Voice enable all the things with Alexa
 
Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
 Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski... Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
 
Get Started Developing with Alexa and Drupal
Get Started Developing with Alexa and DrupalGet Started Developing with Alexa and Drupal
Get Started Developing with Alexa and Drupal
 
David Isbitski - Enabling new voice experiences with Amazon Alexa and AWS Lambda
David Isbitski - Enabling new voice experiences with Amazon Alexa and AWS LambdaDavid Isbitski - Enabling new voice experiences with Amazon Alexa and AWS Lambda
David Isbitski - Enabling new voice experiences with Amazon Alexa and AWS Lambda
 
NUS-ISS Learning Day 2017 - Voice Computing - The Next Digital Disruption!
NUS-ISS Learning Day 2017 - Voice Computing - The Next Digital Disruption!NUS-ISS Learning Day 2017 - Voice Computing - The Next Digital Disruption!
NUS-ISS Learning Day 2017 - Voice Computing - The Next Digital Disruption!
 
Screencast dave dev-introtoask-andecho-july2015
Screencast dave dev-introtoask-andecho-july2015Screencast dave dev-introtoask-andecho-july2015
Screencast dave dev-introtoask-andecho-july2015
 
How to develop Alexa Skill Kit based on Serverless Architecture
How to develop Alexa Skill Kit based on Serverless ArchitectureHow to develop Alexa Skill Kit based on Serverless Architecture
How to develop Alexa Skill Kit based on Serverless Architecture
 
Behaviour-Driven Development for Conversational Applications
Behaviour-Driven Development for Conversational ApplicationsBehaviour-Driven Development for Conversational Applications
Behaviour-Driven Development for Conversational Applications
 
IT Camp 2019: How to build your first Alexa skill in under one hour
IT Camp 2019: How to build your first Alexa skill in under one hourIT Camp 2019: How to build your first Alexa skill in under one hour
IT Camp 2019: How to build your first Alexa skill in under one hour
 
Marcel Pociot "Alexa, let's build a voice-powered app"
Marcel Pociot "Alexa, let's build a voice-powered app"Marcel Pociot "Alexa, let's build a voice-powered app"
Marcel Pociot "Alexa, let's build a voice-powered app"
 
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
 
WIN205-Building a Better .NET Bot with AWS Services
WIN205-Building a Better .NET Bot with AWS ServicesWIN205-Building a Better .NET Bot with AWS Services
WIN205-Building a Better .NET Bot with AWS Services
 
Getting Started With Alexa Skills
Getting Started With Alexa SkillsGetting Started With Alexa Skills
Getting Started With Alexa Skills
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
 
An Introduction to Using AWS and ASK to Build Voice Driven Experiences
An Introduction to Using AWS and ASK to Build Voice Driven ExperiencesAn Introduction to Using AWS and ASK to Build Voice Driven Experiences
An Introduction to Using AWS and ASK to Build Voice Driven Experiences
 
How to create a Voice – Enabled IoT solution for Alexa
How to create a Voice – Enabled IoT solution for AlexaHow to create a Voice – Enabled IoT solution for Alexa
How to create a Voice – Enabled IoT solution for Alexa
 
Hackster DFW - Amazon Echo Workshop
Hackster DFW - Amazon Echo WorkshopHackster DFW - Amazon Echo Workshop
Hackster DFW - Amazon Echo Workshop
 
Your First Amazon Alexa Skill
Your First Amazon Alexa SkillYour First Amazon Alexa Skill
Your First Amazon Alexa Skill
 

Recently uploaded

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 

Recently uploaded (20)

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 

Design and Develop Alexa Skills - Codemotion Rome 2019

  • 1. Design and Develop Alexa Skills Alessandra Petromilli and Federico Baron Rome | March 22 - 23, 2019
  • 2. Alessandra Petromilli CXO, I drive the User Experience Strategy and Teams at ibuildings Italia @aleanan
  • 3. Federico Baron Principal Solution Architect at ibuildings Italia Find me on Linkedin!
  • 4. User Under the hood Device FulfillmentArtificial Intelligence
  • 8. The process Goal Definition Personas and User Stories Script and Conversation Flow Usability Testing
  • 13. Utente: Alexa apri Filastrocche della buona notte Alexa: Ciao, con Filastrocche della buona notte possiamo ascoltare insieme delle belle filastrocche! Posso suggerirtene alcune io, puoi chiedermi tu un titolo preciso tra quelli disponibili sull'app o puoi ascoltare tutta la collezione dall'inizio alla fine. Vuoi ascoltare la luna, Guido il Ghiro o il sole?
  • 16. Interactions Conversation Flow Launch request First run? Welcome to text (introduce your skill) Welcome to text (introduce your skill) Welcome to text (introduce your skill) < intent > Nursery rhyme suggested by alexa < intent > Nursery rhyme suggested by the user < intent > play all (audio player mode) Help yes no
  • 22. Technology is not somebody else’s problem
  • 25. Voice X Anil Kumar Krishnashetty founder of Berlin Lean Prototyping
  • 31. Developer console: define the interaction model using the web application
  • 32. Let’s start! Register to Amazon developers and open your Alexa Developer Console • Web console to create and manage the lifecycle of your skills • UI to configure skill's manifest and models • Browser test environment (device simulator) • Certification process management • Analytics
  • 33. Use the web GUI to setup you interaction model
  • 34. Interaction model: use Alexa’s built-in elements as much as you can
  • 35. Some built-in elements you can take advantage of defining your model • built-in intents (AMAZON.YesIntent, AMAZON.NextIntent, AMAZON.RepeatIntent, …) • built-in slot types (AMAZON.Date, AMAZON.Number, AMAZON.City, …) • use dialog model to delegate to Alexa a multi- turn conversation with the user
  • 36. Sample Utterances • reproduce flexibility and variation of spoken language in the real world • add utterances to start interaction ("Alexa, ask Daily Horoscopes for/about/to") • it is better to provide too many samples than to provide too few • tools to generate utterances (ex. amazon-echo- utterance-expander)
  • 38. One minute setup with AWS lambda and NodeJs • Log in to the AWS Management Console and navigate to AWS Lambda. • Create new Lamda function • Define a role for the function from “Simple Microservice” permissions template • Add and Configure the Alexa Skills Kit Triggers (insert skill-id) • Add Lambda endpoint (arn) to the skill
  • 39. resource "aws_iam_role" "my-skill-role" { name = "my-skill-role" assume_role_policy = <<EOF { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "Service": "lambda.amazonaws.com" }, "Effect": "Allow", "Sid": "" } ] } EOF } resource "aws_iam_role_policy_attachment" "my-skill-role-policy-dynamo-att" { role = "${aws_iam_role.my-skill-role.name}” policy_arn = "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess" } resource "aws_iam_role_policy_attachment" "my-skill-role-policy-lambda-att" { role = "${aws_iam_role.my-skill-role.name}” policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" }
  • 40. resource "aws_lambda_function" "my-skill-lambda" { filename = "index.zip" function_name = "my-skill-name" role = "${aws_iam_role.my-skill-role.arn}” handler = "src/index.handler" runtime = "nodejs8.10" } resource "aws_lambda_permission" "my-skill-lambda-perm" { statement_id = "AllowExecutionFromAlexa" action = "lambda:InvokeFunction" function_name = "${aws_lambda_function.my-skill-lambda.function_name}” principal = "alexa-appkit.amazon.com" event_source_token = "${var.skill-id}" }
  • 41. move to a comfortable development environment • ask init (setup cli tool linking Amazon Developer and AWS accounts) • ask clone • ask deploy
  • 43. Simple introduction to NodeJS sdk const Alexa = require('ask-sdk’); // … exports.handler = Alexa.SkillBuilders.standard() .addResponseInterceptors(SavePersistentAttributesResponseInterceptor) .addRequestHandlers( LaunchRequestHandler, PlayRhymeHandler, PlayRandomHandler, ReplayHandler, PreviousHandler, PlayAllHandler, AudioPlayerEventHandler, ResumeHandler, YesHandler, NoHandler, HelpHandler, SessionEndedHandler, ExitHandler ) .addErrorHandlers(ErrorHandler) .withTableName('my-skill-table') .withAutoCreateTable(true) .lambda();
  • 44. Simple introduction to NodeJS sdk // ... const PlayRhymeHandler = { canHandle(handlerInput) { // Conditions to determine the requests this handler can handle const request = handlerInput.requestEnvelope.request; return request.type === ‘IntentRequest’ && request.intent.name === ‘PlayRhymeIntent’; }, handle(handlerInput, error) { // Execution logic for the handler return handlerInput.responseBuilder .speak(‘Mi dispiace ma questa filastrocca non è presente. Vuoi che te ne suggerisca una io?’) .reprompt(‘Vuoi che te ne suggerisca una io?’) .getResponse(); }, }; // ...
  • 45. The importance of “session” for a voice app • The skill session continues as the user speaks to Alexa and your skill responds to Alexa • The skill session ends when the user fails to respond (8 seconds plus 8 more if re-prompt is specified) or when the skill sets the shouldEndSession property to true • Once you are out of the session, you must invoke the skill by saying something, such as "Alexa, open [skill's invocation name]"
  • 46. Using attributes Saving the skill state is really important in order to personalize the user experience and to implement multi-turn conversations Session attributes • maintaned during the session • Ex. store the request’s history to implement multi-turn conversation Persistent attributes • persisted on database • Ex. store last interaction date
  • 48. a very helpful feedback • follow the submission checklist • write Testing Instructions to help the validation team