Dialogflow - Overview



About Dialogflow, there are a few things you need understand before using it. In order to work properly a traditional computer system demands predictable and structured input which sometimes makes using interfaces difficult and unnatural. Sometimes end users can find themselves in a situation where they are unable to understand the structure of the input and are unable to find out what to do. With the natural language that end users speak the interfaces should ideally be able determine exactly what the user wants.

Role of Dialogflow

As an example, let us say the user asks, "How's the weather today"? Other users may also ask −

  • How is the weather right now?

  • How is the temperature in Mumbai?

  • What will be the weather on 20 October?

You know that using language experiences to these fundamental questions can be challenging. Natural language processing and interpretation need a very powerful language parser. Dialogflow gives this type of parser so that you can offer excellent conversational experiences for your end users.

Main Components of Dialogflow

Agents, intents, and entities are the three main components of Dialogflow. These are required for helping users with an easy dialogue experience. Let us discuss these three components one by one in the next section −

Agents

The Dialogflow agent is a virtual agent that is in charge of managing end-user conversations. A module that is capable of understanding details of human language is called an agent. To make it possible for your apps to understand end-user text or speech during a discussion Dialogflow converts it into structured data. The Dialogflow agent can manage the dialogue types that your system needs.

A Dialogflow agent is the same as an agent in an actual call center. Since they have been prepared to handle the conversation situation neither of them needs to be too precise in their instruction.

Intents

An end user's intention for a particular turn of conversation is classified by an intent. Each agent needs the setup of several users and the combined agent is capable of managing a whole conversation. Dialogflow looks for alignments between the end-user expression and your agent's best interests when a user writes or says something that is referred to as an end-user expression. Intent classification is another term for intent matching.

For Example: If you have to create an agent for the weather, make sure that it can identify and respond to queries from end users about the weather. Setting the objective of the weather forecasting questions is the next stage.

The question "What is the forecast?" is asked by a user. Dialogflow examines and compares the meaning provided by the forecast with the user's expression. If we want to extract the important information from the end-user expression like the location and the right time for the weather report, we have to be clear about our goal. The information collected is required by the system in order to respond to system related requests.

Entities

Entities are used by Dialogflow to identify and extract relevant data from natural language inputs. Entities help your agent understand the reason behind a particular user input, while intents let it detect specific data that your users mention like product names, quantities with units, street locations and more. There will be an entity linked to each important piece of data you want to retrieve from a user's request.

Dialogflow Console

The Dialogflow Console is a web interface designed by Dialogflow. It can be used to create, evaluate and manage agents. There is a difference between the Dialogflow Console and the Google Cloud Platform (GCP) Console.

While the GCP Console handles Google Cloud service parameters like resource allocation and payment, the Dialogflow Console mainly handles Dialogflow agent management.

Also you can use the Dialogflow Console to easily create a new agent.

Context

Dialogflow's context works in a similar manner to how natural language context does. For example - when someone says, "They are blue," you have to figure out who or what "they" is. Dialogflow does something similar by matching user intentions with the correct purpose based on context.

Conversation management is made easier by contexts. It is possible to build input and output contexts using simple names. These settings help to focus the conversation and choose the right goal. When an intent matches so the output context becomes active. After that dialogflow looks for intents that belong with the active input contexts.

Follow-up Intents

The Follow-up Intents can be used to automatically build contexts for the pairs of intents. A follow-up intent is a child of its connected parent's intent. An output context is automatically added to the parent intent and an input context with a similar name is added to the follow-up intent when a follow-up intent is created. A follow-up intent matches in exactly one situation and that is when the parent intent was expressed in the previous conversational turn. There are multiple levels at which nested follow-up intents can be created using Dialogflow.

One of the predefined follow-up intents in the Dialogflow like cancel, yes, no, and so forth can be shown as the typical end-user's response. We are also able to generate our own follow-up intent in order to control the customer's responses.

User Interactions with Integrations

Dialogflow is compatible with a wide range of chat platforms like Google Assistant, Slack and Facebook. You can select from a number of integration options to create an agent for any of these platforms. Direct user communications are made simple with Dialogflow which is allowing you to focus more on developing your agent.

User Interactions with the API

If you decide not to use any of the integrated integration options so you will need to write code to interact directly with the user. For every exchange, your code needs to connect to Dialogflow's API. You can communicate the user's message and get their intended meaning again in this way.

The following figure shows the process for using the API.

User Interactions with the API

Here is the process of user interactions with the APIs in Dialogflow −

  • The end user is typing or saying the words.

  • The end-user expression is sent to the Dialogflow by your service in the detect intent request message.

  • After that the Dialogflow tells your service that it intends to identify a response. The message contains information on the parameter, action, responses and matching intent that was stated for the intent.

  • The necessary operations like making external API calls or doing database queries are handled by your service.

  • The end-user receives the responses from your service.

  • The answers are visible or audible to the end user.

Fulfillment for Integrations

The agent will automatically respond with a simple and pre-programmed message when an intent is matched. But if you select an integration option, "fulfillment" can be used to provide a more flexible and dynamic response.

Dialogflow responds to an intent whose fulfillment is enabled by contacting one of your configured services. For example- if a user wants to schedule shopping for Monday so your service will check the database and let them know if it is open.

There is a setup that allows fulfillment for every goal. If an intent calls for a dynamic response or action from your system you have to enable fulfillment. If fulfillment is not enabled the agent will reply with the static message you given for that intent.

If fulfillment is enabled and there is a match in intent so Dialogflow sends out a request with the details. Dialogflow will get a response from your system with the information you need in order to move further.

Advertisements