Chatbots are becoming an increasingly popular delivery channel for many types of content, including customer support, marketing, and pre-sales. To make chatbots scalable, helpful, and smoothly integrated into the content ecosystem of your organization, you need to feed the chatbots with the right content prepared in the right way.
In this workshop, you’ll learn how to write content for chatbots in a way that lets the chatbots find the relevant content and precisely match it to the user’s request.
In this session, attendee’s will learn:
How chatbots work: approaches to recognizing user’s intent, handling incomplete requests, and finding matching content
How the content needs to be organized, structured, and written to be discoverable by the chatbot
How to not create an isolated, chatbot-specific content that would be available just for the chatbot
What makes content undiscoverable by the chatbot and makes the chatbot to give wrong or irrelevant answers
How to handle situations when the chatbot is unsure which content should be provided to the user
How to handle content variations (for example, product- or audience- specific)
2. @Ditatoo1 #LavaCon
“Writing” means designing knowledge and
representing it in a way that makes the
knowledge discoverable by chatbots and
helpful for users.
14. @Ditatoo1 #LavaCon
What the Chatbot Should Be Able to Do
1 Identify the intent (what the user wants)
2 Identify missing information
3 Ask questions to gather the missing information
(but not too many!)
4 Find the right content
15. @Ditatoo1 #LavaCon
What the Chatbot Should Be Able to Do
1 Identify the intent (what the user wants)
2 Identify missing information
3 Ask questions to gather the missing information
(but not too many!)
4 Find the right content
19. @Ditatoo1 #LavaCon
Getting Request from the User
Pre-defined buttons
Easy to implement
Easy to interpret user’s answer
Hard to scale
May be hard to fit the user’s mindset
21. @Ditatoo1 #LavaCon
Recognizing Intents in Free Text
Connecting the printer to a computer
Loading paper
Printing a document
Replacing the cartridge
Pre-Defined Intents
Scanning a document
…
22. @Ditatoo1 #LavaCon
Recognizing Intents in Free Text
Connecting the printer to a computer
Loading paper
Printing a document
Replacing the cartridge
Pre-Defined Intents
Scanning a document
…
User’s Question
How to replace the cartridge?
23. @Ditatoo1 #LavaCon
Recognizing Intents in Free Text
Connecting the printer to a computer
Loading paper
Printing a document
Replacing the cartridge
Pre-Defined Intents
Scanning a document
…
User’s Question
How to replace the cartridge?
Natural Language
Understanding Engine
Rasa
Watson
LUIS
DialogFlow
…
24. @Ditatoo1 #LavaCon
Recognizing Intents in Free Text
Connecting the printer to a computer
Loading paper
Printing a document
Replacing the cartridge
Pre-Defined Intents
Scanning a document
…
User’s Question
How to replace the cartridge?
Natural Language
Understanding Engine
Rasa
Watson
LUIS
DialogFlow
…
25. @Ditatoo1 #LavaCon
Utterance-Based Intent Recognition
Replacing the cartridge
How to replace a cartridge?
What should I do replace a cartridge?
What it takes to replace a cartridge?
What are the steps for putting a new
cartridge instead of the old one?
…
Utterances:
=
26. @Ditatoo1 #LavaCon
Machine Learning for Intent Recognition
Manually defined utterances
User’s questions automatically
mapped to the intent
“A real-world app should have at least 15 utterances of varying length, word order, tense,
grammatical correctness, punctuation, and word count. “ (LUIS Documentation)
28. @Ditatoo1 #LavaCon
What the Chatbot Should Be Able to Do
1 Identify the intent (what the user wants)
2 Identify missing information
3 Ask questions to gather the missing information
(but not too many!)
4 Find the right content
33. @Ditatoo1 #LavaCon
Entities Are Initially Labelled Manually
“Entities need many examples in order to have a high confidence of prediction. ”
(LUIS Documentation)
34. @Ditatoo1 #LavaCon
What the Chatbot Should Be Able to Do
1 Identify the intent (what the user wants)
2 Identify missing information
3 Ask questions to gather the missing information
(but not too many!)
4 Find the right content
38. @Ditatoo1 #LavaCon
Combinatorial Explosion
• Entities may depend on previous intents
• Entities may also depend on previous user’s answers
• Amount of combinations might be enormous
39. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-OneEasyPrint ProEasyPrint Basic
Printing Printing
Scanning
Printing
Scanning
Faxing
40. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-OneEasyPrint ProEasyPrint Basic
Learn about featuresIntent
Entities Model Name
Printing Printing
Scanning
Printing
Scanning
Faxing
41. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-OneEasyPrint ProEasyPrint Basic
Learn about featuresIntent
Entities Model Name
Printing Printing
Scanning
Printing
Scanning
Faxing
What features does EasyPrint All-In-One have?
42. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-OneEasyPrint ProEasyPrint Basic
Learn about featuresIntent
Entities Model Name
Printing Printing
Scanning
Printing
Scanning
Faxing
What features does EasyPrint All-In-One have?
43. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-OneEasyPrint ProEasyPrint Basic
Learn about featuresIntent
Entities Model Name
Printing Printing
Scanning
Printing
Scanning
Faxing
Which models can send and receive faxes?
44. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-OneEasyPrint ProEasyPrint Basic
Learn about featuresIntent
Entities Model Name
Printing Printing
Scanning
Printing
Scanning
Faxing
Which models can send and receive faxes?
45. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-One
Cable
Wi-Fi
Check the cable
Check the Wi-Fi connection
46. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-One
Fix “doesn’t print” issueIntent
Entities Model Name
Cable
Wi-Fi
ConnectivityMethod
Check the cable
Check the Wi-Fi connection
47. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-One
Fix “doesn’t print” issueIntent
Entities Model Name
Cable
Wi-Fi
My printer doesn’t print anything
ConnectivityMethod
Check the cable
Check the Wi-Fi connection
48. @Ditatoo1 #LavaCon
Only One Perspective
EasyPrint All-In-One
Fix “doesn’t print” issueIntent
Entities Model Name
Cable
Wi-Fi
The printer’s cable is broken. How will it affect
the printer?
ConnectivityMethod
Check the cable
Check the Wi-Fi connection
50. @Ditatoo1 #LavaCon
When It Works
• Small amount of content
• The amount of content isn’t growing
• No or few content variations
• Conversations with the user are simple and
straightforward
51. @Ditatoo1 #LavaCon
“Today many programs do outstanding jobs more efficiently and reliably. Some of them
can beat people at chess. Others can diagnose heart attacks. Yet others can recognize
pictures of faces, assemble cars in factories, or even pilot planes or ships. But no machine
yet can read a book, clean a house, or baby-sit.
Then why cannot our computers yet do so many things that people can do? Do they need
more memory, speed, or complexity? Or do machines lack some magical attribute that
only a human brain can possess?
One of these limitations is that we usually give a present-day program only the knowledge
we think it will need to solve each particular problem. In contrast, every normal child
learns millions of fragments of knowledge and skills that people regard as “obvious.””
Marvin Minsky, The Emotion Machine
68. @Ditatoo1 #LavaCon
What Taxonomy Doesn’t Tell
Products
Charging Equipment
Smart Grid
Grid Automation
Transformer Substations
Projects
Project 1
Project 2
Project 3
Locale
Europe
North America
What products are involved in Project 1?
In what projects a specific product is involved?
Are projects region-specific?
What characteristics should an activity have to
be defined as project?
77. @Ditatoo1 #LavaCon
Crawling the Ontology
Basic
Pro
All-In-One
Model
Ink-jet
Laser
Type
Wi-Fi
Cable
Connectivity
Doesn’t print
Paper jam
Light print
Issues
is of typehas connectivity
might be caused by
might have issues
Order
Cartridge
Toner
Paper
can order
79. @Ditatoo1 #LavaCon
Crawling the Ontology
Basic
Pro
All-In-One
Model
Ink-jet
Laser
Type
Wi-Fi
Cable
Connectivity
Doesn’t print
Paper jam
Light print
Issues
is of typehas connectivity
might be caused by
might have issues
Order
Cartridge
Toner
Paper
can order
84. @Ditatoo1 #LavaCon
Semantic Relationships
Printers
Laser
Inkjet
EasyPrint All-In-One
EasyPrint Pro
EasyPrint Basic
Scanning
Faxing
Printing
Features
Copying
Issues
Toner
Cartridge
Connectivity
No ink
Ink leakage
No ink
Ink leakage
Wi-Fi
Wi-Fi
Cable
No network
Wrong IP address
Connector broken
USB port broken
Antenna broken
has feature
85. @Ditatoo1 #LavaCon
Rule
Printers
Laser
Inkjet
EasyPrint All-In-One
EasyPrint Pro
EasyPrint Basic
Scanning
Faxing
Printing
Features
Copying
Issues
Toner
Cartridge
Connectivity
No ink
Ink leakage
No ink
Ink leakage
Wi-Fi
Wi-Fi
Cable
No network
Wrong IP address
Connector broken
USB port broken
Antenna broken
has feature
If X has feature F,
and feature F
might have issue I
-> X might have
issue I
87. @Ditatoo1 #LavaCon
Rule
EasyPrint All-In-One
Doesn’t Print
has issue
Wi Fi
has feature
Enabled
is in state
If X has problem P, and X has
features F1 and F2, and feature
F1 has relationship R to feature
F2 -> the cause of the problem
is C.
91. @Ditatoo1 #LavaCon
Inference
• Produces new information
• Doesn’t require to foresee all possible combinations
• May reduce the amount of questions to ask the user
• Enables multiple perspectives
92. @Ditatoo1 #LavaCon
Only One Perspective without Ontology
EasyPrint All-In-OneEasyPrint ProEasyPrint Basic
Learn about featuresIntent
Entities Model Name
Printing Printing
Scanning
Printing
Scanning
Faxing
What features does EasyPrint All-In-One have?
93. @Ditatoo1 #LavaCon
Multiple Perspectives with Ontology
Printers
Laser
Inkjet
EasyPrint All-In-One
EasyPrint Pro
EasyPrint Basic
Scanning
Faxing
Printing
Features
Copying
Issues
Toner
Cartridge
Connectivity
No ink
Ink leakage
No ink
Ink leakage
Wi-Fi
Wi-Fi
Cable
No network
Wrong IP address
Connector broken
USB port broken
Antenna broken
has feature
95. @Ditatoo1 #LavaCon
What the Chatbot Should Be Able to Do
1 Identify the intent (what the user wants)
2 Identify missing information
3 Ask questions to gather the missing information
(but not too many!)
4 Find the right content
98. @Ditatoo1 #LavaCon
Combinations of User’s Context Elements
BasicModel Pro
CableConnectivity Wi-Fi
Issue
Doesn’t
print
Paper jam Light print
All-In-One
99. @Ditatoo1 #LavaCon
Combinations of User’s Context Elements
BasicModel Pro All-In-One
CableConnectivity Wi-Fi
Issue Doesn’t
print
Paper jam Light print
BasicModel Pro All-In-One
CableConnectivity Wi-Fi
Issue
Doesn’t
print
Paper jam Light print
BasicModel Pro All-In-One
CableConnectivity Wi-Fi
Issue Doesn’t
print
Paper jam Light print
BasicModel Pro All-In-One
CableConnectivity Wi-Fi
Issue Doesn’t
print
Paper jam Light print
100. @Ditatoo1 #LavaCon
Granular (Structured) Content
BasicModel Pro All-In-One
CableConnectivity Wi-Fi
Issue Doesn’t
print
Paper jam Light print
BasicModel Pro All-In-One
CableConnectivity Wi-Fi
Issue
Doesn’t
print
Paper jam Light print
BasicModel Pro All-In-One
CableConnectivity Wi-Fi
Issue Doesn’t
print
Paper jam Light print
Model: All-In-One
Connectivity: Cable
Issue: Doesn’t print
Model: All-In-One
Connectivity: Wi-Fi
Issue: Doesn’t print
Model: Pro
Connectivity: Cable
Issue: Paper jam
Model: Basic
Connectivity: Cable
Issue: Light print
101. @Ditatoo1 #LavaCon
Connecting Content to Ontology
Basic
Pro
All-In-One
Model
Ink-jet
Laser
Type
Wi-Fi
Cable
Connectivity
Doesn’t print
Paper jam
Light print
Issues Order
Cartridge
Toner
Paper
103. @Ditatoo1 #LavaCon
Making Suggestions
Printers
Laser
Inkjet
EasyPrint All-In-One
EasyPrint Pro
EasyPrint Basic
Scanning
Faxing
Printing
Features
Copying
Training
Printing
Scanning
Basics Video
Advanced Printing
How to Scan
Scanning Tips
Wi-FiTechpubs dept.
Training dept.
Legal
Regulations
compliant with
Compliance dept.
109. @Ditatoo1 #LavaCon
How to Create?
• Ontology editors:
• Protégé
• Fluent Editor
• API:
• Jena API
• OWL API
• Automatically:
• Intuillion NLP
• PoolParty
110. @Ditatoo1 #LavaCon
Why Chatbot Gives Wrong Answers
• The issue is not covered by any content
• The content that covers the issue is too generic
• The metadata model does not match the elements of the user’s context
• No metadata is provided at all or wrong metadata is provided
• Metadata is not specific enough
• The piece of content includes information about multiple subjects
• The chatbot didn’t understand the user’s question at all or understood it
incorrectly
112. @Ditatoo1 #LavaCon
Misunderstanding User’s Question
• Mapping to a wrong intent
• Mapping isn’t compatible (user has his own understanding of how the
product works)
• Solution:
• Calculation of the confidence score that indicates how confident
the chatbot is that the found content addresses the issue
• Feedback from the user about how relevant and helpful the
chatbot’s answer was
• Log of each conversation between the chatbot and the user
• Ability to hand over the issue to a human at any moment
113. @Ditatoo1 #LavaCon
Practical Steps: Taxonomy & Ontology
• Create a taxonomy:
• Who may need it?
• How may they use it?
• Analyze how the current content is linked:
• Do links represent semantic relationships?
• Is there content created by other departments?
• What the taxonomy doesn’t tell?
114. @Ditatoo1 #LavaCon
Practical Steps: Chatbot
• Do you really need it?
• Can be the same thing done with a wizard (another UI)?
• Do you really need a conversation?
• What additional value the chatbot will bring?
• What level of variety should the chatbot support?
• Do you want it to be proactive?
115. @Ditatoo1 #LavaCon
Summary
• Traditional intent and named entity recognition are expensive to scale.
• To make chatbots more scalable and less brittle, they need a formalized
semantic model of the domain (ontology).
• Ontology represents concepts and sematic relationships between them.
• Ontology is written in a machine-readable format.
• Ontology makes knowledge multi-dimensional and enables inference.
• Content needs to be as granular as user’s context.
• Content needs to be enriched with semantic metadata.
• The chatbot should provide a mechanism that lets you track what went.
wrong during the conversation and fix it.