Overview
A Chatbot is an AI based application which stimulates conversation. It uses Natural Language Processing (NLP) to understand, build and generate responses. Chatbots are important as they enhance customer experience, help improve user engagement, task automation, data collection and are extensively used in various fields. With this, we will look into the steps to build a chatbot using dialogflow.
Two types of DialogFlow Virtual Agent Services:
Dialogflow ES: Standard agent type solution for simple and small scale applications.
Dialogflow CX: Advanced agent type solution for large and complex applications.
We will be using the Dialogflow ES in this guide for the demo.
Set up a Google DialogFlow Project
Step 1 - Make sure you create a project or have an existing project in the Google Cloud Console. Head to Google Cloud Manage Resources.
Step 2 - Give a Project Name you want and Click on Create
Step 3 - You should see a notification once it is successfully created. Click on "Select Project"
Now you should be able to see your Project Dashboard.
Let's Get started!
Step 1 - Head to Dialogflow & Sign-in with Google
Step 2 - Click on Create Agent
What are Agents?
It is a virtual agent that is responsible to handle concurrent conversations with users in a Google Dialogflow Chatbot.
Step 3 - Give any Agent Name you wish
I'm using "InterviewScheduler" as my Agent Name
Select the Project ID we created before in Google Cloud Console.
Click on Create
Note - It will take some time (7sec to 10sec) to Create an Agent.
Now this is how your screen should look like:
What are Intents?
Intents are the Intensions of the users for having a conversation with the chatbot.
Example:
Default Welcome Intent - It is a Welcoming Intent which welcomes user to start a conversation.
Step 4 - Creating an Intent
Give an Intent name of your choice, I have given Interview Scheduler, Then Click on Training Phrases to train the chatbot.
Step 5 - Creating Training Phrases
Add a phrase of your choice like shown in below GIF and give an entity @sys.date-time which is relevant to it.
Example:
Schedule a meeting on Monday 10 AM
I would like to have an interview on Tuesday 6 PM
Set an Interview on Wednesday 4 PM
After Adding the Training Phrases, your screen should look like this:
What are Entities?
Entity is a type of an Intent on how and what to respond with the right context in the conversation with the users.
Example: Date, Time, Email and you can also create custom entities of your choice.
Step 6 - Add an Action and Parameters for the Entity
Example - When and What time would you like to Schedule the Interview?
Note: This marks as a mandatory check whenever the bot is triggered to schedule the interview.
Step 7 - Add Responses
Example:
Thank you for scheduling the interview
Thank you, Your Interview is Scheduled on $date-time
Note - The $date-time replaces the user given date and time because it is an entity.
Hurray, Now you have Successfully Created a Chatbot using Google Dialogflow
Let's see it in Action:
Now you can also Integrate your Dialogflow Chatbot in your Web Applications
Step 1 - Head to Integrations
Step 2 - Select Web Demo in Text Based
Step 3 - Click Enable
Step 4 - Integration Methods
Method 1 - Simply click the URL to Web Demo and test the agent with your chatbot.
Method 2 - Embed the iframe to your website by copying the code below and make custom web applications.
Here's how it looks when you visit the URL for the Web Demo:
Congratulations, Now You have learnt How to build a chatbot with dialogflow.
Conclusion:
Chatbots are extensively used in E-Commerce, Healthcare, Banking and Finance, Travel and Hospitality, Education, Human Resources, Telecommunications and more.
This way it helps automate tasks and enable business to grow and gather valuable insights with a cost effective solutions.
FAQs:
1. Is Dialogflow ES free to use?
Yes, Dialogflow ES is free to use with a valid and active Project ID in the Google Cloud Console.
2. Can I Integrate Google Dialogflow with other applications?
Yes, You have multiple integration options wiz.
Telephony - Genesys Cloud, Twilio
Text Based - Web Demo, Messenger from Facebook, Line, Slack, Telegram,
Open Source - Kik, Skype, Spark, Twilio IP Messaging, Viber, Twitter
3. Difference between Intents and Entity?
Intents are the building blocks of a conversations while Entity is a type of Intent like date, time, location etc.
Example:
Intent - HotelReservation
Entity - Taj Hotel, Chennai
References:
You can also checkout the reference links for more detailed information on Google Dialogflow.
Коментари