{"id":47,"date":"2020-02-21T10:47:00","date_gmt":"2020-02-21T02:47:00","guid":{"rendered":"https:\/\/kloudimp.com\/?p=47"},"modified":"2021-05-17T11:44:12","modified_gmt":"2021-05-17T03:44:12","slug":"how-to-build-a-bot","status":"publish","type":"post","link":"https:\/\/www.kloudimp.com\/how-to-build-a-bot\/","title":{"rendered":"How To Build A Bot With The Right Kind Of Tools"},"content":{"rendered":"\n

An Assessment Of Bot Making Options<\/strong><\/h2>\n\n\n\n

In this article, we will explore what exactly do we need to build a Chatbot from a slightly technical perspective.
Warning: There may be sprinkling of technical jargons in this article. As always, Google is always your best friend for further details and illustrated examples.<\/p>\n\n\n\n

Introduction & Objective<\/strong><\/h2>\n\n\n\n

First, a bit about myself. I am a software engineer who started off my career as a web developer.  Over the course of my career I built up skills in ASP.NET, CSS, HTML and JavaScript.  I do both types of development : front-end and server-side integration.  Therefore, my working knowledge with various tools and frameworks could be considered fair.  In the last 10 years or so, I have also experienced shifting development methodologies and trends.  Seen the rise and fall of various development frameworks due to rapid innovation.  Experiencing all that helps me to provide a unique assessment of the tools I have used before.<\/p>\n\n\n\n

Good software developers understand that there is never a tool \/ framework that is a \u201cone-size fits all\u201d.  This is especially true when considering the use case and the projects that we build the solution for.  There are some unique problems that require careful consideration of what to use, and how to use it.  Otherwise, we might end up in a very difficult situation of not being \u201cflexible enough\u201d to scale or grow.  If you are in a leader position, there are also other things to think of, such as available team skill sets, how easy to learn \/ run with the technology, and where to find resources or get help when things get tough.<\/p>\n\n\n\n

We are now stepping into the age of Artificial Intelligence and Machine Learning.  5 out of 10 articles on the techno-sphere are specifically talking about bots.  Or some variation of the word bot \u2013 \u201cintelligent virtual assistants\u201d, \u201cautomating ABC\u201d, \u201csmart XYZ\u201d and how it is revolutionizing industries around the world.<\/p>\n\n\n\n

So, what exactly is involved in building bots?<\/p>\n\n\n\n

How is it different from the normal \u201ccode my business logic\u201d way of software development?<\/p>\n\n\n\n

Bot Building 101 (Technical Edition)<\/strong><\/h2>\n\n\n\n

A bot is hosted on a channel (e.g. Facebook Messenger, Skype, Telegram, Slack).  User types a request to the bot, the bot responds with the right information based on understanding of the request.  Usually the channel forwards the request to a handler which will process what to do next.  Up to this stage, it sounds like a regular Webhook or Web API connection.<\/p>\n\n\n\n

How the bot presents the information back to the user is using bot components.  Bot components are very much like the UI aspect of a conversation: text, images, audio, buttons.  Note that each channel provides a different set of components and options through their platform APIs.  From a web development perspective, it sounds just like a server request \/ response.  However, it is the expectations of what bots are supposed to be able to do that catch many software developers off guard.  (Hint:  It is more than \u201cjust presenting information\u201d back to the user)<\/p>\n\n\n\n

In fact, the tricky part here is that often the user\u2019s request is expressed in human language.  The developer has to learn to deal with this apart from standard server formats (e.g JSON \/ any schema based request).  And here is the other part of the bot equation: Artificial Intelligence (e.g \u201chow it understands the request\u201d, or Natural Language Processing \u2013 NLP).  The \u201cbrain\u201d of the bot does not just contain business logic, but also a (few) model(s) of \u201cintelligence\u201d of the bot.  Basic terminologies used in NLP \u2013 Intents, Entities, Session & Context<\/a> is necessary to get things going if you intend to use one.<\/p>\n\n\n\n

(Off-Topic : If you intend to invest a lot more time on the topic of AI, I would suggest to read  what is the difference between Artificial Intelligence, Machine Learning & Deep Learning<\/a> first)<\/p>\n\n\n\n

Soft Skills You Might Need<\/strong><\/h2>\n\n\n\n