How to use Dialogflow’s Small Talk agent — FREE SPREADSHEET DOWNLOAD

Deborah Kay
Chatbots Life
Published in
5 min readNov 18, 2017

--

Once your bot is connected to Dialogflow, here are 6 things you can do to make it smarter.

1. Delete ALL of Dialogflow’s Default Fallback Intent text responses

If your bot didn’t understand what the user said the first time, it’s not going to understand the second time. The WORST thing you can do is to ask the user to repeat what they said.

It’s best to redirect the user to what the bot can do in your Fallback.

Example from Sammy the world’s first AI Sailing Bot

2. Do not toggle the Small Talk Switch.

If you enable Small Talk, you can customize answers to questions like “Who Are You” or “How Old Are You” etc. However, Dialogflow does not show you all the questions triggering the response, or what the default response is if you leave the answer blank.

You may find your bot returning a response which you did not program, and it can be challenging trying to figuring out which Small Talk intent is triggering that response.

If you’ve switched Small Talk on, you may see your bot responding to “ who is RANDOM NAME” like this:

Wrong!

How do we fix it? We need to figure out which intent is triggering the response. Unfortunately the Small Talk Customization Process does not allow us to do that very easily.

3. Go to Prebuilt Agents and import the Small Talk Prebuilt Agent.

A better option would be to go to Prebuilt Agents and import the Small Talk module (h/t Aravind Mohanoor from Mining Business Data for this tip!)

When you import the module, Dialogflow will create a new agent called Small-Talk with 86 different intents.

Within each intent, there are multiple prebuilt contexts. Note: some intents have have multiple pages of contexts, so be sure to toggle through all the pages.

Sadly, Dialogflow does not make it easy for you to search for contexts and responses within these intents.

Going back to our earlier example, if we wanted to figure out which intent was triggering the response to question “who is RANDOM NAME”, we would have to open up each intent and look for the response.

It’s not in smalltalk.agent.acquaintance (which houses the context “who are you”), it’s actually in smalltalk.agent.boss.

The context triggering the response is “who is your master”, and the default text response is “You are, of course”

Now that you’ve isolated the intent, you can either fix it or delete it.

4. Copy GoogleSheet with Small Talk Agent responses

To help bot builders navigate the contexts and responses in the Small Talk pre-built agent, I’ve created a searchable database mapping out all 86 intents and 1,507 responses.

If your bot says something you don’t recognize, you can search this database to troubleshoot and isolate the intent triggering the response.

If you’re setting up your agent for the first time, use the spreadsheet to select which intents you need and customize the text responses accordingly. You can find the GoogleSheet here: http://bit.ly/Dialogflow-Smalltalk-Googlesheet

Once you have customised all the responses, you can use this paid tool by Aravind Mohanoor ($29.99) to bulk upload to Dialogflow! Make sure your spreadsheet is formatted with the right columns before importing and ensure there are no spaces in the intent names. (Tip: Create a new agent, bulk import the small talk intents, then import the intents into your existing agent).

5. Select intents you want and copy to destination agent

Uncheck “Copy related entities” and select the agent you wish to copy the intents into.

6. Set the answer to “Who is YOUR NAME”

Bot builders for some bizarre reason like to ask other bots who their bot masters are. Why? Beats me!

Set up an intent…

… and save your name / nicknames as an Entity.

Then train your bot not to respond to other names. You can use Dialogflow’s system entity for this.

And that’s how your bot can have better control over Dialogflow’s Small Talk agent!

--

--

Head of Digital Transformation | Chatbot Evangelist | Speaker | 21 All Star Twitter | 3X School Builder | Top Medium writer in AI 2018 | Digitaldiscovery.sg