Let's talk Chatbot...One that serves Biriani!
Last week was my week off. Besides spending quality time with my wife and son, I wanted to learn something new. Chatbot development is something I've been keen to learn. To make this learning fun, I wanted to build a bot that'd give me info about something that's really important to me - Biriani!
After reading few articles, I noted down the following key points for bot development:
- Scope/Intent/Purpose: This is the starting point. For my case, I wanted a bot to answer specific questions about Biriani and be able to handle small-talk.
- Tone: This ties to small-talk. There's a good reason why all major players have included small-talk (aka chit-chat functionality) to their bots. "What's the meaning of life", "What is love" and plenty of other questions we humans reserve solely to ask (sometimes confess to) chatbots. "Tone" is the way your chatbot would respond to generic questions other than the specific ones.
- Flow: The conversational flow is the meat of any good chatbot design. To mimic a human response as close as possible, the chatbot needs to understand the context of a question and tie it down to any previous dialogues, if applicable.
- Fallback/Error-handling:
Being in the very early days of chatbot, it's difficult to avoid awkward responses like the one above. However, over time, chatbots can be trained to handle unknown questions gracefully.
5. Platform (unless you're doing it from scratch): If you are building one from scratch, please go ahead and I would like to hear your experience. My choice, however, was to use one of many powerful platforms to build a FAQ-type chatbot.
To be honest, choosing the correct platform was the hardest part of this venture. One reason for that is there are so many powerful platforms DialogFlow, ChatFuel, IBM Watson and many more. Most of them can accommodate complex conversational flows which I actually don't need for my bot. For ease of design, I want my bot to answer single un-related questions; sort of a dialogue-version of an FAQ page. For this reason, I chose Microsoft Bot Framework which includes QnA Maker - a cloud-based API service to create a knowledge-base(KB) from semi-structured content such as Frequently Asked Question (FAQ).
To get started, I needed an active Azure subscription (link to free Azure subscription). I followed this article to create a knowledge-base (KB) using Microsoft QnA Maker and added the KB to Azure Bot Service. I had three personalities to choose from for adding chit-chat service to the KB. If it's not obvious from the video, I chose 'The Comic" ??) . In addition to a TSV file, I manually tweaked the KB which are marked as "Editorial Changes". Once tested and published, I was able to test the REST endpoint of my KB using Postman.
The cognitive capability of Azure can be observed here where a mis-spelling of the word 'recipe' is handled and the endpoint still returned the expected response. When I published my knowledge base, the question and answer contents moved from the test index to a production index in Azure search. This is one key reason for building a bot using a platform - access to powerful cognitive capability out of the box!
Once I connected my KB to Azure Web App Bot, I could use built-in Web Chat to test my bot but there is a number of other integration channels. That's it ?! My very own Biriani-Bot ?? is ready to serve ??
Image Reference: this link
Disclaimer: All opinions expressed in this article belong solely to the author.
Power System Engineering Analyst @ IESO
5 年Biriani bot