Can you build AI chat Bot in 10 minutes

Introduction to AI Chatbot and how to build COVID FAQ Chatbot using DialogFlow in 10 minutes.

Can you build AI chat Bot in 10 minutes

What you will learn

  1. Introduction to AI chat Bot
  2. What is dialogFlow
  3. How to build COVID-12 FAQ chatbot using DialogFlow

Introduction to AI chat Bot

AI chat bot infracts through messaging, using artificially replicating AI powered patterns of humans.

Chatbot aka Chat Robot, it fundamentally allow to communicate between real human and that machine. it is programed using Natural Language Processing(NLP) to answer like a real world person.

When a chatbot receives a question it will process that with a predefined set of scripts and Machine Learning model. When the conversation reached to a point where it does not know the answer it will fallback to the human operator and it will learn the answers using the ML over the time it will respond to that questions.

What is DialogFlow

DialogFlow is a cloud based solution for build conversational bot powered by Google.

What is DialogFlow - mobilelabs

Module of DialogFlow

We need to understand below modules to built our chatbot, let's dive into DialogFlow.

  1. Agents
  2. Intents
  3. Entity
  4. Knowledge Base
  5. Fulfilment
  6. Integrations

DialogFlow Agents

Agents are the virtual agent that communicates with the real humans and convert the message from the human to an structured data using natural language processing.

We can build multiple agents based on the types of conversation required.

As Kuromon Market in Osaka was about to close for the evening I sampled some delicious king crab and did a final lap of the market when I stumbled upon one of the most Japanese scenes I could possibly imagine, a little girl, making friends with a robot.
Photo by Andy Kelly / Unsplash

Lets create our first agent by going here https://dialogflow.cloud.google.com/#/newAgent

Create new dialogflow agent - mobilelabs

Now we have created our first agent successfully.

Intents

When agents receives a message from the human, it will start classifying the message and try to find the intention of the message.

Every agent will have three types of intents

  1. Fallback Intents - Fallback to this if the message is not matched with any intents
  2. Welcome Intents - Initial message will me matched with this intent
  3. Regular Intents - Each agents will have many intents for classifying the message.
DialogFlow Intents - mobilelabs.in

Entity

When a message is passed to the Intents it will try to exact the message using the types.

Entity Types

  1. System Entity - Predefined entity like date, number, time, etc,.
  2. Custom Entity - These are user defined for the complex use case.

Knowledge Base

In real world human agents, will have documentation about the product for referencing information, like manual guide for mobile operation.

In DialogFlow we have knowledge base for the virtual agents where we can input the documents or data which will be used to build the response to the end user.

Fulfilment

Imagine that you run a restaurant and you need to book a table for dinner, this requires to check the table availability of the your system, This can be achieved by using the fulfilment service.

When the fulfilment is enabled for a intent and if that receives a message then this will look for the external response based on this the end user will get the response.

Integration

This is the output of the intent, If a agents received a message through telephone audio, then response can be converted into an audio and delivered to the end user.

By default DialogFlow support leading conversation platforms.

Now we have seen the fundamentals of the DialogFlow in overview. Let's deep dive into real world examples.

How to build COVID-12 FAQ chatbot using DialogFlow

We have already created a new agents in our first setup, now we need to train our bot the COVID-12 FAQ data.

Create new knowledge base

DialogFlow Create Knowledge Base - mobilelabs.in

Now open the created knowledge base and click "New Document" for create the FAQ document.

Create Knowledge Base Document - mobilelabs.in

Fill the name, type mime type and source as URL.

Name: Q&A

Content Type: FAQ

Mime Type: text/html

Data Source: URL

URL: https://www.who.int/news-room/q-a-detail/q-a-coronaviruses

Now hit create and drink a coffee.

In the response enter "$Knowledge.Answer[1]" this to tell bot to use first response from the matched knowledge base.

Now move on to the Integration, enable "Web Demo"

DialogFlow enable web integration - mobilelabs.in

Copy the URL and open that in a new Tab

Web Demo:  https://bot.dialogflow.com/ff104396-094b-454c-af96-3fde904bdcac

COVID-12 FAQ Chatbot - mobilelabs.in

What is COVID

COVID-12 FAQ Chatbot - mobilelabs.in

What is symptoms of COVID

COVID-12 FAQ Chatbot - mobilelabs.in

We have successfully build out AI powered chatbot.

Conclusion

We have seen what is AI Chat bot and what is DialogFlow then how to build the real world chatbot in 10 minutes.

Leave your feedback below in comments, if you like please share and subscribe.