Wow it’s just gotten so much easier to write machine learning applications. A great case in point is bringing up your very own chatbot that understand natural languages whether it comes in on SMS messages, via Google Assistant or Whatapps or any of a zillion of other places.
Looking at various tutorials, most or them seem to center on api.ai which Google acquired and renamed dialogflow. It’s a good chance to learn the Google Cloud infrastructure and at the same time get something that works across all major channels from Texting thanks to Twilio to voice via Google Assistant or Cortana. You can even export the learning to Amazon Alexa.
The tutorial for dialogflow is actually pretty good. You basically create a set of intents which are rules. These are learn by example, so to start you type or import valid requests that map to the intent.
The system automatically figures out certain variables (which they call entities) like the date and time and populates them. This is also called slot filling of entities. The thing will actually drive through a list of required entities and keep asking you questions which is nice.
You can have all the entities, then it can either spew something out or it can run a fulfillment which actually does the work. This is actually a node application that is run in Google’s firebase. This is called a web hook and connects you with the rest of the world.
There is also a training framework, so if you have a set of utterances that don’t match, you can give it the right intent and also tell it where the various entities are. It is basically learning by example.
Finally, you can hook the thing up to lots of different channels. I tried Twilio so that you can get text messages. This works really well and is pretty simple, you just need to oauth2 the things together.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect

Recent posts

Loading Mastodon feed…