API.AI “Small Talk” is now Open! Why is it a Really Big Deal?

Guys from API.AI (NLP provider as a service) have recently made their Small Talk NLP module open and in this article I’m going to tell you why it’s a really big deal for all bot builders.

API.AI — Conversational User Experience Platform

If you’re not familiar with api.ai I highly suggest you to follow my tutorial and build a really simple bot here.


What is “Small Talk” Module at All?

Small Talk API.AI example

Here at BotCube we’ve built a lot of bots during the last year using both api.ai and wit.ai as NLP providers. Most of time I’ve been choosing api.ai because of one reason — module called “Small Talk”. It allows you to easily import a lot of predefined answers for simple questions and phrases like “Hi!”, “How are you?”, “Are you robot?”, “What’s your hobby?”, “How old are you?” and many-many more (about one hundred actually).

Take a look at the screenshot — it was done without single line of code.

But what if I don’t like responses to the questions? You can easily change them.

Small Talk customization UI

To customize Small Talk responses you can easily rewrite default responses using api.ai UI.

Sounds like a perfect tool, right? 🤔

But of course this module is not perfect. At least it wasn’t a couple of weeks ago 🙂


What Problems we Faced With Small Talk on a Real Project

  1. You can’t customize every response.

During one of our projects at BotCube we were building a chatbot mostly for children use. So, we really needed it to act like a funny magical buddy and use its own distinctive phrases in order to engage children. But we couldn’t fully customize the responses from UI because of the existing limitations. Maximum percentage of responses you were able to customize from UI was about 60%. But it’s not enough to build a real image of a character.

Featured CBM: The Future of AI Is in the Hands of Storytellers

So we decided to change responses directly from the code. We built a mechanism to identify a question from JSON data and rewrite a response. But it was a shitty solution, because 60% of our texts were stored in api.ai UI and 40% were in the code. Just a mess to be honest.

2. You can’t train Small Talk.

Usually, when you are teaching the api.ai neural net to understand particular type of questions you are creating a thing called intent and add a lot of options there. Let’s say I wanna teach my character to tell when it will visit some town in USA. So, I’m creating a separate intent called WhenWillYouCome and add a couple of different options how can users ask me about this: “Please visit me here in Boston”, “Are you coming to Chicago at all?”, “When will you come to New York?”. Yep, that’s it, that’s training.

Sample intent with training data

But you couldn’t actually train any Small Talk intent. You didn’t have access to it at all. In our case it was a super desired feature because children have their own kinda language to talk to a bot and we really needed some customization to be done but training was not available for a Small Talk too.

To say the truth Small Talk was more like a big black box with the cool features inside you can’t actually control.

How API.AI New Update Solved Our Problems

About a couple of days ago (it’s May 2017 now) api.ai rolled out their big update which included a lot of changes to Small Talk. So, right now you can split up the big Small Talk module into pieces and import it into your app as one hundred separate small intents.

Small Talk divided in a lot of intents

And this update itself solves both of our problems: you can easily open any intent, change response and add more training data (take a look at the screenshot below). And that’s super awesome! 🚀

Small Talk Acquaintance intent training set

Good luck with new api.ai features and Happy Botting! 🤖 ❤

For More on API.AI:

Read original post here.