SlideShare una empresa de Scribd logo
1 de 45
Descargar para leer sin conexión
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

Más contenido relacionado

Más de 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 SummitRasa Technologies
 
Applying Conversational AI in the Enterprise
Applying Conversational AI in the EnterpriseApplying Conversational AI in the Enterprise
Applying Conversational AI in the EnterpriseRasa Technologies
 
Ai = your data | Rasa Summit 2021
Ai = your data | Rasa Summit 2021Ai = your data | Rasa Summit 2021
Ai = your data | Rasa Summit 2021Rasa 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 2021Rasa 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 SummitRasa 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 FutureRasa 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 2021Rasa 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 2021Rasa 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 2021Rasa 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 2021Rasa 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 DialogueRasa 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 XRasa 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 RasaRasa Technologies
 

Más de 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
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

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