SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Kürzlich hochgeladen (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

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