Dialogflow has made a few updates to their service geared towards Google IO 2018.
You can read about it at this blog post, and I have also added my own summary here.
Improved History view
Earlier, the history view was quite hard to use and navigate. The History view is now much improved!
You can filter messages by date range and by platform type. You can expand a single item in the conversation history to see an expanded view that now shows the user's message and actually looks like the interface you would see in a chat application. For example, here is a screenshot of the History tab for my SupportBot.
Negative Training Phrases
I have been asked by a few coaching clients if it is possible to add "exceptions" in the training phrase. A common issue is when a word such as "no" or "not" is present in the middle of a user's phrase, and ends up matching the intent even though it is the exact opposite meaning of what was expected.
For example, if you tell the prebuilt smalltalk agent "I am not happy" it thinks you are saying "I am happy"
So previously, this was quite hard to fix. But with negative training phrases, you can do it quite simply, as you can see in the example below.
Note: an important addition here is that you can now add training phrases even inside your fallback intents. This wasn't possible earlier.
There is a new section called Log Setting inside the Settings tab.
I haven't personally tried this out for myself yet, but you now have the option to log to Google Cloud using StackDriver.
I am not very familiar with StackDriver as of this writing, and when I went to the cloud console I saw a message asking me to sign up to Stackdriver.
This also means that when I try to toggle the switch for "Log Interactions to Google Cloud" it is erroring out.
Improved diagnostics info for webhook calls
The curious thing about the way webhooks work in Dialogflow (and possibly also the other bot frameworks) is that the request JSON going to the webhook URL has a "section" which needs to be populated and sent back as the response JSON. When you are doing your debugging, this can be a little hard to wrap your head around.
Now Dialogflow has added some additional separation so it is clearer to see what is going on.
For example, in my Intro to Dialogflow course I introduce a Chemistry Bot which can return the atomic number of elements.
When I ask the question "what is the atomic number of Carbon" let us take a look at the various diagnostic information I have now.
There are now four tabs:
1 Raw API Response
This is the full, raw API response coming back in JSON format
2 Fulfillment Request
This is the JSON sent to the webhook. If you were to put a breakpoint and inspect your webhook, this is the JSON you would see coming in as a request
3 Fulfillment Response
Note: this is not the full response. Rather, it is the "response section" I was talking about before. It is the portion of the JSON which is updated by your webhook.
4 Fulfillment Status
The Diagnostics Info tab looks at the status code and outputs this message. Here, since the status came back as successful, it outputs an appropriate message.
As you can see, what is shown in the Diagnostics Info is based on the status code, but it uses a predefined message (which I believe corresponds to code 200).
If the status code came back as 206, it will have a different response. For example, I introduced an intentional typo in my code.
Let us see what we get in the Diagnostics Info now. This is in the raw API response:
And this is what you see in the Fulfillment Response:
And finally, here is the fulfillment status:
You can see that the Fulfillment Status tab is simply outputting whatever came back in the errorDetails field in the JSON.
Full Chatbot Templates
This resource is likely going to be a big help for people getting started in Dialogflow. The Dialogflow team has added these template chatbots, including the fulfillment code. You can get them here.
Here are some example bots you can play with:
With these updates, I think it is going to be
- easier for new developers to get going
- easier to explain and debug webhook programming
- easier to understand your user interactions with Dialogflow
Note: this is not an exhaustive list of all changes. As I notice more, I will keep updating this post.