Creating AI chatbot using RiveScript

Three years ago, I wrote a blog post talking about how I started exploring and experimenting with AI chatbot application development. In the end I found myself likely interested more in building AI chatbots for the web. Basically when designing a chatbot, in order to have a natural human-like conversation, the chatbot needs a knowledgebase system that works like a brain to respond to particular conversation inputs.

I remembered before I created my first AI chatbot web app known as W4Y1, I had been struggling to find a better chatbot interpreter engine that can provides easier way to program the bot brain. Then, I found one that is a quite good fit for my requirement known as elizabot.js. So, I built my chatbot based on this JavaScript library. I liked this library because it uses JSON format for the knowledgebase markup language. Thus, it was easy for me to program my chatbot brain.

After a while using elizabot.js, I started to feel that the knowledgebase markup language should be more simpler than JSON format. Without wasting my time to go into the source code and modify it, I opted to look for a better chatbot interpreter engine alternative. And then, I found two of them that can provide me a “more simpler” solution to program my bot brain - BotML and RiveScript. After some researches, I decided to use RiveScript since it has more supports for different programming languages, good documentations and active contributions from its community. So, I have developed two chatbot app projects that are based on RiveScript interpreter engine; HelloBot and hnbot.

HelloBot - AI chatbot web app built using Jekyll

HelloBot - Screenshot

HelloBot is built using Jekyll and rivescript-js for the bot interpreter engine. HelloBot is live and currently being hosted using GitHub Pages for demo purpose. HelloBot contains terminal-like interface designed using Bootstrap, jQueryTerminal and jquery-mousewheel.

Demo // Source code on GitHub

hnbot - AI chatbot web app built using Node.js and Socket.IO

hnbot - Screenshot

hnbot is using a similar interface design with HelloBot, and the only difference is that hnbot is built based on Node.js and Socket.IO. Also similarly to HelloBot, hnbot’s interpreter engine is based on RiveScript NPM package.

Source code on GitHub

To run the demo locally, you need Git and Node.js installed, then run following commands:

git clone https://github.com/heiswayi/hnbot.git
cd hnbot
npm install
npm start