Open In App

Create Your own Intents and Entities in Dialogflow Chatbot

Last Updated : 22 Jun, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

Dialogflow is a powerful, natural language understanding engine to process and understand natural language input. In other words, it lets you easily achieve a conversational user experience by handling the natural language understanding for you.

Getting Started

  • First You have to Go to link https://dialogflow.cloud.google.com/.Then you have to sign up with google account and then accept terms and conditions.
  • Next Step is to create Create your first Dialogflow agent.

Creating Agent

  1. Click Create Agent.
    Create agent

  2. click on input box of text AgentName and then Enter the name of your chatbot (e.g., Mobile)
    agent name

  3. click Create.Dialogflow will now create a virtual agent project. The Dialogflow console menu you should now see the Dialogflow console. By default, Dialogflow agents start with two intents. Your agent matches Default Fallback Intent when it doesn’t understand what your users say. The Default Welcome Intent greets your users. These can be altered to customize the experience. On the right is the Dialogflow simulator. This lets you test out your agent by speaking or typing messages. You just spoke hello to your Dialogflow agent! The Default Welcome Intent is preconfigured to understand basic greetings and to reply with a generic response.

Creating Intents of Agent

add intents name
Dialogflow uses intents to categorize a user’s intentions. Intents have Training Phrases, which are examples of what a user might say to your agent.

  1. Click on to Intents in the left menu and write intent name (for e.g Mobile_order).
  2. click on Add Training Phrases and enter the following, pressing enter after each entry:
    add training data

    • What time shop will open ?
    • Do you have samsung phone?
    • I want to buy redmi 7 phone on 3 December 2018 at 9 am.
    • When shop will close?
    • training phase

  3. In the Responses section, under Text Responses, enter the following response in the text field:Welcome To Mobile_shop and then click save button
    response phase

  4. Now try it out using the simulator on the right by asking the question: I want to buy redmi 8
    simulator
    Notice that even though your query was a little different from the training phrases, Dialogflow still matched the query to the right intent. This due to inbuilt machine learning on it. The machine learning model checks the query against every intent in the agent, gives every intent a score, and the highest-scoring intent is matched. If the highest-scoring intent has a very low score, the fallback intent is matched.

  5. Next Step is to Create Entities.
    create entities

Creating Entities Of agent And mapping to intents

Entities are two types,i.e system based or inbuilt and user-defined. Inbuilt entities are sys.date, sys.time, sys.number, etc. We have to map entities to our intent so that chatbot understands what kind of data it is. Just like a programming language, in C we define the data type of variable similarly we can term entities as data type and variable as intents

  1. Click on the Plus Symbol(“+”) next to Entities in the left menu.
  2. Add the name size into the “Mobile_type” text field.
  3. Make sure the “Define Synonyms” checkbox is checked.
  4. Enter the following values in the text boxes that say “Click here to edit entry.” You can use the tab button as you enter the values so they are used as synonyms too, and hit Enter to get to the next row.
    • Samsung
    • Nokia
    • Redmi
    • vivo
    • Realme
  5. Now click save and go to intents section
  6. Now Map the entities to intents for example:given intents is “I want to buy Redmi 7 at 8 pm on 29 January ” in this 7,8pm,29 january are inbuilt entities. 7 will map to Sys.Number, 8pm will map to sys.time and 29 january will map to sys.date. To map this u have to select Corresponding data of entity and click on its match entity.Here Redmi belong to entity that we have created that is mobile_type so, select Redmi and click on Mobile_type from dialog box that appear after selecting Redmi.
    map entities
    final

  7. Entity Is now mapped to intents ,Now test your result From simulator

Similar Reads

Getting started with Dialogflow
Dialogflow (formerly known as Api.ai), is the platform owned by Google to build conversational agents. Instead of building a chatbot from scratch, Dialogflow makes it easier to build it in considerably less time and with bunch of Google features, including pre-build ML Models that can help you get started right away. Dialogflow also allows you to i
4 min read
Integrate Dialogflow Agent using Actions on Google
Actions on Google (AoG) is the platform for developers to extend the Google Assistant. Using AoG developers can deploy their existing Conversational Agents or build for Google Assistant directly from templates. This is a walk-through guide to integrate your Dialogflow Agent to Actions on Google console. [caption width="800"]Actions on Google[/capti
3 min read
How To Create/Customize Your Own Scorer Function In Scikit-Learn?
A well-known Python machine learning toolkit called Scikit-learn provides a variety of machine learning tools and methods to assist programmers in creating sophisticated machine learning models. A strong framework for assessing the effectiveness of these models using a variety of metrics and scoring functions is also offered by Scikit-learn. To ass
4 min read
NLP | Extracting Named Entities
Recognizing named entity is a specific kind of chunk extraction that uses entity tags along with chunk tags. Common entity tags include PERSON, LOCATION and ORGANIZATION. POS tagged sentences are parsed into chunk trees with normal chunking but the trees labels can be entity tags in place of chunk phrase tags. NLTK has already a pre-trained named e
2 min read
Extracting Numeric Entities using Duckling in Python
Wit.ai is a natural language processing (NLP) platform that allows developers to build conversational experiences for various applications. One of the key features of Wit.ai is its entity extraction system, which can recognize and extract entities from user input. One of the key features provided by Wit.ai is its entity extraction system called Duc
4 min read
How to Create a Chatbot in Android with BrainShop API?
We have seen many apps and websites in which we will get to see a chatbot where we can chat along with the chatbot and can easily get solutions for our questions answered from the chatbot. In this article, we will take a look at building a chatbot in Android. https://www.youtube.com/watch?v=7_Cc36c7EW0What we are going to build in this article? We
9 min read
How to send Custom Json Response from Rasa Chatbot's Custom Action?
Rasa is an open-source Machine Learning framework to automate contextual text-voice-based Assistant. Rasa NLU understands the correct Intent with the help of its pre-trained nlu data. Rasa Core decides what to do next and reply according to in sync with the training stories. It also has the capability to store Entities (Noun type-specific Informati
6 min read
Send Automated Emails using Rasa chatbot
Rasa is a python module used to create custom AI chatbots. You can easily send automated emails to your users using the rasa chatbot. Rasa is a tool to build custom AI chatbots using Python and natural language understanding (NLU). Rasa provides a framework for developing AI chatbots that uses natural language understanding (NLU). It also allows th
5 min read
Build Chatbot Webapp with LangChain
LangChain is a Python module that allows you to develop applications powered by language models. It provides a framework for connecting language models to other data sources and interacting with various APIs. LangChain is designed to be easy to use, even for developers who are not familiar with language models. How does Langchain work?LangChain wor
13 min read
Prompt Engineering for ChatBot
ChatBot helps save a lot of human resources and in turn money for the organization. But the usage of chatbots is very challenging because no such smart assistants were available which can help solve the diverse problems which are faced by people all over the world. But with the current introduction to LLM by the community has shown the possibility
6 min read