SlideShare a Scribd company logo
AI = Your Data
(And what that means for you
as you build a virtual assistant)
Why do you bother
working on chatbots?
Why do you bother
working on chatbots?
Subtext: I think most conversational
AI projects are bad
What makes a bad
Conversational AI project?
It doesn't help people do
what they need to do.
How do you know what
people need to do?
● You make an educated guess
● You ask them (UX research)
● They tell you (You look at data)
How do you know what people need to do?
● You make an educated guess
○ Complete top-down design (state machines, dialog trees) can
be a good approach, but they're inflexible
● You ask them (UX research)
● They tell you (You look at data)
How do you know what
people need to do?
● You make an educated guess
● ✨You ask them (UX research)✨
○ Not covered today but 100%
do it if you can
● They tell you (You look at data)
How do you know what people need to do?
● You make an educated guess
● You ask them (UX research)
● They tell you (You look at data)
○ More flexible
○ But don't assume that all you need is
more user-generated data!
https://www.theguardian.com/world/2021/jan/14/time-to-properl
y-socialise-hate-speech-ai-chatbot-pulled-from-facebook
How do you know what people need to do?
● You make an educated guess
● You ask them (UX research)
● They tell you (You look at data)
○ More flexible
○ But don't assume that all you need is
more user-generated data!
○ Happy medium:
■ your system learns from data
■ you provide additional structure
and organization
https://www.theguardian.com/world/2021/jan/14/time-to-properl
y-socialise-hate-speech-ai-chatbot-pulled-from-facebook
What is “data” in conversational AI?
● The text data use to pretrain any models or
features you're using (e.g. language models,
word embeddings, etc.)
● User-generated text
● Patterns of conversations
● Examples:
○ Customer support logs (assuming data
collection & reuse is covered in your
privacy policy)
Two different assistants can have more
or less the same underlying ML code.
(That’s what makes building a
conversational AI framework possible!)
What makes your assistant work for
you and your users is your data & how
you structure it.
● Curate = decide what data
to use as you train &
retrain your assistant
● Annotate = apply (or
correct) labels for
individual pieces of data
● Intents
○ If you already
have data
○ If you don't
● Stories
● Checking if it works
Intent = something a
user wants to do
Intent = something a
user wants to do
Quick test: is this a VERB
(inform, book_trip, confirm)?
If you have data
● Modified content analysis:
○ Go through data (or sample) by hand and assign each datapoint to a
group
○ If no existing group fits, add a new one
○ At given intervals, go through your groups and combine or seperate
them as needed
○ Start with 2-3 passes through your dataset
● Can't you just automate this?
○ Maaaybe, but I wouldn't recommend it: no guarantee clusters will
map well to user needs
(Even) If you don't have data
● Start with the most common intent
○ Most people want to do the same thing
○ Use the experts in your institution (e.g.
support staff)
● Start with the smallest possible number of
intents (that cover your core use case)
● Everything else goes in an out of scope intent
○ If your assistant can't handle something,
give users an escape hatch right away
● Additional intents will come from user data
Why fewer intents?
● Older style of conversational design:
○ You need an intent for everything your
user might want to do!
● Rasa style CDD:
○ You only need to start with the most
popular, important intents & a way to
handle things outside them
○ Continue to build from there if that’s
what users need
Why fewer intents?
● Human reasons
○ More intents = more training data,
maintenance, documentation
○ More intents = annotation more difficult
● ML reasons
○ Transformer classifiers scale linearly with the
# of classes*
○ Entity extraction (esp. with very lightweight
rule-based systems like Duckling) is often
faster
*Taming pretrained transformers for eXtreme multi-label text classification, Chang et al 2020 @ KDD
Paring down intents book_train:
● One train ticket
● Need to book a train ride
● A rail journey please
book_plane:
● One plane ticket
● Need to book a plane ride
● Don’t use intents as a way to store
information
○ Storing information = slots
● Do a lot of the same tokens show up
in training data for two intents?
Consider if they can be combined
● I would personally start with:
○ max 10 intents
○ min 20 training examples (for
each intent)
make_booking:
● One [train](train) ticket
● Need to book a [train](train) ride
● A [rail](train) journey please
● One [plane](air) ticket
● Need to book a [plane](air) ride
● i'd like to book a trip
● Need a vacation
Training data for an intent
● User-generated > synthetic
● Chat-based interactions tend to be
informal
● Each utterance should unambiguously
match to a single intent
○ You can verify this using human
sorting & inter-rater reliability
● Is an utterance ambiguous?
○ Use end-to-end instead (the raw text
as training data w/out classifying it)
●
Unambiguous:
● Hi there
● Hieeeeeeeeeeeee
● Hola
● I said, helllllloooooO!!!!
● What is up?
● ayyyy whaddup
● hello robot
● hello sara
● merhaba
● ola sara
Ambiguous (goes in end to end):
● good day
● ciao
● alhoa🤙
Stories = training data to
decide what your
assistant should do next
Stories = training data to
decide what your
assistant should do next
Older style: Most of the design work
Newer style: Provide examples &
system extrapolates from them
Stories
● If you have conversational data:
○ If you have conversations, start with the patterns you see in them
○ Find a new intent? Add it to your intents
● Generating your own conversational patterns:
○ It's easiest to use interactive learning to create stories (in
command line or Rasa X)
○ Start with common flows, “happy paths”
○ Then add common errors/digressions
● Once your model is trained:
○ Add user data for more ASAP
Stories
● If you have conversational data:
○ If you have conversations, start with the patterns you see in them
○ Find a new intent? Add it to your intents
● Generating your own conversational patterns:
○ It's easiest to use interactive learning to create stories (in
command line or Rasa X)
○ Start with common flows, “happy paths”
○ Then add common errors/digressions
● Once your model is trained:
○ Add user data for more ASAP
Do you need conditional logic in
your conversations? Like: "If
they're already signed in don't ask
for a name" or "never show
account balance without a PIN?
Add rules!
How do you know if it works?
● Reviewing user conversations!
● Tests
○ Sample conversions that should
always be handled the same
○ Good to shoot for 100% correct
● Validation
○ Checking that your model can guess
correctly at an acceptable rate
○ Be very suspicious of accuracy near
100% 🤔
Takeaways
● Language data is what makes
your Rasa assistant work
● Providing structure for language
data is the first step for building
NLP systems
● Start with the fewest possible,
most popular things
● Get your prototype in front of
users ASAP
Thanks! Questions?
@rctatman

More Related Content

PDF
PyData SF 2016 --- Moving forward through the darkness
PDF
Python Machine Learning - Getting Started
PDF
Module 1 introduction to machine learning
PPTX
Statistics vs machine learning
PDF
Webinar 3 - AI & Investigative Journalism - Training Slidedeck
PDF
Tool criticism
PDF
AI Tools & Best Practices
PDF
Machine Learning Product Managers Meetup Event
PyData SF 2016 --- Moving forward through the darkness
Python Machine Learning - Getting Started
Module 1 introduction to machine learning
Statistics vs machine learning
Webinar 3 - AI & Investigative Journalism - Training Slidedeck
Tool criticism
AI Tools & Best Practices
Machine Learning Product Managers Meetup Event

Similar to Ai = your data | Rasa Summit 2021 (20)

PDF
Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...
PDF
Machine Learning: Artificial Intelligence isn't just a Science Fiction topic
PDF
Sentiment Analysis
PDF
A DevOps Checklist for Startups
PDF
General introduction to AI ML DL DS
PPTX
L15.pptx
PDF
A few questions about large scale machine learning
PDF
ChatGPT in academic settings H2.de
PDF
Data science
PDF
[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik
PDF
Business Analyst Technical Interview
PDF
How i got interviews at google, facebook, and bridgewater (tech version)
PDF
Big Data & Social Analytics presentation
PDF
BIG2016- Lessons Learned from building real-life user-focused Big Data systems
PDF
How Do You Know if Your Project Is Any Good?
PDF
What should be your approach for solving ML_CV problem statements_.pdf
PPTX
Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...
PPTX
Machine learning: A Walk Through School Exams
PDF
Getting a Data Science Job
PDF
NLP & Machine Learning - An Introductory Talk
Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...
Machine Learning: Artificial Intelligence isn't just a Science Fiction topic
Sentiment Analysis
A DevOps Checklist for Startups
General introduction to AI ML DL DS
L15.pptx
A few questions about large scale machine learning
ChatGPT in academic settings H2.de
Data science
[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik
Business Analyst Technical Interview
How i got interviews at google, facebook, and bridgewater (tech version)
Big Data & Social Analytics presentation
BIG2016- Lessons Learned from building real-life user-focused Big Data systems
How Do You Know if Your Project Is Any Good?
What should be your approach for solving ML_CV problem statements_.pdf
Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...
Machine learning: A Walk Through School Exams
Getting a Data Science Job
NLP & Machine Learning - An Introductory Talk
Ad

More from Rasa Technologies (20)

PDF
Six Steps to Conversation Driven Development
PDF
Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...
PDF
Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...
PDF
How to Effectively Test Your Chatbot | Rasa Summit
PDF
End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...
PDF
Voice First: Ready Your Content to Serve 50% of Global Searches | Rasa Summit...
PDF
The missing link: How AI can help create a safer society and better businesse...
PDF
Boss - Bringing More Diversity to Tech | Rasa Summit
PDF
How Our Team Uses Rasa to Learn from Real Conversations | Rasa Summit
PDF
Applying Conversational AI in the Enterprise
PDF
Supercharging User Interfaces with Rasa | Rasa Summit 2021
PPTX
STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021
PDF
Continuous Improvement of Conversational AI in Production | Rasa Summit
PDF
Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...
PDF
The State of Conversation Design - Designing for the Conversational Future
PDF
Rasa Open Source - What's next?
PDF
Building an AI Assistant Factory - Rasa Summit 2021
PDF
Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...
PDF
Deploy your Rasa Chatbots like a Boss with DevOps | Rasa Summit 2021
PDF
What’s next in CDD: Intent Clashes and Selective Confidence | Rasa Summit 2021
Six Steps to Conversation Driven Development
Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...
Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...
How to Effectively Test Your Chatbot | Rasa Summit
End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...
Voice First: Ready Your Content to Serve 50% of Global Searches | Rasa Summit...
The missing link: How AI can help create a safer society and better businesse...
Boss - Bringing More Diversity to Tech | Rasa Summit
How Our Team Uses Rasa to Learn from Real Conversations | Rasa Summit
Applying Conversational AI in the Enterprise
Supercharging User Interfaces with Rasa | Rasa Summit 2021
STAR: A Schema-Guided Dialog Dataset for Transfer Learning | Rasa Summit 2021
Continuous Improvement of Conversational AI in Production | Rasa Summit
Ethnobots: Reimagining Chatbots as Ethnographic Research Tools | Rasa Summit ...
The State of Conversation Design - Designing for the Conversational Future
Rasa Open Source - What's next?
Building an AI Assistant Factory - Rasa Summit 2021
Building an End-to-End Test Automation Pipeline for Conversational AI | Rasa ...
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
Ad

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Cloud computing and distributed systems.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
Teaching material agriculture food technology
PDF
Electronic commerce courselecture one. Pdf
PDF
KodekX | Application Modernization Development
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation theory and applications.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Empathic Computing: Creating Shared Understanding
Advanced methodologies resolving dimensionality complications for autism neur...
Cloud computing and distributed systems.
Building Integrated photovoltaic BIPV_UPV.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Teaching material agriculture food technology
Electronic commerce courselecture one. Pdf
KodekX | Application Modernization Development
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation theory and applications.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Understanding_Digital_Forensics_Presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Network Security Unit 5.pdf for BCA BBA.
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Ai = your data | Rasa Summit 2021

  • 1. AI = Your Data (And what that means for you as you build a virtual assistant)
  • 2. Why do you bother working on chatbots?
  • 3. Why do you bother working on chatbots? Subtext: I think most conversational AI projects are bad
  • 4. What makes a bad Conversational AI project? It doesn't help people do what they need to do.
  • 5. How do you know what people need to do? ● You make an educated guess ● You ask them (UX research) ● They tell you (You look at data)
  • 6. How do you know what people need to do? ● You make an educated guess ○ Complete top-down design (state machines, dialog trees) can be a good approach, but they're inflexible ● You ask them (UX research) ● They tell you (You look at data)
  • 7. How do you know what people need to do? ● You make an educated guess ● ✨You ask them (UX research)✨ ○ Not covered today but 100% do it if you can ● They tell you (You look at data)
  • 8. How do you know what people need to do? ● You make an educated guess ● You ask them (UX research) ● They tell you (You look at data) ○ More flexible ○ But don't assume that all you need is more user-generated data! https://www.theguardian.com/world/2021/jan/14/time-to-properl y-socialise-hate-speech-ai-chatbot-pulled-from-facebook
  • 9. How do you know what people need to do? ● You make an educated guess ● You ask them (UX research) ● They tell you (You look at data) ○ More flexible ○ But don't assume that all you need is more user-generated data! ○ Happy medium: ■ your system learns from data ■ you provide additional structure and organization https://www.theguardian.com/world/2021/jan/14/time-to-properl y-socialise-hate-speech-ai-chatbot-pulled-from-facebook
  • 10. What is “data” in conversational AI? ● The text data use to pretrain any models or features you're using (e.g. language models, word embeddings, etc.) ● User-generated text ● Patterns of conversations ● Examples: ○ Customer support logs (assuming data collection & reuse is covered in your privacy policy)
  • 11. Two different assistants can have more or less the same underlying ML code. (That’s what makes building a conversational AI framework possible!) What makes your assistant work for you and your users is your data & how you structure it.
  • 12. ● Curate = decide what data to use as you train & retrain your assistant ● Annotate = apply (or correct) labels for individual pieces of data
  • 13. ● Intents ○ If you already have data ○ If you don't ● Stories ● Checking if it works
  • 14. Intent = something a user wants to do
  • 15. Intent = something a user wants to do Quick test: is this a VERB (inform, book_trip, confirm)?
  • 16. If you have data ● Modified content analysis: ○ Go through data (or sample) by hand and assign each datapoint to a group ○ If no existing group fits, add a new one ○ At given intervals, go through your groups and combine or seperate them as needed ○ Start with 2-3 passes through your dataset ● Can't you just automate this? ○ Maaaybe, but I wouldn't recommend it: no guarantee clusters will map well to user needs
  • 17. (Even) If you don't have data ● Start with the most common intent ○ Most people want to do the same thing ○ Use the experts in your institution (e.g. support staff) ● Start with the smallest possible number of intents (that cover your core use case) ● Everything else goes in an out of scope intent ○ If your assistant can't handle something, give users an escape hatch right away ● Additional intents will come from user data
  • 18. Why fewer intents? ● Older style of conversational design: ○ You need an intent for everything your user might want to do! ● Rasa style CDD: ○ You only need to start with the most popular, important intents & a way to handle things outside them ○ Continue to build from there if that’s what users need
  • 19. Why fewer intents? ● Human reasons ○ More intents = more training data, maintenance, documentation ○ More intents = annotation more difficult ● ML reasons ○ Transformer classifiers scale linearly with the # of classes* ○ Entity extraction (esp. with very lightweight rule-based systems like Duckling) is often faster *Taming pretrained transformers for eXtreme multi-label text classification, Chang et al 2020 @ KDD
  • 20. Paring down intents book_train: ● One train ticket ● Need to book a train ride ● A rail journey please book_plane: ● One plane ticket ● Need to book a plane ride ● Don’t use intents as a way to store information ○ Storing information = slots ● Do a lot of the same tokens show up in training data for two intents? Consider if they can be combined ● I would personally start with: ○ max 10 intents ○ min 20 training examples (for each intent) make_booking: ● One [train](train) ticket ● Need to book a [train](train) ride ● A [rail](train) journey please ● One [plane](air) ticket ● Need to book a [plane](air) ride ● i'd like to book a trip ● Need a vacation
  • 21. Training data for an intent ● User-generated > synthetic ● Chat-based interactions tend to be informal ● Each utterance should unambiguously match to a single intent ○ You can verify this using human sorting & inter-rater reliability ● Is an utterance ambiguous? ○ Use end-to-end instead (the raw text as training data w/out classifying it) ● Unambiguous: ● Hi there ● Hieeeeeeeeeeeee ● Hola ● I said, helllllloooooO!!!! ● What is up? ● ayyyy whaddup ● hello robot ● hello sara ● merhaba ● ola sara Ambiguous (goes in end to end): ● good day ● ciao ● alhoa🤙
  • 22. Stories = training data to decide what your assistant should do next
  • 23. Stories = training data to decide what your assistant should do next Older style: Most of the design work Newer style: Provide examples & system extrapolates from them
  • 24. Stories ● If you have conversational data: ○ If you have conversations, start with the patterns you see in them ○ Find a new intent? Add it to your intents ● Generating your own conversational patterns: ○ It's easiest to use interactive learning to create stories (in command line or Rasa X) ○ Start with common flows, “happy paths” ○ Then add common errors/digressions ● Once your model is trained: ○ Add user data for more ASAP
  • 25. Stories ● If you have conversational data: ○ If you have conversations, start with the patterns you see in them ○ Find a new intent? Add it to your intents ● Generating your own conversational patterns: ○ It's easiest to use interactive learning to create stories (in command line or Rasa X) ○ Start with common flows, “happy paths” ○ Then add common errors/digressions ● Once your model is trained: ○ Add user data for more ASAP Do you need conditional logic in your conversations? Like: "If they're already signed in don't ask for a name" or "never show account balance without a PIN? Add rules!
  • 26. How do you know if it works? ● Reviewing user conversations! ● Tests ○ Sample conversions that should always be handled the same ○ Good to shoot for 100% correct ● Validation ○ Checking that your model can guess correctly at an acceptable rate ○ Be very suspicious of accuracy near 100% 🤔
  • 27. Takeaways ● Language data is what makes your Rasa assistant work ● Providing structure for language data is the first step for building NLP systems ● Start with the fewest possible, most popular things ● Get your prototype in front of users ASAP