/ / / Dialogflow training
DialogFlow | Training

Dialogflow training

In the video below, I describe how Dialogflow training works.

[00:00] all right so in this lesson we are going to learn about how Dialogflow training works now you might have heard a lot of people say. And even I have mentioned this on my website at different points I say that Dialogflow is very interesting and useful because it can get smarter over time so what exactly do we mean by the statement the Dialogflow bot gets smarter over time. And when you talk about this people usually [00:30] you know they refer to it as though it were a black box I think that it’s less of a black box than most people realize.

Although the intent mapping algorithm that dialog Dialogflow you know provides is is still a black box

Even though the intent mapping per se is a black box the training actually is a lot more transparent than most people seem to realize. So that’s what I’m going to discuss in this video. So what I have is if you go to my website ⌛ [01:00] you can go to this page where I have this bot which just it’s a very simple effect you bought what it does is you ask a question and it will based on the question that you are asking it will find any article on my site it will only find a single article it will find an article where the title of the article matches whatever you have typed.

So to see that it works properly let’s say if I say how to do how to do slot filling [01:30] comes back with this response which is a guide to slot filling and you click on it and you will notice that it actually opens a new page with an article which is pretty much having that in the title a guide to slot filling so this is how the bot is expected to work

Now in Dialogflow what you have you have a feature basically which is this training feature and this is the bots you know console ⌛ [02:00] inside the Dialogflow console this is what that chat board looks like so you have all these questions and people have asked all these things and I am very interested in a particular question that somebody has asked here where they say how to connect with php and notice that when they ask this how to connect with php it has actually gone to the default fallback intent.

So to show that I’m going to go to my bot

Again and I’m going to paste it [02:30] and. Of course it’s going to map to the fallback intent because it’s saying I missed that can you please say that. Again so now what I want to do is I want to show you an intent which I already have in my agent so I’m going to just search for the word php. And you can see that there is this article which is about the client library for Dialogflow for php all right so I’m going to click into that article ⌛ [03:00] I’m sorry into that intent.

And you can see that the training phrase is very simple it says php client library for Dialogflow v2 api getting started now this is the only training phrase you have on this in this intent and it actually is going to link to this article here on my site and let’s just quickly take a look at what it looks like I’m going to go there and let’s wait for a second [03:30] and this this is a tutorial which explains how you can use the php client library

But the important point is that this is how you would connect php to Dialogflow. In other words if you want to integrate Dialogflow into your php website or app or whatever you’re building the way you do that is you use the dialogflows api and you have something called the client library I’m not going to go into the details of what the client library is but the the main thing is that you need to use something ⌛ [04:00].

Such as a php client library to connect your Dialogflow agent to your php website

So that should have been the answer when somebody is asking this question how to connect with php. So what I can do is I can go back to my training tab and I go to this question. And you can see that here it’s just mapping it to the default fallback intent so. Instead of that what I can do is I can click on this and I can search [04:30] for the word php and remember that this is the article this is the article that we are interested in so I’m going to click on that.

So what I have effectively done here is I have mapped this user utterance or training phrase to this particular intent and this is a variation that is the second question is just a variation of the first one so I’m going to

Also select that I’m going to do the same thing. And now I’m going to so you have made a ⌛ [05:00] couple of changes so your next step has to be to approve these two changes.

So let me do that now I’ve approved it you have to give it a few seconds for it to sort of update it and

Also save it and also notice that of all the other training phrases we have inside this training you can say the contraining tab this one has been approved so it has this green check mark next to it. And now you can [05:30]. Also see that the agent training has been completed based on the changes that I just made but the most important thing to notice is let us say that we go back to this intent.

Again so notice what happened the two phrases that I just selected and mapped to this intent they got added as user utterances or training phrases into that same intent okay so this means that ⌛ [06:00] when somebody is asking questions which are somewhat similar to these questions these phrases they are going to be now mapped to this particular intent which in turn means that they will be able to go to this particular article right

So let me check that let me make sure that it actually works like we think it should.

So let’s put it in there you go so now if I were to click on this yeah it goes back to that same article which we were seeing [06:30] over here all right so this is the first thing that is when you click on the when you map the training phrase to that particular intent you see that it actually goes and gets added to the training phrase list in that particular intent that’s the first thing the second thing that you should know is that when you export this Dialogflow agent the zip file of this because it contains all these training ⌛ [07:00] phrases and all the responses and

So on what has also happened is that the training has been effectively saved into your Dialogflow agent I’m trying to say something which is maybe a bit abstract here but once you think through this I think it will make sense the agent which you started with was not as smart as the agent which you ended up with once you did this mapping through the training tab right that is [07:30] initially it could not answer that question which is to connect with php.

And now it can answer the question to connect with php and all the new learnings that Dialogflow was able to obtain

Because of your you know because you did some additional training is now stored inside of this agent which means that if you had to download the zip file. And then you know send it across someone.

So that they can use that zip file to create another bot or something like that you have ⌛ [08:00] stored that extra training the extra learning that you have the bot has effectively become smarter

But also it has figured out a way to retain that additional knowledge by just like the way you have the zip file of the Dialogflow agent just the way that it’s actually works right so this this is important because your Dialogflow agent when when you say that it’s getting smarter over time [08:30] it’s not as if something is happening.

In the background that we don’t really understand and we can’t have any insight into but it just seems to be magically getting smarter that’s not what is happening that is it’s not as if on the servers that Dialogflow is running on

Transcript auto-formatted using ATF

Related Posts