By: Sumit Raj
What will be covered?
Day 1:
About Myself:
Why we need Chatbots?
Why we need Chatbots?
What Kind of Problems Can I Solve Using Chatbots?
Can the Problem be Solved by Simple Question and Answer or Back-and-Forth Communication?
Does It Have Highly Repetitive Issues That Require Either Analyzing or Fetching of Data?
Can Your Bot’s Task be Automated and Fixed?
Let's get into the game
What is DialogFlow?
More about DialogFlow
1. User talks to the input device.
2. User query goes into the Dialogflow engine.
3. Dialogflow tries to recognize the intent.
4. Based on the intent, a fulfillment is done and data is returned from database.
5. Response is returned to the intent.
6. Response is converted into actionable data.
7. User’s request for information is given back to the output device.
Good things about Dialogflow
Who uses Dialogflow?
Prerequisites and tools
Setting up DialogFlow
Hands-on time
Agents
Agents also serve as a top-level container for settings and data:
Intent
When a user interacts with a chatbot, what is his intention to use chatbot/what is he asking for.
For example, when a user says, “Book a movie ticket” to a chatbot, we as humans can understand that user wants to book a movie ticket.
Entities
Category: Shoe
Size: 8
Confidence Score
Utterances
Training the bot
Things we'll be learning while doing under Intents
Things we'll be learning while doing under entities
System Entities
@sys.unit-currency 5 dollars {"amount":5,"currency":"USD"} 25 pounds {"amount":25,"currency":"GBP"} |
Developer Entities
You can create custom entities for matching data specific to your agent. For example, you could define a vegetable entity type that can match the types of vegetables available for purchase with a grocery store agent.
Session Entities
For example, if your agent has a @fruit entity type that includes "pear" and "grape", that entity type could be updated to include "apple" or "orange", depending on the information your agent collects from the end-user. The updated entity type would have the "apple" or "orange" entity entry for the rest of the session.
Regex Entities
For example, if you provide the following regular expressions for a phone number:
Fuzzy Matching
By default, entity matching requires an exact match for one of the entity entries. This works well for single-word entity entry values and synonyms but may present a problem for multi-word values and synonyms. For example, consider a ball entity that should be matched for the following end-user expression parts:
For a match to occur, you normally need to define an entity entry value and synonyms for each of these permutations. However, with fuzzy matching enabled, the ordering of the words in a value or synonym does not matter. The following will trigger a match for all of the examples above:
Build a bot of your choice
Fulfillment
Fulfillment Flow & its working
Ref: dialogflow.com
Webhook for Slot Filling
When an intent is matched at runtime, the Dialogflow agent continues collecting information from the end-user until the end-user has provided data for each of the required parameters. This process is called slot filling.
By default, Dialogflow does not send a fulfillment webhook request until it has collected all required data from the end-user.
If webhook for slot filling is enabled, Dialogflow sends a fulfillment webhook request for each conversational turn during slot filling.
Using external API for fulfillment
Deploying your chatbot on web
Integrating with Third-party Applications
Quick Introduction to NLP for chatbots