What is a chatbot?
DialogFlow is a service offered by Google Cloud Platform (GCP) that revolutionizes customer interaction by facilitating the creation of virtual agents known as chatbots. It is a highly sought-after tool for enhancing customer communication, enabling seamless conversations between customers and service providers through text or voice. It is also a versatile tool — DialogFlow can be deployed within many popular platforms and services, including Skype, Amazon Alexa, Twitter, Hangouts Chat and many others. Furthermore, it can be effortlessly deployed within one’s own application or website.
Other than the ability to smoothly integrate with various platforms, DialogFlow excels in its conversational/NLP capabilities and has demonstrated its user-friendliness for non-technical personnel by supporting more than 20 languages.
Benefits of chatbot
In today's age of increasing personalization in customer communication, chatbots leverage user data and insights to create tailored experiences that effectively meet the evolving demands of the customer. Other benefits include:
- Ability to analyze and monitor data
- Easy accessibility
- 24/7 availability
- Reduce customer waiting time
- Easy deployment and maintenance
- Save customer service cost
- No mood swings
The following diagram shows the basic flow for intent matching and responding to the end user.
A chatbot acts as an agent that can receive a query from a user, act on it and send a response. You can even give your agent a name. When creating an agent, you can name it, choose the preferred language and time zone and even connect it with available Google projects.
An agent is made up of intents that entail providing some actions or questions that the user might ask the agent. In short, there are various ways a user can express the same query, but they should all fall under one single intent.
For instance, a user can ask the agent to book a hotel in two ways:
- ‘Book a hotel for me’
- ‘I need a good hotel’
We want to be certain that both inquiries come under one intent. A user can create more than one intent and those intents will be part of a particular process or subject. It is advised to create separate instances for any particular service.
By default, a welcome intent is available to handle some basic questions or greetings from the user, but it can also be modified.
Once the intent is created, it is essential to instruct the agent in understanding a range of questions the user can ask and their corresponding answers. Under training phrases, ensuring the provision for user expression is needed. Though it is not required that you input every possible question, it is imperative to train the agent by providing some possible paraphrased versions of the questions relevant to business requirements.
The below list displays numerous ways a user can ask a single question:
- Book a hotel for me
- I need a hotel
- I want to book a hotel near Vagator beach in Goa
- Show me some hotels near Vagator beach in Goa
This is the chatbot’s response related to the question of intent. The user will get responses according to the answers that align with the answers provided to the agent in the training phrase.
For example, if the expressions trigger ‘Book a hotel for me,’ the chatbot can respond by saying, “Sure, for how many people?” Multiple responses can also be provided for a particular query, but it is not feasible to predict the response generated by our agent.
Entities are types of information relevant to intent parameters. Custom or system entities facilitate the identification of the type of data provided by the user. Custom entity types are specific to requirements. The agent seeks any specific keyword or requirement that is declared as an entity. The entity modifies user intent in the chatbot, providing more personalization and accuracy in responses to user searches.
Dialogflow already contains a wide range of built-in entities, also called system entities — for example, sys.geo-city, @sys.date and many more. Hence, they can be simply entered in the training phrase and Dialogflow identifies them automatically.
Context is used to call one intent from another intent and to show the request type of the user. If an input context is set in intent, DialogFlow will scan through all the intents that have the same context as an output context. The flow of a conversation can be controlled with the help of input and output context.
For example, if an agent asks for the user’s name, the name would be the output context of the same intent and it would be the input context of another intent.
Prebuilt agents and Smalltalk
In addition to the elements mentioned above, DialogFlow offers a range of prebuilt agents, which are very helpful to cover some of the most basic conversational topics.
Furthermore, for any agent, ‘Smalltalk’ intent can also be activated, which enables the chatbot to become more personalized.
DialogFlow has made it very easy to build extremely functional and fully customizable chatbots as per the requisites of the organization. The purpose of this blog was to provide a high-level overview of the process for building a chatbot with DialogFlow and explore its functionality and use cases.