SlideShare a Scribd company logo
Beyond Web Interfaces
Fabrizio Ciacchi / Spryker Systems GmbH.
2018 Spryker Systems GmbH 2
I’m Fabrizio
Software Engineer at Spryker
http://ciacchi.it - https://spryker.com
What is this talk about?
● Give you insights so you can
start to look into the best
articles, tools and books;
● Tell you real examples of
(chat/voice) bots. How to
implement them, so to solve
real problems;
● Discuss solutions and ideas
on how bots should solve
existing problems.
2018 Spryker Systems GmbH
It’s the next Far West
3
“Alexa, add soap to my shopping cart”
“I would like to see who sells shoes nearby”
2018 Spryker Systems GmbH
It’s the next Far West
4
Alexa
Hey Siri
Hey
Cortana
Ok Google
Cloud (AWS)
AI (Lex, Polly)
Machine Learning
Alexa (Voice-bot)
https://aws.amazon.com/mac
hine-learning/
Cloud (Azure)
AI & ML
Any Windows device?
https://azure.microsoft.com/en-us/o
verview/ai-platform/
Apple Watch
Siri/Assistant
Shortcuts
(not to mention Apple Car)
Google Cloud
Google Home
Tensorflow
Dialogflow
https://dialogflow.com/
Facebook
Messenger / WhatsApp
PyTorch / Wit.ai
Marketplace
https://pytorch.org/
IBM
Watson & Cloud
https://www.ibm.com/cloud/ai
2018 Spryker Systems GmbH
User Journey
5
Search - 50 results
Response - 2 sec
Checkout - 4/5 steps
10 results
300-500 msec
1-2 steps
3 results
100 msec*
1 click
Chat VS Voice
2018 Spryker Systems GmbH
Similarities
7
− Convey small information
− Users want to ask for info
− Time interaction is short
− Narrow down to intent/response
shipment
tomorrow
30
seconds
getShipmentInfo
2018 Spryker Systems GmbH
Differences
8
− Voice better for informative skills
− Voice has longer message/interactions
− Use cases are different
− Different technologies
Where is my
shipment?
It will be delivered tomorrow
shipment
tomorrow
getShipmentInfo Check (shipment) of (order)
Tell me more
DILBERT
2018 Spryker Systems GmbH
Start simple
10
− My example uses a Simple PHP Application:
Can be Symfony, Spryker or any other framework
− Botman with Regular Expressions
https://botman.io/
Lavaravel module - Open source - Works also in Symfony
https://gist.github.com/fciacchi/30bcff6d77ff40ae811740efa338adf0
− Use Docker & Ngrok
https://gist.github.com/fciacchi/0a85530efb0f05396c21778af22ff1cc
https://ngrok.com/
$ ./ngrok http -subdomain=yousubdomain -region eu 192.168.99.100:80
http://localhost:4040
2018 Spryker Systems GmbH
Conversations in PHP
11
− Then you can start grouping the
intents and the conversations
https://botman.io/2.0/conversations
2018 Spryker Systems GmbH
Backend Design
12
Build a Facebook Bot: https://blog.spryker.com/how-to-build-bot-5-steps
2018 Spryker Systems GmbH
Wit.ai
13
CONFIDENCE
2018 Spryker Systems GmbH
And a Conversation manager
14
We start with a
State machine
context-1context-2context-3
Intent xyv (sub: step 1)
Intent def (sub: step 2)
….
sessionnavigation
Next
Previous
Last
….
SESSION
Last Intent: getRestaurants
Context: context-2
Item selected: 3
Location: Berlin
Filter:
- type: sushi
- price: $$
….
2018 Spryker Systems GmbH
Example Location
15
City: Berlin
Airport: TXL, SXF
SESSION
Zip Code: 10117
Address: Friedrichstraße 43
Lat: 52.520450
Lon: 13.407320 3h
1d
Speaking of Alexa
Alexa Skill creator
172018 Spryker Systems GmbH - Fabrizio Ciacchi
https://developer.amazon.com/designing-for-voice/
Get the Skill’s JSON
182018 Spryker Systems GmbH - Fabrizio Ciacchi
https://skillinator.io/
NodeJS function 1/2
19
https://console..amazon.com/console/home
https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1#
"getCalendarByDay": function () {
var speechOutput = "I didn't understand. Can you repeat?";
var self = this;
var daySlotRaw = this.event.request.intent.slots.day.value;
console.log(daySlotRaw);
var daySlot = resolveCanonical(this.event.request.intent.slots.day);
console.log(daySlot);
var url = 'https://flybybot.eu.ngrok.io/ikarus/alexa/calendar?day='+daySlot;
2018 Spryker Systems GmbH - Fabrizio Ciacchi
Lambda function 2/2
20
...
https.get( url, function( response ) {
var str = '';
response.on('data', function (chunk) {
str += chunk;
});
response.on('end', function () {
jsonResponse = JSON.parse(str);
console.log("RESPONSE ---> " + jsonResponse.response);
self.emit(':ask', 'On ' + daySlot + ' ' + jsonResponse.response);
} );
} );
},
2018 Spryker Systems GmbH - Fabrizio Ciacchi
Model: https://gist.github.com/fciacchi/61d42439f413d8faffd4a284b2aaee99
Lambda: https://gist.github.com/fciacchi/4415a55b3dbc5eeede3bdccf76fc663e
2018 Spryker Systems GmbH
A simple Alexa skill dialog
21
2018 Spryker Systems GmbH
A simple Alexa skill dialog
22
2018 Spryker Systems GmbH
Design to a new level
23
Build Lambda function for Google and Amazon:
https://www.raizlabs.com/dev/2017/01/build-ai-assi
stant-api-ai-amazon-lambda/
API Design
2018 Spryker Systems GmbH
Use HTTP verbs
25
− There are many HTTP verbs and you can apply them on both collections or elements.
Make it simple and stick to it.
− HTTP verbs should be mapped 1-to-1 to CRUD operations.
(but use encoded IDs/structure)
2018 Spryker Systems GmbH
Use HTTP response codes
26
− There are many HTTP response codes, use it!
− 200 (GET)
− 201 + Location (POST)
− 204 (PUT/DELETE)
− 301 Moved Permanently
− 404 Resource not found (/customers/5 -> does not exists)
− 405 Method not allowed (should tell which verbs are allowed)
− 409 Conflict (try to insert twice the same resource)
− 415 Unsupported media type
− 422 Unprocessable entity (wrong payload POST)
− 500 Managed Exceptions
2018 Spryker Systems GmbH
DDD Approach
27
− Use the ‘Domain’ definition as in the Domain Driven Design to define your API:
− Customer is one domain
− Wishlist is one domain
− Cart is one domain
Interesting Reading:
https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/
30%
Saved in Wrong API Calls
− JSON API:
http://jsonapi.org/
− JWT token:
https://jwt.io/
− REST API Refactor:
https://www.slideshare.net/ciacchi/rest-api-
a-real-case-scenario
− Build REST API with
Symfony:
https://williamdurand.fr/2012/08/02/rest-api
s-with-symfony2-the-right-way/
Why design good API?
Design Tips
2018 Spryker Systems GmbH
Design tips
30
Ulrike Eisengräber @ Rasa.com
http://blog.rasa.com/13-rules-for-cui-design/
● Rule n.3: Offer Informative Feedback.
● Rule 12: Make Use Of Familiar Concepts.
● Rule 8: Reduce Short-term Memory Load.
● Rule 5: Prevent Errors & Rule 11: Have A Fallback Option
● Rule 4: Design Dialogs To Provide Closure
● But you can also try new things...
When is the next train?
What time is my appointment?
2018 Spryker Systems GmbH
VisualBots
31
DROP
Welcome
Question 1 -37%
Question 2 -4%
Question 3 0%
… 0%
Question 9 0%
https://www.visualbots.io/
Livio Marcheschi
2018 Spryker Systems GmbH
Latest News
32
https://developers.facebook.com/docs/mes
senger-platform/send-messages/personas/
FB Mess. Personas
https://techcrunch.com/2018/09/20/the-lo
ng-list-of-new-alexa-devices-amazon-ann
ounced-at-its-hardware-event/
New Alexa Devices Portal FB/Alexa
http://bit.ly/fb-portal-alexa
Machine Learning
2018 Spryker Systems GmbH
Machine Learning
34
Machine Learning For Dummies, IBM Limited Edition
2018 Spryker Systems GmbH
Links to Learn
− Facebook Developer Circle
https://www.facebook.com/groups/DevCBerlin/
− Session 1: Intro to Machine Learning
Wen-Ru Sheu / Backend Engineer @Visual Meta GmbH
http://bit.ly/ml-session-1
https://tinyurl.com/machinelearning-intro-1
− Session 2: Neural Networks
Christopher Lennan / Senior Data Scientist @Idealo.de
http://bit.ly/ml-session-2
https://tinyurl.com/machinelearning-intro-2
− Session 3: Natural Language Processing (Lennan + Sheu)
http://bit.ly/ml-session-3
https://tinyurl.com/machinelearning-intro-3
− ML 101:
http://bit.ly/machine-learning-101
− Build Intelligent Bots in Python:
https://speakerdeck.com/kprzystalski/building-intelligent-bots-in-python
− Start With NLP:
https://towardsdatascience.com/an-easy-introduction-to-natural-language-processing-b1e2801291c1
35
2018 Spryker Systems GmbH
Books
36
− https://oreil.ly/2pDdHYH https://oreil.ly/2G9ZR7d http://bit.ly/2G7Ggo4
2018 Spryker Systems GmbH
Some Examples
37
https://youtu.be/WLu6K8w8P1Q https://youtu.be/O5Jz_67iN30
https://youtu.be/elqsMF2Bd4k
spryker.com / ciacchi.it
fabrizio.ciacchi@gmail.com
twitter @sprysys @ciacchi
Thanks
http://ciacchi.it/CodeteCon-v4-2018-Ciacchi-Bot.pdf
Beyond Web
Interfaces
Fabrizio Ciacchi
Icons designed by Freepik from Flaticon

More Related Content

Similar to Beyond Web Interfaces

Build 2019 Recap
Build 2019 RecapBuild 2019 Recap
Build 2019 Recap
Eran Stiller
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
n|u - The Open Security Community
 
ICSE 2022 SEIP: Toward Among-Device AI from On-Device AI with Stream Pipelines
ICSE 2022 SEIP: Toward Among-Device AI from On-Device AI with Stream PipelinesICSE 2022 SEIP: Toward Among-Device AI from On-Device AI with Stream Pipelines
ICSE 2022 SEIP: Toward Among-Device AI from On-Device AI with Stream Pipelines
MyungJoo Ham
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp
 
How to leverage APIs & Scrapers in App Store Optimization
How to leverage APIs & Scrapers in App Store OptimizationHow to leverage APIs & Scrapers in App Store Optimization
How to leverage APIs & Scrapers in App Store Optimization
Romain Golfier
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
André Goliath
 
ScriptRunner introduction
ScriptRunner introductionScriptRunner introduction
ScriptRunner introduction
Heiko Brenn
 
Kono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdf
Kono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdfKono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdf
Kono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdf
Anant Corporation
 
Corona geek
Corona geekCorona geek
Corona geek
Scott Harrison
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Alberto González Trastoy
 
Building Better IoT Applications without Servers
Building Better IoT Applications without ServersBuilding Better IoT Applications without Servers
Building Better IoT Applications without Servers
Ian Massingham
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
The Reference
 
Encode Club Hackathon
Encode Club Hackathon  Encode Club Hackathon
Encode Club Hackathon
Vanessa Lošić
 
Salesforce IoT Cloud Explorer Edition with Raspberry Pi
Salesforce IoT Cloud Explorer Edition with Raspberry PiSalesforce IoT Cloud Explorer Edition with Raspberry Pi
Salesforce IoT Cloud Explorer Edition with Raspberry Pi
Dinesh Kumar Wickramasinghe
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Cyber Security Alliance
 
Intelligence Artificielle sur AWS - Retours d'expériences
Intelligence Artificielle sur AWS - Retours d'expériencesIntelligence Artificielle sur AWS - Retours d'expériences
Intelligence Artificielle sur AWS - Retours d'expériences
Adeline Garrigues
 
Sps Boston The Share Point Beast
Sps Boston   The Share Point BeastSps Boston   The Share Point Beast
Sps Boston The Share Point Beast
gueste918732
 
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMSPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
amitvasu
 
Accelerating AdTech on AWS in Japan
Accelerating AdTech on AWS in JapanAccelerating AdTech on AWS in Japan
Accelerating AdTech on AWS in Japan
Eiji Shinohara
 
APIdays Barcelona 2019 - How to build a social network on Serverless with Yan...
APIdays Barcelona 2019 - How to build a social network on Serverless with Yan...APIdays Barcelona 2019 - How to build a social network on Serverless with Yan...
APIdays Barcelona 2019 - How to build a social network on Serverless with Yan...
apidays
 

Similar to Beyond Web Interfaces (20)

Build 2019 Recap
Build 2019 RecapBuild 2019 Recap
Build 2019 Recap
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
ICSE 2022 SEIP: Toward Among-Device AI from On-Device AI with Stream Pipelines
ICSE 2022 SEIP: Toward Among-Device AI from On-Device AI with Stream PipelinesICSE 2022 SEIP: Toward Among-Device AI from On-Device AI with Stream Pipelines
ICSE 2022 SEIP: Toward Among-Device AI from On-Device AI with Stream Pipelines
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
 
How to leverage APIs & Scrapers in App Store Optimization
How to leverage APIs & Scrapers in App Store OptimizationHow to leverage APIs & Scrapers in App Store Optimization
How to leverage APIs & Scrapers in App Store Optimization
 
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
Von JavaEE auf Microservice in 6 Monaten - The Good, the Bad, and the wtfs...
 
ScriptRunner introduction
ScriptRunner introductionScriptRunner introduction
ScriptRunner introduction
 
Kono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdf
Kono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdfKono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdf
Kono.IntelCraft.Weekly.AI.LLM.Landscape.2024.02.28.pdf
 
Corona geek
Corona geekCorona geek
Corona geek
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Building Better IoT Applications without Servers
Building Better IoT Applications without ServersBuilding Better IoT Applications without Servers
Building Better IoT Applications without Servers
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
 
Encode Club Hackathon
Encode Club Hackathon  Encode Club Hackathon
Encode Club Hackathon
 
Salesforce IoT Cloud Explorer Edition with Raspberry Pi
Salesforce IoT Cloud Explorer Edition with Raspberry PiSalesforce IoT Cloud Explorer Edition with Raspberry Pi
Salesforce IoT Cloud Explorer Edition with Raspberry Pi
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
 
Intelligence Artificielle sur AWS - Retours d'expériences
Intelligence Artificielle sur AWS - Retours d'expériencesIntelligence Artificielle sur AWS - Retours d'expériences
Intelligence Artificielle sur AWS - Retours d'expériences
 
Sps Boston The Share Point Beast
Sps Boston   The Share Point BeastSps Boston   The Share Point Beast
Sps Boston The Share Point Beast
 
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMSPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
 
Accelerating AdTech on AWS in Japan
Accelerating AdTech on AWS in JapanAccelerating AdTech on AWS in Japan
Accelerating AdTech on AWS in Japan
 
APIdays Barcelona 2019 - How to build a social network on Serverless with Yan...
APIdays Barcelona 2019 - How to build a social network on Serverless with Yan...APIdays Barcelona 2019 - How to build a social network on Serverless with Yan...
APIdays Barcelona 2019 - How to build a social network on Serverless with Yan...
 

Recently uploaded

存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
fovkoyb
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
nhiyenphan2005
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 

Recently uploaded (20)

存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 

Beyond Web Interfaces

  • 1. Beyond Web Interfaces Fabrizio Ciacchi / Spryker Systems GmbH.
  • 2. 2018 Spryker Systems GmbH 2 I’m Fabrizio Software Engineer at Spryker http://ciacchi.it - https://spryker.com What is this talk about? ● Give you insights so you can start to look into the best articles, tools and books; ● Tell you real examples of (chat/voice) bots. How to implement them, so to solve real problems; ● Discuss solutions and ideas on how bots should solve existing problems.
  • 3. 2018 Spryker Systems GmbH It’s the next Far West 3 “Alexa, add soap to my shopping cart” “I would like to see who sells shoes nearby”
  • 4. 2018 Spryker Systems GmbH It’s the next Far West 4 Alexa Hey Siri Hey Cortana Ok Google Cloud (AWS) AI (Lex, Polly) Machine Learning Alexa (Voice-bot) https://aws.amazon.com/mac hine-learning/ Cloud (Azure) AI & ML Any Windows device? https://azure.microsoft.com/en-us/o verview/ai-platform/ Apple Watch Siri/Assistant Shortcuts (not to mention Apple Car) Google Cloud Google Home Tensorflow Dialogflow https://dialogflow.com/ Facebook Messenger / WhatsApp PyTorch / Wit.ai Marketplace https://pytorch.org/ IBM Watson & Cloud https://www.ibm.com/cloud/ai
  • 5. 2018 Spryker Systems GmbH User Journey 5 Search - 50 results Response - 2 sec Checkout - 4/5 steps 10 results 300-500 msec 1-2 steps 3 results 100 msec* 1 click
  • 7. 2018 Spryker Systems GmbH Similarities 7 − Convey small information − Users want to ask for info − Time interaction is short − Narrow down to intent/response shipment tomorrow 30 seconds getShipmentInfo
  • 8. 2018 Spryker Systems GmbH Differences 8 − Voice better for informative skills − Voice has longer message/interactions − Use cases are different − Different technologies Where is my shipment? It will be delivered tomorrow shipment tomorrow getShipmentInfo Check (shipment) of (order)
  • 10. 2018 Spryker Systems GmbH Start simple 10 − My example uses a Simple PHP Application: Can be Symfony, Spryker or any other framework − Botman with Regular Expressions https://botman.io/ Lavaravel module - Open source - Works also in Symfony https://gist.github.com/fciacchi/30bcff6d77ff40ae811740efa338adf0 − Use Docker & Ngrok https://gist.github.com/fciacchi/0a85530efb0f05396c21778af22ff1cc https://ngrok.com/ $ ./ngrok http -subdomain=yousubdomain -region eu 192.168.99.100:80 http://localhost:4040
  • 11. 2018 Spryker Systems GmbH Conversations in PHP 11 − Then you can start grouping the intents and the conversations https://botman.io/2.0/conversations
  • 12. 2018 Spryker Systems GmbH Backend Design 12 Build a Facebook Bot: https://blog.spryker.com/how-to-build-bot-5-steps
  • 13. 2018 Spryker Systems GmbH Wit.ai 13 CONFIDENCE
  • 14. 2018 Spryker Systems GmbH And a Conversation manager 14 We start with a State machine context-1context-2context-3 Intent xyv (sub: step 1) Intent def (sub: step 2) …. sessionnavigation Next Previous Last …. SESSION Last Intent: getRestaurants Context: context-2 Item selected: 3 Location: Berlin Filter: - type: sushi - price: $$ ….
  • 15. 2018 Spryker Systems GmbH Example Location 15 City: Berlin Airport: TXL, SXF SESSION Zip Code: 10117 Address: Friedrichstraße 43 Lat: 52.520450 Lon: 13.407320 3h 1d
  • 17. Alexa Skill creator 172018 Spryker Systems GmbH - Fabrizio Ciacchi https://developer.amazon.com/designing-for-voice/
  • 18. Get the Skill’s JSON 182018 Spryker Systems GmbH - Fabrizio Ciacchi https://skillinator.io/
  • 19. NodeJS function 1/2 19 https://console..amazon.com/console/home https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1# "getCalendarByDay": function () { var speechOutput = "I didn't understand. Can you repeat?"; var self = this; var daySlotRaw = this.event.request.intent.slots.day.value; console.log(daySlotRaw); var daySlot = resolveCanonical(this.event.request.intent.slots.day); console.log(daySlot); var url = 'https://flybybot.eu.ngrok.io/ikarus/alexa/calendar?day='+daySlot; 2018 Spryker Systems GmbH - Fabrizio Ciacchi
  • 20. Lambda function 2/2 20 ... https.get( url, function( response ) { var str = ''; response.on('data', function (chunk) { str += chunk; }); response.on('end', function () { jsonResponse = JSON.parse(str); console.log("RESPONSE ---> " + jsonResponse.response); self.emit(':ask', 'On ' + daySlot + ' ' + jsonResponse.response); } ); } ); }, 2018 Spryker Systems GmbH - Fabrizio Ciacchi Model: https://gist.github.com/fciacchi/61d42439f413d8faffd4a284b2aaee99 Lambda: https://gist.github.com/fciacchi/4415a55b3dbc5eeede3bdccf76fc663e
  • 21. 2018 Spryker Systems GmbH A simple Alexa skill dialog 21
  • 22. 2018 Spryker Systems GmbH A simple Alexa skill dialog 22
  • 23. 2018 Spryker Systems GmbH Design to a new level 23 Build Lambda function for Google and Amazon: https://www.raizlabs.com/dev/2017/01/build-ai-assi stant-api-ai-amazon-lambda/
  • 25. 2018 Spryker Systems GmbH Use HTTP verbs 25 − There are many HTTP verbs and you can apply them on both collections or elements. Make it simple and stick to it. − HTTP verbs should be mapped 1-to-1 to CRUD operations. (but use encoded IDs/structure)
  • 26. 2018 Spryker Systems GmbH Use HTTP response codes 26 − There are many HTTP response codes, use it! − 200 (GET) − 201 + Location (POST) − 204 (PUT/DELETE) − 301 Moved Permanently − 404 Resource not found (/customers/5 -> does not exists) − 405 Method not allowed (should tell which verbs are allowed) − 409 Conflict (try to insert twice the same resource) − 415 Unsupported media type − 422 Unprocessable entity (wrong payload POST) − 500 Managed Exceptions
  • 27. 2018 Spryker Systems GmbH DDD Approach 27 − Use the ‘Domain’ definition as in the Domain Driven Design to define your API: − Customer is one domain − Wishlist is one domain − Cart is one domain Interesting Reading: https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/
  • 28. 30% Saved in Wrong API Calls − JSON API: http://jsonapi.org/ − JWT token: https://jwt.io/ − REST API Refactor: https://www.slideshare.net/ciacchi/rest-api- a-real-case-scenario − Build REST API with Symfony: https://williamdurand.fr/2012/08/02/rest-api s-with-symfony2-the-right-way/ Why design good API?
  • 30. 2018 Spryker Systems GmbH Design tips 30 Ulrike Eisengräber @ Rasa.com http://blog.rasa.com/13-rules-for-cui-design/ ● Rule n.3: Offer Informative Feedback. ● Rule 12: Make Use Of Familiar Concepts. ● Rule 8: Reduce Short-term Memory Load. ● Rule 5: Prevent Errors & Rule 11: Have A Fallback Option ● Rule 4: Design Dialogs To Provide Closure ● But you can also try new things... When is the next train? What time is my appointment?
  • 31. 2018 Spryker Systems GmbH VisualBots 31 DROP Welcome Question 1 -37% Question 2 -4% Question 3 0% … 0% Question 9 0% https://www.visualbots.io/ Livio Marcheschi
  • 32. 2018 Spryker Systems GmbH Latest News 32 https://developers.facebook.com/docs/mes senger-platform/send-messages/personas/ FB Mess. Personas https://techcrunch.com/2018/09/20/the-lo ng-list-of-new-alexa-devices-amazon-ann ounced-at-its-hardware-event/ New Alexa Devices Portal FB/Alexa http://bit.ly/fb-portal-alexa
  • 34. 2018 Spryker Systems GmbH Machine Learning 34 Machine Learning For Dummies, IBM Limited Edition
  • 35. 2018 Spryker Systems GmbH Links to Learn − Facebook Developer Circle https://www.facebook.com/groups/DevCBerlin/ − Session 1: Intro to Machine Learning Wen-Ru Sheu / Backend Engineer @Visual Meta GmbH http://bit.ly/ml-session-1 https://tinyurl.com/machinelearning-intro-1 − Session 2: Neural Networks Christopher Lennan / Senior Data Scientist @Idealo.de http://bit.ly/ml-session-2 https://tinyurl.com/machinelearning-intro-2 − Session 3: Natural Language Processing (Lennan + Sheu) http://bit.ly/ml-session-3 https://tinyurl.com/machinelearning-intro-3 − ML 101: http://bit.ly/machine-learning-101 − Build Intelligent Bots in Python: https://speakerdeck.com/kprzystalski/building-intelligent-bots-in-python − Start With NLP: https://towardsdatascience.com/an-easy-introduction-to-natural-language-processing-b1e2801291c1 35
  • 36. 2018 Spryker Systems GmbH Books 36 − https://oreil.ly/2pDdHYH https://oreil.ly/2G9ZR7d http://bit.ly/2G7Ggo4
  • 37. 2018 Spryker Systems GmbH Some Examples 37 https://youtu.be/WLu6K8w8P1Q https://youtu.be/O5Jz_67iN30 https://youtu.be/elqsMF2Bd4k
  • 38. spryker.com / ciacchi.it fabrizio.ciacchi@gmail.com twitter @sprysys @ciacchi Thanks http://ciacchi.it/CodeteCon-v4-2018-Ciacchi-Bot.pdf Beyond Web Interfaces Fabrizio Ciacchi Icons designed by Freepik from Flaticon