I have a survey bot on my site on each post, and recently, I got this question: Can I use Dialogflow without writing code? And the answer, as in many things, is “it depends”. The FAQ bot One of the first bots I created for this site was an FAQ bot which simply gives links to popular articles on some famous blogs. As it turns out, creating this FAQ bot needs no coding whatsoever. And unlike the typical chatbot you would create, it needs no entities or contexts either. In other words, it is just a whole bunch of intents. So much so, you can use Notepad or your favorite text editor, list some answer links, and a bunch of question […]
I was recently asked by a client if it is possible to bulk upload intents from a CSV file to Dialogflow. Apparently, there was a time when this feature was already available in Dialogflow. But it isn’t straight forward anymore, and its probably for a good reason. CSV file structure Typically, the CSV file structure is simple. There is a column with a user says message, and then another column with the text response. What you want to do: You upload this CSV format, and you have an agent at the end of it. Things to consider Now, this simple format is not sufficient. For example, how can you handle multiple user says messages? what if you want to add […]
No, you wouldn’t intentionally break your chatbot’s functionality. But you need to know the different ways it can happen (and also consider the suggestion I have at the end).
Recently, on the Dialogflow Product forum, there was this question: There is also a reply by a Google employee, which you should go and read. There are two interesting things about this question: The asker is effectively trying to fit their entire chatbot into a single intent The asker thinks that everything should be an entity (which is probably a direct consequence of point 1) But I was more interested in why someone would think that the entire sentence is full of candidates for entities. In my opinion, you should actually try to use an entity only when you absolutely need to. So how can you decide what should and shouldn’t be an entity? Here are some ideas. Learn about […]
This is a post about where to host your webhook. However, this is not a post about cloud service providers. I am not going to talk about which one is better – Google Cloud or Heroku or AWS or Azure. Rather, I am going to ask you to consider the option of placing your webhook outside of your Dialogflow process. How the webhook works Generally speaking, the webhook works like this: End user sends a message to your Dialogflow agent via a messaging channel such as Twitter or Slack through Dialogflow’s test console an API call Your agent maps the message to an intent The agent sends some JSON to the webhook The webhook performs business logic after extracting relevant […]
The slot filling feature is hands down one of the coolest features in Dialogflow. Not only that, it is often the centerpiece of many demos given by the Dialogflow team. So why am I asking you to avoid slot filling? Because there are three common scenarios which the existing slot filling implementation cannot handle well. Do you need to ask user to confirm their input? As it happens, in real world chatbots, we need to ask the user to reconfirm their input. It becomes especially important in transactional scenarios where the reconfirmation is our last chance to implement a conversational “rollback”. With slot filling, you cannot ask for reconfirmation of an input right away. And if you do it outside […]
Did you know that Dialogflow will allow an intent to be mapped even if the entity you specify is missing? For example, suppose you create an agent with a single intent with exactly one userSays: “I want to book a ticket to @sys.geo-city” Even if you added the geo-city entity in template mode, there will be occasions when Dialogflow will map a phrase such as “I want to book a ticket to Kovai” As it happens, Kovai is a proper city in south India but it usually goes by the name Coimbatore. However, the name Kovai is very common in colloquial use. Notice what happens inside the Dialogflow console: You can notice three things: The intent did get mapped The […]
I recently got this question on my YouTube channel: Without knowing the full details of the question, I suppose this person has set a lifespan which is more than 1 (the default option in Dialogflow is 5). Ideally, you always set a context lifespan of 1 for all your contexts to avoid these kinds of issues. Also, if you would like an intent to be ignored, you need to set an input context for that intent. In theory, an intent is always a selection candidate if you have not added an input context. So an important step in creating intents which can be “ignored” is to add an input context to that intent.
Did you try to use the Dialogflow REST API v2 and found out that your webhook which used to work before stopped working? Here is what the two JSON formats look like when inspected side to side Given that the root object – “result” vs “queryResult” – is already named differently, your webhook will fail almost no matter what code it executes. Also note that there is a warning about this in Dialogflow’s console when you try to enable the v2 API. Takeaway As soon as you flip the switch, Dialogflow’s v2 API will start sending webhook requests in the new JSON format. Before you do that, make sure you understand the JSON structure and handle it appropriately in your […]
If you are building a commercial grade Dialogflow chatbot, you should definitely consider adding some regression testing to your chatbot. What is regression testing? The idea behind regression testing is that you will run a series of tests and verify if the performance of your chatbot is consistent over time. How to do regression testing in Dialogflow? You will make use of the /query endpoint in the REST API exposed by Dialogflow. By writing scripts which will send specific, pre-determined user phrases to the /query endpoint, you can verify if the phrases are getting mapped to the same intent (by using the intentID). Why do regression testing This brings us to the next question: why should you do regression testing […]