How to build a chatbot 101
Recently we have been working on the Todemy chatbot, a tool to help students connect with tutors on demand.
Here’s what we have learnt about creating a chatbot.
Design your chatbot workflow
To create a chatbot, it would be crucial to design the conversation workflow of your bot. Consider the following questions when you are designing the flow. Why is the user here? How did the user get here? What outcomes are they looking to achieve?
Additionally you will need to include other common small talk interactions such as greetings, and salutations, profanity handling. We have also used a whole bunch of emoji’s 🤗🤗🤗
Train & test your chatbot
There is a concept of “Intents”, where you recognise what the user is saying, and which you can then serve up a response. When you create your chatbot, you will need to train your chatbot to detect and categorise free text input from your user as an intent.
We have used the natural language processing tools that come with wit.ai (the Facebook chatbot framework) to train our Facebook Messenger bot to recognise these intents.
Integration with backend
Once the chatbot has understood what the user is trying to say (the intent) then you will need to process this and serve up a response. We have stored our chatbot responses on our own server and these responses are served up when we have identified the intent.
Deployment to channels
Some Chatbot frameworks such as Google’s DialogFlow (formerly api.ai) allow you to deploy your chatbot to a range of channels. This means you can create your chatbot backend and deploy it to different chat interfaces such as Facebook Messenger, Slack, Skype, etc.
Approval from Facebook
We have chosen to use Facebook Messenger as our channel of deployment, which also enables a number of different Facebook Messenger features such as quick replies, buttons, web view and carousels. Facebook also has a process which require you to approve your Messenger bot with the Facebook team before it can be made live to the public.
Deploying the Messenger website plugin
A recent release in Facebook Messenger allows you to embed Facebook Messenger on your website with one line of code. You can see our deployment on our landing page: https://todemy.com/. Now you can find a Todemy Expert directly from our website.
Hope this is informative, and remember you can find a chatbot expert through the Todemy app at any time to help you create your own :)