This post is part of a series of blog posts about a chat bot RazType™ that I implemented recently. Given that chat bots are advertised as a modern application that’s super easy to do, I decided to implement a prototype to learn through hands-on experience. There are 5 parts to this series:
- High Level Design (Part 1) — this post
- Choices and Decisions (Part 2)
- RSS Implementation Learnings (Part 3)
- FAQ Implementation Learnings (Part 4)
- Adding the Facebook Channel (Part 5)
From a high level, developing chat bots seems super easy. The Microsoft Bot Framework enables developers to create chat bots rapidly. In addition, the Azure Bot Service allows organizations to code and deploy once and simply connect the bot service to multiple channels.
To make it even sweeter, Microsoft created QnA Maker, which can scrape questions and answers from an FAQ URL and instantly create a chat bot knowledge base. This is not mentioning other Cognitive Services which chat bots can easily integrate with such as LUIS and Text Translation.
I wanted to create a chat bot quickly. But after seeing the bot service reference architectures (bottom of the URL), I quickly realized that bots are only easy provided that the data sources are already available. Since I prefer having the database loosely-coupled from the app, this meant that I had to create an extra API layer which queries the DB for the bot service to consume.
Since my objective was to learn bot service itself, and learn it quickly, I did not want to spend too much time on creating a DB and API layer. This led me to the following simple requirements:
- Return RSS results based on topics and sub topics (waterfall conversation steps)
- Display the results in a rich card carousel
- Have multiple QnA topics depending on the conversation step
- Use different chit-chat personalities to the different QnAs.
- Use Facebook Messenger as the initial channel (part of Standard channels, so I can use a free tier bot service for this prototype).
With these simple requirements, I then used ABS-CBN’s public RSS feeds + some Philippine government agencies FAQ sites. Here is the basic flow.
With these requirements and design, I was able to quickly create this chatbot in around 8-12 hours (beginner skills).
Up next: Choices and Decisions (Part 2)