Intents, contexts, entities…. What are these? How do I convert a simple conversation into a Dialogflow Intent, entity, sub-intent? I made a chatbot for my website using dialogflow and here is how I made it.
Dialogflow is a robust platform to make a chatbot on, but only a primitive one. I will share my challenges working with Dialogflow towards the end. If you are a designer and you want to make your own conversational bot you can do so in Dialogflow. This product can also serve as a brief introduction to conversational interfaces and the underlying technology- machine learning(training). My intent for this article is to share my mental schema of converting a conversation flow into intents, sub-intents, and entities on Dialogflow. I was struggling while explaining this to my project partner so I thought of breaking it down through this post. This article already assumes that you are familiar with Dialogflow. If not then please watch this Linkedin learning video:- Building Chatbots Using Google Dialogflow. To create your own chatbot first make a conversation flow diagram (participants should take turns in a conversation flow because it is a very primitive chatbot!). I made a conversation flow for my website chatbot and it looks like this:- Don’t judge me, please. I was just roughly laying out my bot. If your conversation flow is sequential and not as spread out like mine don’t worry. You can think of dividing your sequence into broader intents. I will explain, follow along 🙂
Let’s begin:- Once you have a simple conversation flow laid out you can easily convert it into Dialogflow by following this procedure:-
- Top Questions or queries that the user asks your bot changes into INTENT in Dialogflow.
- Questions or Queries one level down form SUB-INTENTS in Dialogflow.
- Questions or queries that the user asks your bot make up the TRAINING PHRASES in that particular INTENT.
- TRAINING PHRASES will have ENTITY property- this is how the DialogFlow system extracts certain words and then matches them to an intent.
- Your bot’s answers are RESPONSES.
- CONTEXT is basically like a broad category. Ex. If you have a skincare intent then skincare products and all sub-intents below the skincare intent will come under one context.
- Remember you can only go 4 levels after an intent. Let me explain this with an example:- skincare intent->face care subintent-> lip care subsubintent-> Lip problems subsubsubintent-> sell lip care product subsubsubsubintent. (Overall 5 levels as shown in the image below)
I have tried to break down the process and make it as easy as I could. Here is an example intent from my website chatbot.
CHALLENGES
- Conversations happen differently than text conversations. People say differently than they write. So need to keep that in mind while training the bot with phrases. example- supercalifragilisticexpialidocious. If someone is texting they will write this text as it is but when speaking out loud they will break it into smaller words.
- There will be a question and then there will be a response. There is no way a chatbot can ask questions or respond unless prompted by the user. So an external prompt is needed and the conversations will always happen in turn-taking sequence.
If you find any errors or if you have suggestions for me to improve please put them in the comments below. I am always looking for constructive feedback 😀
I would like to thank my professor Helen for introducing me to CUI, ML/AI- and everything in this bucket.