SlideShare a Scribd company logo
Building Scalable Chatbots by Empowering
Content Creators
Edouard Malet
Data Scientist, N26
Rasa Developer Summit - 2019
Edouard Malet 24/09/19
by Empowering Content Creators
Building Scalable Chatbots
1
Rasa Summit
Introduction
01
2
Markets
N26 Customer
Service at a
Glance
3.5M+
Customers
26
Countries
5
Supported languages
3
3
Different markets (EU/UK/US)
How do we respond to a growing customer base?
Why a
chatbot?
4
Oct 2014 Dec 2015 Mar 2016 Jan 2017 Sep 2017 Mar 2018 June 2018 Oct 2018 Jan 2019Jan 2019
5
75 000
125 000
250 000
500.000
850.000
1 Million
1,5 Million
2 Million
2.5 Million
3 Million
3,5 Million
Mar 2019 Jun 2019
3.5 Million
Users
June 2019
5
How do we respond to a growing customer base?
Scale Customer Service in line with growth
Why a
chatbot?
6
How do we let people ask us questions?
7
How do we respond to a growing customer base?
Scale Customer Service in line with growth
Why a
chatbot?
8
How do we let people ask us questions?
Natural Language Querying
How do we support people around the clock?
How do we respond to a growing customer base?
Scale Customer Service in line with growth
Why a
chatbot?
9
How do we let people ask us questions?
Natural Language Querying
How do we support people around the clock?
24/7 support
How do we respond to a growing customer base?
Scale Customer Service in line with growth
Why a
chatbot? How do we support people around the clock?
24/7 support
How do we let people ask us questions?
Natural Language Querying
10
How do we solve problems in one contact?
11
How do we respond to a growing customer base?
Scale Customer Service in line with growth
Why a
chatbot? How do we support people around the clock?
24/7 support
How do we let people ask us questions?
Natural Language Querying
12
How do we solve problems in one contact?
Rule-based routing
02Tech stack
13
Technologies
14
Training data
format
15
NLU
## intent:want_statement
- hi there, I would like to receive my [balance statement](statement_type)
- can you say where I can find the annual statement for 2018
16
## intent:want_statement
- hi there, I would like to receive my [balance statement](statement_type)
- can you say where I can find the annual statement for 2018
Core
Training data
format part I:
Stories
17
## want_statement basic
* greet
- action_welcome
* want_statement{"statement_type": "balance statement"}
- utter_ack
- utter_want_statetement_balance_statement_1
- utter_want_statetement_balance_statement_2
- utter_want_statetement_balance_statement_3
- utter_want_statetement_balance_statement_4
18
## want_statement basic
* greet
- action_welcome
* want_statement{"statement_type": "balance statement"}
- utter_ack
- utter_want_statetement_balance_statement_1
- utter_want_statetement_balance_statement_2
- utter_want_statetement_balance_statement_3
- utter_want_statetement_balance_statement_4
slots:
statement_type:
type: unfeaturized
entities:
- statement_type
intents:
- greet
- want_statement
actions:
- action_welcome
- utter_want_statement_balance_statement_1
- utter_want_statement_balance_statement_2
- utter_want_statement_balance_statement_3
- utter_want_statement_balance_statement_4
templates:
utter_want_statement_balance_statement_1:
- text: "You can find your {{balance statements}} in both the web app
and the mobile app."
link_id: STATEMENTS_001
Core
Training data
format part II:
Domain
19
20
slots:
statement_type:
type: unfeaturized
entities:
- statement_type
intents:
- greet
- want_statement
actions:
- action_welcome
- utter_want_statement_balance_statement_1
- utter_want_statement_balance_statement_2
- utter_want_statement_balance_statement_3
- utter_want_statement_balance_statement_4
templates:
utter_want_statement_balance_statement_1:
- text: "You can find your {{balance statements}} in both the web app
and the mobile app."
link_id: STATEMENTS_001
Challenges Writing custom actions
How do we allow content creators to create actions
without coding?
Serving multiple markets
How do we ensure consistency across markets?
Serving multilingual content
How do we serve the content in 5 languages?
21
Deploy to different markets
How to make it easy to launch to new markets?
Implementation
03
22
%
Data Scientists
Content creators
50 %
50
23
DATA SCIENCE
Responsibilities
24
Store training data
Train models
Unit/Integration/Model Testing
API Development
25
CONTENT
Responsibilities
Transfer domain knowledge into
Intents, entities and stories
Keep up with Product releases
Add new languages/markets
Challenges
Serving multilingual content
How do we serve the content in 5 languages?
26
%
Data Scientists
Content creators
50 %
50
27
28
## intent:want_statement
- hi there, I would like to receive my [balance statement](statement_type)
- can you say where I can find the annual statement for 2018
NLU
Making entities
language-agnostic
29
30
- id: Q1413339
slot_name: statement_type
description: No description defined
en:
label: balance statement
synonyms:
- balance statements
- transfer statement
fr:
label: relevé de compte
synonyms:
- relevés
- releves
- relevés de compte
- extrait de compte
31
## synonym:Q1413339
- balance statement
- balance statements
- transfer statement
32
{
"text": "Hi, how can I download my balance statement?",
"intent": {
"name": "want_statement",
"confidence": 0.9768562913
},
"entities": [
{
"start": 26,
"end": 43,
"value": "Q1413339",
"entity": "statement_type",
"confidence": 0.9523699849,
"extractor": "CRFEntityExtractor",
"processors": [
"EntitySynonymMapper"
]
}
],
}
33
## want_statement basic
* greet
- action_welcome
* want_statement{"statement_type": "Q1413339"}
- utter_ack
- utter_want_statetement_balance_statement_1
- utter_want_statetement_balance_statement_2
- utter_want_statetement_balance_statement_3
- utter_want_statetement_balance_statement_4
Challenges
Serving multiple markets
How do we ensure consistency across markets?
Serving multilingual content
How do we serve the content in 5 languages?
34
Consistency
through
sharing
35
36
include:
- want_statement_uk
exclude:
- want_statement
Challenges Writing custom actions
How do we allow content creators to create actions
without coding?
Serving multiple markets
How do we ensure consistency across markets?
Serving multilingual content
How do we serve the content in 5 languages?
37
PROBLEM
Actions are
Python code
38
"""Helper module for the action.py module."""
from rasa_core_sdk import Action
import requests
from utils.sender_id_converter import sender_id_to_dict
from utils.setup import setup_config
def live_agent_availability(sender_id):
"""Call the endpoint to know about agent availability."""
try:
user_id = sender_id_to_dict(sender_id)["user_id"]
headers = {"x-n26-userid": user_id}
r = requests.get(
setup_config.agent_availability_endpoint, headers=headers, timeout=1
)
if r.status_code == 200:
return r.json()["liveagent"]["status"] == "AVAILABLE"
else:
return False
except requests.exceptions.RequestException:
return False
class ActionWelcome(Action):
"""Welcomes a user depending on agent's availability."""
def name(self):
"""Name."""
return "action_welcome"
def run(self, dispatcher, tracker, domain):
"""Run."""
live_agent_available = live_agent_availability(tracker.sender_id)
if live_agent_available:
dispatcher.utter_template("utter_welcome_1", tracker)
dispatcher.utter_template("utter_welcome_2", tracker)
else:
dispatcher.utter_template("utter_welcome_no_humans_1", tracker)
dispatcher.utter_template("utter_welcome_no_humans_2", tracker)
return []
39
"""Helper module for the action.py module."""
from rasa_core_sdk import Action
import requests
from utils.sender_id_converter import sender_id_to_dict
from utils.setup import setup_config
def live_agent_availability(sender_id):
"""Call the endpoint to know about agent availability."""
try:
user_id = sender_id_to_dict(sender_id)["user_id"]
headers = {"x-n26-userid": user_id}
r = requests.get(
setup_config.agent_availability_endpoint, headers=headers, timeout=1
)
if r.status_code == 200:
return r.json()["liveagent"]["status"] == "AVAILABLE"
else:
return False
except requests.exceptions.RequestException:
return False
class ActionWelcome(Action):
"""Welcomes a user depending on agent's availability."""
def name(self):
"""Name."""
return "action_welcome"
def run(self, dispatcher, tracker, domain):
"""Run."""
live_agent_available = live_agent_availability(tracker.sender_id)
if live_agent_available:
dispatcher.utter_template("utter_welcome_1", tracker)
dispatcher.utter_template("utter_welcome_2", tracker)
else:
dispatcher.utter_template("utter_welcome_no_humans_1", tracker)
dispatcher.utter_template("utter_welcome_no_humans_2", tracker)
return []
40
action_welcome:
- condition:
live_agent_available: true
dispatch:
- utter_welcome_1
- utter_welcome_2
- condition:
live_agent_available: false
dispatch:
- utter_welcome_no_humans_1
- utter_welcome_no_humans_2
SOLUTION
Dynamic action
creation
41
action_test:
- condition:
slot_1: True
~slot_2: NULL
slot_3: [value_1, value_2]
live_agent_available: True
intent_detected: True
slot_setting:
slot_4: False
dispatch:
- utter_example
Challenges Writing custom actions
How do we allow content creators to create actions
without coding?
Serving multiple markets
How do we ensure consistency across markets?
Serving multilingual content
How do we serve the content in 5 languages?
42
Deploy to different markets
How to make it easy to launch to new markets?
43
Question time
44

More Related Content

More from Rasa Technologies

How Our Team Uses Rasa to Learn from Real Conversations | Rasa Summit
How Our Team Uses Rasa to Learn from Real Conversations | Rasa SummitHow Our Team Uses Rasa to Learn from Real Conversations | Rasa Summit
How Our Team Uses Rasa to Learn from Real Conversations | Rasa Summit
Rasa Technologies
 
Applying Conversational AI in the Enterprise
Applying Conversational AI in the EnterpriseApplying Conversational AI in the Enterprise
Applying Conversational AI in the Enterprise
Rasa Technologies
 
Ai = your data | Rasa Summit 2021
Ai = your data | Rasa Summit 2021Ai = your data | Rasa Summit 2021
Ai = your data | Rasa Summit 2021
Rasa Technologies
 
Supercharging User Interfaces with Rasa | Rasa Summit 2021
Supercharging User Interfaces with Rasa | Rasa Summit 2021Supercharging User Interfaces with Rasa | Rasa Summit 2021
Supercharging User Interfaces with Rasa | Rasa Summit 2021
Rasa Technologies
 
STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021
STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021 STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021
STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021
Rasa Technologies
 
Continuous Improvement of Conversational AI in Production | Rasa Summit
Continuous Improvement of Conversational AI in Production | Rasa SummitContinuous Improvement of Conversational AI in Production | Rasa Summit
Continuous Improvement of Conversational AI in Production | Rasa Summit
Rasa Technologies
 
Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...
Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...
Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...
Rasa Technologies
 
The State of Conversation Design - Designing for the Conversational Future
The State of Conversation Design - Designing for the Conversational FutureThe State of Conversation Design - Designing for the Conversational Future
The State of Conversation Design - Designing for the Conversational Future
Rasa Technologies
 
Rasa Open Source - What's next?
Rasa Open Source - What's next?Rasa Open Source - What's next?
Rasa Open Source - What's next?
Rasa Technologies
 
Building an AI Assistant Factory - Rasa Summit 2021
Building an AI Assistant Factory - Rasa Summit 2021Building an AI Assistant Factory - Rasa Summit 2021
Building an AI Assistant Factory - Rasa Summit 2021
Rasa Technologies
 
Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...
Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...
Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...
Rasa Technologies
 
Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021
Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021
Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021
Rasa Technologies
 
What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021
What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021
What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021
Rasa Technologies
 
Conversational Teams: Moving Fast at Scale | Rasa Summit 2021
Conversational Teams: Moving Fast at Scale | Rasa Summit 2021Conversational Teams: Moving Fast at Scale | Rasa Summit 2021
Conversational Teams: Moving Fast at Scale | Rasa Summit 2021
Rasa Technologies
 
Research Updates from Rasa: Transformers in NLU and Dialogue
Research Updates from Rasa: Transformers in NLU and DialogueResearch Updates from Rasa: Transformers in NLU and Dialogue
Research Updates from Rasa: Transformers in NLU and Dialogue
Rasa Technologies
 
Webinar: How to Use Integrated Version Control in Rasa X
Webinar: How to Use Integrated Version Control in Rasa XWebinar: How to Use Integrated Version Control in Rasa X
Webinar: How to Use Integrated Version Control in Rasa X
Rasa Technologies
 
Rasa Developer Summit - Bing Liu - Interactive Learning of Task-Oriented Dial...
Rasa Developer Summit - Bing Liu - Interactive Learning of Task-Oriented Dial...Rasa Developer Summit - Bing Liu - Interactive Learning of Task-Oriented Dial...
Rasa Developer Summit - Bing Liu - Interactive Learning of Task-Oriented Dial...
Rasa Technologies
 
Rasa Developer Summit - Josh Converse, Dynamic Offset - Three Part Harmony: H...
Rasa Developer Summit - Josh Converse, Dynamic Offset - Three Part Harmony: H...Rasa Developer Summit - Josh Converse, Dynamic Offset - Three Part Harmony: H...
Rasa Developer Summit - Josh Converse, Dynamic Offset - Three Part Harmony: H...
Rasa Technologies
 
Rasa Developer Summit - Praneeth Gubbala, NLP Engineer, Sam's Club at Walmart...
Rasa Developer Summit - Praneeth Gubbala, NLP Engineer, Sam's Club at Walmart...Rasa Developer Summit - Praneeth Gubbala, NLP Engineer, Sam's Club at Walmart...
Rasa Developer Summit - Praneeth Gubbala, NLP Engineer, Sam's Club at Walmart...
Rasa Technologies
 
Rasa Developer Summit - Tom Bocklisch, Rasa - Product Updates from Rasa
Rasa Developer Summit - Tom Bocklisch, Rasa - Product Updates from RasaRasa Developer Summit - Tom Bocklisch, Rasa - Product Updates from Rasa
Rasa Developer Summit - Tom Bocklisch, Rasa - Product Updates from Rasa
Rasa Technologies
 

More from Rasa Technologies (20)

How Our Team Uses Rasa to Learn from Real Conversations | Rasa Summit
How Our Team Uses Rasa to Learn from Real Conversations | Rasa SummitHow Our Team Uses Rasa to Learn from Real Conversations | Rasa Summit
How Our Team Uses Rasa to Learn from Real Conversations | Rasa Summit
 
Applying Conversational AI in the Enterprise
Applying Conversational AI in the EnterpriseApplying Conversational AI in the Enterprise
Applying Conversational AI in the Enterprise
 
Ai = your data | Rasa Summit 2021
Ai = your data | Rasa Summit 2021Ai = your data | Rasa Summit 2021
Ai = your data | Rasa Summit 2021
 
Supercharging User Interfaces with Rasa | Rasa Summit 2021
Supercharging User Interfaces with Rasa | Rasa Summit 2021Supercharging User Interfaces with Rasa | Rasa Summit 2021
Supercharging User Interfaces with Rasa | Rasa Summit 2021
 
STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021
STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021 STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021
STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021
 
Continuous Improvement of Conversational AI in Production | Rasa Summit
Continuous Improvement of Conversational AI in Production | Rasa SummitContinuous Improvement of Conversational AI in Production | Rasa Summit
Continuous Improvement of Conversational AI in Production | Rasa Summit
 
Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...
Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...
Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...
 
The State of Conversation Design - Designing for the Conversational Future
The State of Conversation Design - Designing for the Conversational FutureThe State of Conversation Design - Designing for the Conversational Future
The State of Conversation Design - Designing for the Conversational Future
 
Rasa Open Source - What's next?
Rasa Open Source - What's next?Rasa Open Source - What's next?
Rasa Open Source - What's next?
 
Building an AI Assistant Factory - Rasa Summit 2021
Building an AI Assistant Factory - Rasa Summit 2021Building an AI Assistant Factory - Rasa Summit 2021
Building an AI Assistant Factory - Rasa Summit 2021
 
Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...
Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...
Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...
 
Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021
Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021
Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021
 
What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021
What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021
What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021
 
Conversational Teams: Moving Fast at Scale | Rasa Summit 2021
Conversational Teams: Moving Fast at Scale | Rasa Summit 2021Conversational Teams: Moving Fast at Scale | Rasa Summit 2021
Conversational Teams: Moving Fast at Scale | Rasa Summit 2021
 
Research Updates from Rasa: Transformers in NLU and Dialogue
Research Updates from Rasa: Transformers in NLU and DialogueResearch Updates from Rasa: Transformers in NLU and Dialogue
Research Updates from Rasa: Transformers in NLU and Dialogue
 
Webinar: How to Use Integrated Version Control in Rasa X
Webinar: How to Use Integrated Version Control in Rasa XWebinar: How to Use Integrated Version Control in Rasa X
Webinar: How to Use Integrated Version Control in Rasa X
 
Rasa Developer Summit - Bing Liu - Interactive Learning of Task-Oriented Dial...
Rasa Developer Summit - Bing Liu - Interactive Learning of Task-Oriented Dial...Rasa Developer Summit - Bing Liu - Interactive Learning of Task-Oriented Dial...
Rasa Developer Summit - Bing Liu - Interactive Learning of Task-Oriented Dial...
 
Rasa Developer Summit - Josh Converse, Dynamic Offset - Three Part Harmony: H...
Rasa Developer Summit - Josh Converse, Dynamic Offset - Three Part Harmony: H...Rasa Developer Summit - Josh Converse, Dynamic Offset - Three Part Harmony: H...
Rasa Developer Summit - Josh Converse, Dynamic Offset - Three Part Harmony: H...
 
Rasa Developer Summit - Praneeth Gubbala, NLP Engineer, Sam's Club at Walmart...
Rasa Developer Summit - Praneeth Gubbala, NLP Engineer, Sam's Club at Walmart...Rasa Developer Summit - Praneeth Gubbala, NLP Engineer, Sam's Club at Walmart...
Rasa Developer Summit - Praneeth Gubbala, NLP Engineer, Sam's Club at Walmart...
 
Rasa Developer Summit - Tom Bocklisch, Rasa - Product Updates from Rasa
Rasa Developer Summit - Tom Bocklisch, Rasa - Product Updates from RasaRasa Developer Summit - Tom Bocklisch, Rasa - Product Updates from Rasa
Rasa Developer Summit - Tom Bocklisch, Rasa - Product Updates from Rasa
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
QADay
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
UiPath New York Community Day in-person event
UiPath New York Community Day in-person eventUiPath New York Community Day in-person event
UiPath New York Community Day in-person event
DianaGray10
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
UiPath New York Community Day in-person event
UiPath New York Community Day in-person eventUiPath New York Community Day in-person event
UiPath New York Community Day in-person event
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 

Rasa Developer Summit - Edouard Malet, Data Scientist, N26 - Building Scalable Chatbots by Empowering Content Creators

  • 1. Building Scalable Chatbots by Empowering Content Creators Edouard Malet Data Scientist, N26 Rasa Developer Summit - 2019
  • 2. Edouard Malet 24/09/19 by Empowering Content Creators Building Scalable Chatbots 1 Rasa Summit
  • 4. Markets N26 Customer Service at a Glance 3.5M+ Customers 26 Countries 5 Supported languages 3 3 Different markets (EU/UK/US)
  • 5. How do we respond to a growing customer base? Why a chatbot? 4
  • 6. Oct 2014 Dec 2015 Mar 2016 Jan 2017 Sep 2017 Mar 2018 June 2018 Oct 2018 Jan 2019Jan 2019 5 75 000 125 000 250 000 500.000 850.000 1 Million 1,5 Million 2 Million 2.5 Million 3 Million 3,5 Million Mar 2019 Jun 2019 3.5 Million Users June 2019 5
  • 7. How do we respond to a growing customer base? Scale Customer Service in line with growth Why a chatbot? 6 How do we let people ask us questions?
  • 8. 7
  • 9. How do we respond to a growing customer base? Scale Customer Service in line with growth Why a chatbot? 8 How do we let people ask us questions? Natural Language Querying How do we support people around the clock?
  • 10. How do we respond to a growing customer base? Scale Customer Service in line with growth Why a chatbot? 9 How do we let people ask us questions? Natural Language Querying How do we support people around the clock? 24/7 support
  • 11. How do we respond to a growing customer base? Scale Customer Service in line with growth Why a chatbot? How do we support people around the clock? 24/7 support How do we let people ask us questions? Natural Language Querying 10 How do we solve problems in one contact?
  • 12. 11
  • 13. How do we respond to a growing customer base? Scale Customer Service in line with growth Why a chatbot? How do we support people around the clock? 24/7 support How do we let people ask us questions? Natural Language Querying 12 How do we solve problems in one contact? Rule-based routing
  • 16. Training data format 15 NLU ## intent:want_statement - hi there, I would like to receive my [balance statement](statement_type) - can you say where I can find the annual statement for 2018
  • 17. 16 ## intent:want_statement - hi there, I would like to receive my [balance statement](statement_type) - can you say where I can find the annual statement for 2018
  • 18. Core Training data format part I: Stories 17 ## want_statement basic * greet - action_welcome * want_statement{"statement_type": "balance statement"} - utter_ack - utter_want_statetement_balance_statement_1 - utter_want_statetement_balance_statement_2 - utter_want_statetement_balance_statement_3 - utter_want_statetement_balance_statement_4
  • 19. 18 ## want_statement basic * greet - action_welcome * want_statement{"statement_type": "balance statement"} - utter_ack - utter_want_statetement_balance_statement_1 - utter_want_statetement_balance_statement_2 - utter_want_statetement_balance_statement_3 - utter_want_statetement_balance_statement_4
  • 20. slots: statement_type: type: unfeaturized entities: - statement_type intents: - greet - want_statement actions: - action_welcome - utter_want_statement_balance_statement_1 - utter_want_statement_balance_statement_2 - utter_want_statement_balance_statement_3 - utter_want_statement_balance_statement_4 templates: utter_want_statement_balance_statement_1: - text: "You can find your {{balance statements}} in both the web app and the mobile app." link_id: STATEMENTS_001 Core Training data format part II: Domain 19
  • 21. 20 slots: statement_type: type: unfeaturized entities: - statement_type intents: - greet - want_statement actions: - action_welcome - utter_want_statement_balance_statement_1 - utter_want_statement_balance_statement_2 - utter_want_statement_balance_statement_3 - utter_want_statement_balance_statement_4 templates: utter_want_statement_balance_statement_1: - text: "You can find your {{balance statements}} in both the web app and the mobile app." link_id: STATEMENTS_001
  • 22. Challenges Writing custom actions How do we allow content creators to create actions without coding? Serving multiple markets How do we ensure consistency across markets? Serving multilingual content How do we serve the content in 5 languages? 21 Deploy to different markets How to make it easy to launch to new markets?
  • 25. DATA SCIENCE Responsibilities 24 Store training data Train models Unit/Integration/Model Testing API Development
  • 26. 25 CONTENT Responsibilities Transfer domain knowledge into Intents, entities and stories Keep up with Product releases Add new languages/markets
  • 27. Challenges Serving multilingual content How do we serve the content in 5 languages? 26
  • 29. 28 ## intent:want_statement - hi there, I would like to receive my [balance statement](statement_type) - can you say where I can find the annual statement for 2018
  • 31. 30 - id: Q1413339 slot_name: statement_type description: No description defined en: label: balance statement synonyms: - balance statements - transfer statement fr: label: relevé de compte synonyms: - relevés - releves - relevés de compte - extrait de compte
  • 32. 31 ## synonym:Q1413339 - balance statement - balance statements - transfer statement
  • 33. 32 { "text": "Hi, how can I download my balance statement?", "intent": { "name": "want_statement", "confidence": 0.9768562913 }, "entities": [ { "start": 26, "end": 43, "value": "Q1413339", "entity": "statement_type", "confidence": 0.9523699849, "extractor": "CRFEntityExtractor", "processors": [ "EntitySynonymMapper" ] } ], }
  • 34. 33 ## want_statement basic * greet - action_welcome * want_statement{"statement_type": "Q1413339"} - utter_ack - utter_want_statetement_balance_statement_1 - utter_want_statetement_balance_statement_2 - utter_want_statetement_balance_statement_3 - utter_want_statetement_balance_statement_4
  • 35. Challenges Serving multiple markets How do we ensure consistency across markets? Serving multilingual content How do we serve the content in 5 languages? 34
  • 38. Challenges Writing custom actions How do we allow content creators to create actions without coding? Serving multiple markets How do we ensure consistency across markets? Serving multilingual content How do we serve the content in 5 languages? 37
  • 39. PROBLEM Actions are Python code 38 """Helper module for the action.py module.""" from rasa_core_sdk import Action import requests from utils.sender_id_converter import sender_id_to_dict from utils.setup import setup_config def live_agent_availability(sender_id): """Call the endpoint to know about agent availability.""" try: user_id = sender_id_to_dict(sender_id)["user_id"] headers = {"x-n26-userid": user_id} r = requests.get( setup_config.agent_availability_endpoint, headers=headers, timeout=1 ) if r.status_code == 200: return r.json()["liveagent"]["status"] == "AVAILABLE" else: return False except requests.exceptions.RequestException: return False class ActionWelcome(Action): """Welcomes a user depending on agent's availability.""" def name(self): """Name.""" return "action_welcome" def run(self, dispatcher, tracker, domain): """Run.""" live_agent_available = live_agent_availability(tracker.sender_id) if live_agent_available: dispatcher.utter_template("utter_welcome_1", tracker) dispatcher.utter_template("utter_welcome_2", tracker) else: dispatcher.utter_template("utter_welcome_no_humans_1", tracker) dispatcher.utter_template("utter_welcome_no_humans_2", tracker) return []
  • 40. 39 """Helper module for the action.py module.""" from rasa_core_sdk import Action import requests from utils.sender_id_converter import sender_id_to_dict from utils.setup import setup_config def live_agent_availability(sender_id): """Call the endpoint to know about agent availability.""" try: user_id = sender_id_to_dict(sender_id)["user_id"] headers = {"x-n26-userid": user_id} r = requests.get( setup_config.agent_availability_endpoint, headers=headers, timeout=1 ) if r.status_code == 200: return r.json()["liveagent"]["status"] == "AVAILABLE" else: return False except requests.exceptions.RequestException: return False class ActionWelcome(Action): """Welcomes a user depending on agent's availability.""" def name(self): """Name.""" return "action_welcome" def run(self, dispatcher, tracker, domain): """Run.""" live_agent_available = live_agent_availability(tracker.sender_id) if live_agent_available: dispatcher.utter_template("utter_welcome_1", tracker) dispatcher.utter_template("utter_welcome_2", tracker) else: dispatcher.utter_template("utter_welcome_no_humans_1", tracker) dispatcher.utter_template("utter_welcome_no_humans_2", tracker) return []
  • 41. 40 action_welcome: - condition: live_agent_available: true dispatch: - utter_welcome_1 - utter_welcome_2 - condition: live_agent_available: false dispatch: - utter_welcome_no_humans_1 - utter_welcome_no_humans_2
  • 42. SOLUTION Dynamic action creation 41 action_test: - condition: slot_1: True ~slot_2: NULL slot_3: [value_1, value_2] live_agent_available: True intent_detected: True slot_setting: slot_4: False dispatch: - utter_example
  • 43. Challenges Writing custom actions How do we allow content creators to create actions without coding? Serving multiple markets How do we ensure consistency across markets? Serving multilingual content How do we serve the content in 5 languages? 42 Deploy to different markets How to make it easy to launch to new markets?
  • 44. 43