SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
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

Mais conteúdo relacionado

Semelhante a Build Conversational AI with Intent Classification and Story Training

Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...
Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...
Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci....NET Conf UY
 
Machine Learning: Artificial Intelligence isn't just a Science Fiction topic
Machine Learning: Artificial Intelligence isn't just a Science Fiction topicMachine Learning: Artificial Intelligence isn't just a Science Fiction topic
Machine Learning: Artificial Intelligence isn't just a Science Fiction topicRaúl Garreta
 
What Are the Basics of Product Manager Interviews by Google PM
What Are the Basics of Product Manager Interviews by Google PMWhat Are the Basics of Product Manager Interviews by Google PM
What Are the Basics of Product Manager Interviews by Google PMProduct School
 
A DevOps Checklist for Startups
A DevOps Checklist for StartupsA DevOps Checklist for Startups
A DevOps Checklist for StartupsRick Manelius
 
General introduction to AI ML DL DS
General introduction to AI ML DL DSGeneral introduction to AI ML DL DS
General introduction to AI ML DL DSRoopesh Kohad
 
A few questions about large scale machine learning
A few questions about large scale machine learningA few questions about large scale machine learning
A few questions about large scale machine learningTheodoros Vasiloudis
 
ChatGPT in academic settings H2.de
ChatGPT in academic settings H2.deChatGPT in academic settings H2.de
ChatGPT in academic settings H2.deDavid Döring
 
[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik
[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik
[DSC Europe 22] The Challenges of Product Analytics - Tamas SrancsikDataScienceConferenc1
 
Business Analyst Technical Interview
Business Analyst Technical InterviewBusiness Analyst Technical Interview
Business Analyst Technical InterviewNeka Allen
 
How i got interviews at google, facebook, and bridgewater (tech version)
How i got interviews at google, facebook, and bridgewater (tech version)How i got interviews at google, facebook, and bridgewater (tech version)
How i got interviews at google, facebook, and bridgewater (tech version)Tomiwa Ademidun
 
Big Data & Social Analytics presentation
Big Data & Social Analytics presentationBig Data & Social Analytics presentation
Big Data & Social Analytics presentationgustavosouto
 
BIG2016- Lessons Learned from building real-life user-focused Big Data systems
BIG2016- Lessons Learned from building real-life user-focused Big Data systemsBIG2016- Lessons Learned from building real-life user-focused Big Data systems
BIG2016- Lessons Learned from building real-life user-focused Big Data systemsXavier Amatriain
 
How Do You Know if Your Project Is Any Good?
How Do You Know if Your Project Is Any Good?How Do You Know if Your Project Is Any Good?
How Do You Know if Your Project Is Any Good?All Things Open
 
What should be your approach for solving ML_CV problem statements_.pdf
What should be your approach for solving ML_CV problem statements_.pdfWhat should be your approach for solving ML_CV problem statements_.pdf
What should be your approach for solving ML_CV problem statements_.pdfVishwas N
 
Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...
Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...
Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...Data Con LA
 
Machine learning: A Walk Through School Exams
Machine learning: A Walk Through School ExamsMachine learning: A Walk Through School Exams
Machine learning: A Walk Through School ExamsRamsha Ijaz
 
Getting a Data Science Job
Getting a Data Science JobGetting a Data Science Job
Getting a Data Science JobAlexey Grigorev
 

Semelhante a Build Conversational AI with Intent Classification and Story Training (20)

Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...
Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...
Machine Learning: Inteligencia Artificial no es sólo un tema de Ciencia Ficci...
 
Machine Learning: Artificial Intelligence isn't just a Science Fiction topic
Machine Learning: Artificial Intelligence isn't just a Science Fiction topicMachine Learning: Artificial Intelligence isn't just a Science Fiction topic
Machine Learning: Artificial Intelligence isn't just a Science Fiction topic
 
Sentiment Analysis
Sentiment AnalysisSentiment Analysis
Sentiment Analysis
 
What Are the Basics of Product Manager Interviews by Google PM
What Are the Basics of Product Manager Interviews by Google PMWhat Are the Basics of Product Manager Interviews by Google PM
What Are the Basics of Product Manager Interviews by Google PM
 
A DevOps Checklist for Startups
A DevOps Checklist for StartupsA DevOps Checklist for Startups
A DevOps Checklist for Startups
 
General introduction to AI ML DL DS
General introduction to AI ML DL DSGeneral introduction to AI ML DL DS
General introduction to AI ML DL DS
 
L15.pptx
L15.pptxL15.pptx
L15.pptx
 
A few questions about large scale machine learning
A few questions about large scale machine learningA few questions about large scale machine learning
A few questions about large scale machine learning
 
ChatGPT in academic settings H2.de
ChatGPT in academic settings H2.deChatGPT in academic settings H2.de
ChatGPT in academic settings H2.de
 
Data science
Data scienceData science
Data science
 
[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik
[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik
[DSC Europe 22] The Challenges of Product Analytics - Tamas Srancsik
 
Business Analyst Technical Interview
Business Analyst Technical InterviewBusiness Analyst Technical Interview
Business Analyst Technical Interview
 
How i got interviews at google, facebook, and bridgewater (tech version)
How i got interviews at google, facebook, and bridgewater (tech version)How i got interviews at google, facebook, and bridgewater (tech version)
How i got interviews at google, facebook, and bridgewater (tech version)
 
Big Data & Social Analytics presentation
Big Data & Social Analytics presentationBig Data & Social Analytics presentation
Big Data & Social Analytics presentation
 
BIG2016- Lessons Learned from building real-life user-focused Big Data systems
BIG2016- Lessons Learned from building real-life user-focused Big Data systemsBIG2016- Lessons Learned from building real-life user-focused Big Data systems
BIG2016- Lessons Learned from building real-life user-focused Big Data systems
 
How Do You Know if Your Project Is Any Good?
How Do You Know if Your Project Is Any Good?How Do You Know if Your Project Is Any Good?
How Do You Know if Your Project Is Any Good?
 
What should be your approach for solving ML_CV problem statements_.pdf
What should be your approach for solving ML_CV problem statements_.pdfWhat should be your approach for solving ML_CV problem statements_.pdf
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...
Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...
Data Con LA 2022 - Demystifying the Art of Business Intelligence and Data Ana...
 
Machine learning: A Walk Through School Exams
Machine learning: A Walk Through School ExamsMachine learning: A Walk Through School Exams
Machine learning: A Walk Through School Exams
 
Getting a Data Science Job
Getting a Data Science JobGetting a Data Science Job
Getting a Data Science Job
 

Mais de Rasa Technologies

Six Steps to Conversation Driven Development
Six Steps to Conversation Driven DevelopmentSix Steps to Conversation Driven Development
Six Steps to Conversation Driven DevelopmentRasa Technologies
 
Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...
Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...
Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...Rasa Technologies
 
Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...
Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...
Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...Rasa Technologies
 
How to Effectively Test Your Chatbot | Rasa Summit
How to Effectively Test Your Chatbot  | Rasa SummitHow to Effectively Test Your Chatbot  | Rasa Summit
How to Effectively Test Your Chatbot | Rasa SummitRasa Technologies
 
End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...
End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...
End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...Rasa Technologies
 
Voice First: Ready Your Content to Serve 50% of Global Searches | Rasa Summit...
Voice First: Ready Your Content to Serve 50% of Global Searches | Rasa Summit...Voice First: Ready Your Content to Serve 50% of Global Searches | Rasa Summit...
Voice First: Ready Your Content to Serve 50% of Global Searches | Rasa Summit...Rasa Technologies
 
The missing link: How AI can help create a safer society and better businesse...
The missing link: How AI can help create a safer society and better businesse...The missing link: How AI can help create a safer society and better businesse...
The missing link: How AI can help create a safer society and better businesse...Rasa Technologies
 
Boss - Bringing More Diversity to Tech | Rasa Summit
Boss - Bringing More Diversity to Tech | Rasa SummitBoss - Bringing More Diversity to Tech | Rasa Summit
Boss - Bringing More Diversity to Tech | Rasa SummitRasa 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
 
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
 

Mais de Rasa Technologies (20)

Six Steps to Conversation Driven Development
Six Steps to Conversation Driven DevelopmentSix Steps to Conversation Driven Development
Six Steps to Conversation Driven Development
 
Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...
Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...
Beyond Sentiment Analysis: Creating Engaging Conversational Experiences throu...
 
Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...
Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...
Using Rasa to Power an Immersive Multimedia Conversational Experience | Rasa ...
 
How to Effectively Test Your Chatbot | Rasa Summit
How to Effectively Test Your Chatbot  | Rasa SummitHow to Effectively Test Your Chatbot  | Rasa Summit
How to Effectively Test Your Chatbot | Rasa Summit
 
End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...
End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...End-to-end dialogue systems, or a feature which wasn’t meant to happen | Rasa...
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...
Voice First: Ready Your Content to Serve 50% of Global Searches | Rasa Summit...Voice First: Ready Your Content to Serve 50% of Global Searches | Rasa Summit...
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...
The missing link: How AI can help create a safer society and better businesse...The missing link: How AI can help create a safer society and better businesse...
The missing link: How AI can help create a safer society and better businesse...
 
Boss - Bringing More Diversity to Tech | Rasa Summit
Boss - Bringing More Diversity to Tech | Rasa SummitBoss - Bringing More Diversity to Tech | Rasa Summit
Boss - Bringing More Diversity to Tech | Rasa Summit
 
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
 
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
 

Último

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Último (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Build Conversational AI with Intent Classification and Story Training

  • 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