This is how I setup a free Facebook chatbot without coding. There are many services that allow you to create a Facebook chatbot without any line of code, I like Chatfuel in the way of its UX works and other service integrations.
Setup Facebook chat & Chatfuel
Create a Chatfuel account and a chatbot from built-in template, I use free conversation for the general purpose. https://dashboard.chatfuel.com/#/bots
. Connect it with your Facebook page.
Set the chatbot scope
Users don’t find the chatbot for ‘everything’, so do Alexa, Siri, Cortana,…etc – they only support some common things like weather checking, music playing…etc. It’s fine with your chatbot can only answer things relate to your business and say no to others. People don’t ask for a bike if you are selling beer.
It’s important to set your chatbot goal then scope. It helps you know what sentences chatbot need to process. My Facebook page focus on 1) post on my blog GURUnH, 2) Agile Y information and 3) order Agile Y. Then I know there are 3 sentence groups .
Build the blocks
Chatfuel uses 2 terms Block and Group. A block is a single content chatbot gives to user. User raises a question and chatbot answers by a block. Group is a logical block container. I build the blocks by some types like text, image, menu and list…
There are 2 built-in blocks. Welcome Message is the first message user see when open the chat. Default Answer is for in-understood user input.
Build the conversations
Now you can build the simple AI based conversations with chatbot in Set Up AI area. You can add the rule-based responses like the image below. The response can be a block or text; you could use random response to make the conversation more human-able. The more sentences you add to rule, the better AI does. It means user doesn’t need to enter the exact text in the rule, he can message the similar sentences. You can choose one of various built-in languages but I recommend English, it’s much better than the rest. I use both English and Vietnamese but the AI seems not good enough.
Now you can test the chatbot. But wait, you can do more like I show the latest post without coding. I just choose WordPress integration (works through Zappier). There are many integrations in Chatfuel for common use like Google search, Location…etc. You can also forward the user input, packed to JSON, to your own server for other process.
Here is simple setup a chatbot with Chatfuel, you can find a better service like FlowXO.
The cons of Chatfuel is it doesn’t support context based conversation; it means chatbot doesn’t ‘remember’ the previous messages. For more intelligent chatbot, we need another service like Wit.ai or API.ai. I will integrate the current chatbot with API.ai and update in another post.
655 total views, no views today
This is very simple version of building your own Jarvis basing on what we have today. The Jarvis here can recognize and do some commands like showing the lunch menu, display menu of a specific day… etc. It’s less than a prototype but it can be the demo of what we can do by combining:
- Speech recognize: It’s much easier today with Apple, Google and some others open the SDK. Many languages are supported but English is the best, of course.
- Natural language understanding (NLU): Most of big tech companies are working on the promising system like LOUS.ai (Microsoft), Watson (IBM)… I use Wit.ai just because of its simple of use. These systems created the base model, our task is just inserting more data to train the machine with a specific topic.
- Natural language processing (NLP): It’s actually the lower level of NLU but it could help. Google is in the best with cloud base service https://cloud.google.com/natural-language/, that can analyze the syntax and sentiment. It’s really helpful while we combine the NLU and NLP. We know the intent of the sentence as well as sentiment, it’s a guide to have more human react (with emotion).
- Text to speech: It’s a easy job, there are a lot of services help our Jarvis speak naturally like Amazon echo.
We can do somethings base on this code. Objectively, we can connect it with other things like laptop, IoT server… to do more jobs such as sending the message, turning on the light… etc. Technically, we can have better design to open for the possible command / intent, and think about the serverless jobs.
I hope I can do further in the next demo.
The presentation and source code are here: https://github.com/hiennvn/simple-jarvis
842 total views, no views today