DialogFlow ES | Integrations

Dialogflow Architecture

First published: April 2018  |  Last Updated: July 2020 Recently, I realized that people are not always very clear about Dialogflow’s architecture. In particular, a client was mixing up fulfillment and integrations. So this article provides a high level overview of Dialogflow’s architecture with a focus on how data flows when users interact with Dialogflow agents. In my view, there are 4 concepts you need to understand to get a good picture of Dialogflow’s architecture. 1 Request-response You can summarize a Dialogflow agent as a series of (request, response) pairs [1] . That is, 1 User sends a request to the Dialogflow agent 2 (some NLU magic happens) 3 Dialogflow sends a response back to the user Why is this…

DialogFlow ES | Python | Webhooks

Dialogflow Python webhook tutorial

One of the things that I have mentioned before is that you need to have a programmer on your team if you would like to build a non-trivial Dialogflow bot. At the same time, all Dialogflow bot makers would still benefit from understanding the basics of webhooks. This tutorial will be helpful if you are technical, but not a programmer. I will explain just enough about Dialogflow webhooks to make you dangerous. 🙂 If you are a programmer, this guide will still be helpful if you are new to Dialogflow. Hello World Let us start with a simple Hello World program. First, sign up for a free account at Repl.it. You can use your Google account to sign in. Create…

DialogFlow ES | Website Bots

Convert your WordPress website into a Dialogflow FAQ chatbot

This article talks about converting your entire website into a Dialogflow FAQ chatbot. If you are just interested in how to add a Dialogflow chatbot to your WordPress website, check out my course on the 7 ways to integrate Dialogflow into your WordPress website. I have created a tool which allows you to turn your WordPress website into a Dialogflow FAQ chatbot for your website within a few minutes. It is based on the Dialogflow Messenger integration. You can interact with the live bot (created by using this tool) here. For now, the tool is free. At some point in the future, I will probably make this a paid tool. So if you are interested, you should check it out…

Conversation Design | DialogFlow ES

When NOT to use follow up intents in DialogFlow

There are some situations where you shouldn’t use followup intents, because it will not work. The while loop There was a chatbot called the Florist bot that was originally used as an example bot in the Dialogflow documentation (when it was still called API.AI). This is what the flowchart of the Florist bot looked like. In the figure below, the area marked in red is actually a while loop. In theory, the user can just keep indefinitely adding red roses into the bouquet and never say “No, thanks” and exit the loop. This is the “while loop” in software terminology. It is not possible to use followup intents for this conversation flow, since you wouldn’t know how many levels deep…

Context | DialogFlow ES

Dialogflow Context Lifespan

I have mentioned in many of my articles and videos that I recommend using a context lifespan of 1 in all your intents. I have collected all the related ideas into this single article, and also updated it with my current view as of June 2020. This article is based on a few different articles I had written previously on the topic of context lifespan. Optimal context lifespan in DialogFlow Note: this is a somewhat advanced topic, and certainly a bit opinionated. I wouldn’t recommend beginners get into this article until they have built at least a toy bot and experienced all the features in Dialogflow. Contexts If you are building bots using Dialogflow, you are probably aware of contexts….

DialogFlow ES | Website Bots

Dialogflow Messenger tutorial

In this tutorial, I explain how to add a chatbot to your website using the Dialogflow Messenger integration. What we will be building The video below shows what we will be building in this tutorial. Embed the chat widget into your website Embedding the chat widget into your website is straight-forward. Create your Dialogflow agent Create a new Dialogflow agent, and remove the Welcome event from the Default Welcome Intent. Add a new intent into your agent with the following information (note that it includes the Welcome event). Add the script to your web page Once you create your welcome intent, go to the Integrations pane, and select the Dialogflow Messenger integration. Now copy the script into your clipboard. Paste…

DialogFlow ES | Training

Do I need to hire a developer to build MY chatbot idea?

I recently got an email from a course student: Let me describe my background first. I am an engineer, but not in computer field, so I consider myself technical, but not programmer. With many reasons I choose to change my working field, and I have tried to learn about IT and programming and end up with building a chatbot. Before I took your courses, I enrolled in Javascript + NodeJS courses, then Dialogflow course in Udemy which teaches using Dialogflow with Facebook Messenger by custom integration (REST API approach). As a programming beginner, it was very painful and costed a lot of time. Even after I completed that course I still had no confidence I could build a real thing….

Context | DialogFlow ES

Three types of Dialogflow contexts

You might not have realized this, but there are actually three types of Dialogflow contexts. And I recommend only one of them. Implicit and auto-generated contexts When you use the slot filling feature, which I do not recommend, you are using implicit, auto-generated contexts. (Note: I use auto-generated and system generated interchangeably, they mean the same thing). These contexts are auto-generated because you didn’t create them but they are automatically generated by the system when you define a parameter as being required. They are implicit, because their presence cannot be used to infer candidate intents. Explicit and auto-generated contexts When you use the follow-up intents feature, you will notice that Dialogflow automatically adds an output context to the parent intent…

Bot Frameworks | DialogFlow ES

Dialogflow vs RASA NLU

I have created a small eBook to explain the differences between Dialogflow and RASA NLU if you are trying to choose one or the other. Note: you can right click on the images below and open in a new tab or window to see a larger, full size picture. Table of Contents Excerpt Buy the eBook You can buy the eBook from Gumroad by clicking on the link below.  

Machine Learning

Machine Learning vs non-Machine Learning algorithm

Recently, I was interacting with some non-technical folks and noticed that people use the term ML even when an algorithm doesn’t actually use any Machine Learning. So here is the simplest definition (that I know of) which explains the difference between Machine Learning and non-Machine Learning algorithms: Machine learning algorithms improve when you provide them with more data. Non-machine learning algorithms don’t. Digit recognizer A famous and somewhat standard ML beginner project is the handwritten digit recognition project. As it turns out, this simple task is a really good way to understand the difference between ML and non-ML algorithms. There are a few reasons. Simple Input The input to a Digit recognition algorithm is very simple. It is a scanned…

spaCy

10+ practical projects to learn spaCy in depth

If you like learning by doing, this article will provide you a list of practical projects you can use to learn spaCy in depth. Before you begin This article is meant for programmers. If you don’t have any programming experience, you can still skim this article to see what kind of problems can be solved by Natural Language Processing. But to be able to work on these projects, you need to already have some Python experience. The projects are not sorted or ordered by level of difficulty. In fact, some of these projects are probably open problems in their specific domains. But the important thing isn’t that you completely solve the problem, but rather you understand the techniques used to…