LogoLogo YellowLogo Light

The Non-Coder’s Guide to Chatbots

The Non-Coder’s Guide to Chatbots

Every chatbot developer, as part of his or her learning process, will eventually write some tutorials and I am certainly no exception to that. I’m aware that already dozens of tutorials are out there and yet I’m here to write another one because I believe I can explain some aspects better than most of the articles I’ve seen.

Becoming Chatty

Chatbots have come a long way in the past few years and you probably know that since you are reading this. Brands have been using chatbots to engage their customers because competing for space on your phone is really hard as most of the apps that get downloaded are hardly used once. These bots help us to hide the service layers behind the plain English conversational layers so that we no longer have to fiddle our way with clunky apps to book a cab or order a pizza. Everyone has understood the convenience afforded by bots that can schedule a meeting or book a restaurant.

Most of the value of deep learning today is in narrow domains where you can get a lot of data. Here's one example of something it cannot do: have a meaningful conversation. There are demos, and if you cherry-pick the conversation, it looks like it's having a meaningful conversation, but if you actually try it yourself, it quickly goes off the rails.

-Andrew NG, American Businessman
Deep Dive into Bots:

Since these chatbots live inside your chat application, there is no need to download anything which is win-win for everyone.

Retrieval Based Chatbots:

Earlier chatbots relied on rule-based approach and had the hard-coded response. Smart programmers like you would try to predict everything a user could say and build a huge list of responses to every question you can think of.This has not changed much even after the advancements in deep learning, we still have to predict the entire conversational flow in advance and build a repository of pre-defined responses, but this effort can hugely be reduced with the help of machine learning. We can identify the intent behind the query using a simple classifier so that it puts together two questions with the same intent even if worded differently and can have a similar response to it.

Generative Chatbots:

Deep learning is making new discoveries every day and is changing the tech rapidly. These models don’t rely on hard-coded responses, instead generate them from the scratch. Since it requires a huge amount of data, it comes with its own inefficiencies like making grammatical errors, irrelevant or inconsistent responses. I don’t see them being deployed in any of the production systems yet. They don’t seem to work in practice and business will not risk their customers with chatbots that have so much freedom to respond back. Most of the value of deep learning today is in narrow domains where you can get a lot of data. Here’s one example of something it cannot do: have a meaningful conversation.

Understanding language is the holy grail of machine learning.

-John Giannandrea, Software Engineer
Chatbot’s Anatomy

Understanding language is the holy grail of machine learning. — John Giannandrea. There are two big components of an intelligent chatbot.

NLU Engine:

This piece works on understanding the true meaning of the sentence which can be inferred using various techniques like classifying the intent (using Sklearn, TensorFlow etc), identifying the important entities (using NER libs like Spacy, CoreNLP etc), finding the sentiment and storing the context in a variable and looping that in the conversation.
NLU still struggles with identifying the true meaning of the sentence but these statistical components when put together helps us in closing the gap and is the best we have today.

Rasa NLU:

This framework allows us to classify the intent and identify the entities by also giving the flexibility to use different libraries for classification and named entity recognition tasks.

Dialogue Management:

After understanding what the user had to say, this module’s main function is to find a response. These bots mimic the human-human interactions and this is where it starts getting complicated.
The Dialogue manager is responsible for preserving the state of the chat history and in turn maintaining the flow of the conversation.

Rasa Core:

Guides conversations, taking the history and external context of a conversation into account. Instead of thousands of rules, Rasa picks up patterns from real conversations.

Botkit:

This lets you define your own stories using different rules. No Machine learning is used in defining the flow of conversation.

Dialogue Flow

There are two types of dialogue when building the conversational scenarios.

Linear Dialogue

This is similar to a question/answer model. The aim of this dialogue is to collect the necessary information to complete the task. This is also termed as slot filling as we need mandatory entities to be filled before proceeding to the next step.

For example, while creating a bot to book a movie ticket. We need to know few necessary information before booking the ticket like Name of the Movie and Show Timings. The bot will keep asking the required questions to fill this information and it has to be smart enough to pick the correct entity for the respective slot.

Non Linear Dialogue

A non-linear dialogue depends entirely on the user’s response and can have several branches which allow the conversation to take different paths during its flow. This type of dialogue seems more humanly and hence can get more messy and complicated if not handled properly.

Chatbot Jargons:

Agents:

Chatbots, also called Conversational Agents or Dialogue System are best described as NLU modules combined with a dialogue manager.

Intent / Interactions:

Intent represents a mapping between what a user says and what action should be taken by your software. These are pre-defined components of the bot that defines the user’s request and categorize them to take appropriate action.

Entities:

Any important data or parameter required from the user’s request to proceed further is termed as an entity. State of the art NER systems can be used to extract these entities from a sentence.

Slot Filling:

Some entities which are mandatory, are termed as slot and the process of slot filling is to constantly prompt user until these slots are filled.

Contexts:

Contexts represent the current context of a user’s request. This is helpful for differentiating phrases which may be vague or have different meanings depending on the user’s preferences, geographic location, the current page in an app, or the topic of conversation. For example, if a user is listening to music and finds a band that catches their interest, they might say something like: “I want to hear more of them”. As a developer, you can include the name of the band in the context with the request, so that the agent can use it in other intents.

FallBack:

When the user request does not belong to any of the mentioned intents, we can have a set of responses like I didnt understand, I dont quite know what that means etc.

Actions:

After finding the intent of the request and filling all the necessary slots, the bot might need to perform a particular action supposedly a cloud/lambda function connecting to a third party plugin.

Web Integration

Once your chatbot is up and ready to face the humans, its time to integrate it with some of the leading chatbot platforms. Most of the bot frameworks come with their own plugin to make the integration seamless. Platforms like Telegram, Messenger, Google Assistant opens up new opportunities by showcasing your products and services to the vast audience it holds and in turn grow your business.

Chatbot Etiquette

One of the most challenging parts about designing a chatbot is to make the conversation flow as natural and efficient as possible and not how to classify intents, identify entities, generate rich responses, or to do some jazzy technical integrations. It is not technically difficult to build a bot but it is a matter of rich user experience and wanting your user to come back to you. A great design should focus less on what the chatbot has to say and more about what the user has to say.

Don’t try too hard to quickly fill your slots by asking direct questions, as that may sound too commanding and boring and might shove away the user. If handled properly, most of the questions do not need an answer in the first place if you have sufficient information about the user. Another way is to store the user’s context and carry it along the conversation which is handy in case of any doubts.

If it’s necessary to ask a question, try asking it in different ways and take due care that you don’t ask a question which the user has already answered which usually happens if the entity recognition fails. (More Training!!) Repetition of a bot’s response should be avoided at any cost even when responding in different sessions altogether. The best approach is to have a bunch of pre-configured responses for the same utterance and then randomly picking responses while replying back.

User loves when their bots have a sense of humor and capable of cracking a joke based on the context. This can get tricky as not everyone enjoys witty replies, so use this with precaution and is advisable only if you have a sentiment analyzer to predict your user’s mood. Giving a name and a personality to your bot is important to personify the bot. Chatbot users usually have few personal questions they would like to ask, and your bot should better be ready for them.

40 Comments

  • Lynnea Ashton Acacia

    November 13, 2020

    Every weekend i used to pay a visit this web site, as i want enjoyment, as this this web page conations actually good funny material too.

  • Kessia Malchy Maddy

    November 13, 2020

    I really enjoy studying on this web site, it has excellent blog posts. “Never fight an inanimate object.” by P. J. O’Rourke. Kessia Malchy Maddy

  • Jobyna Ellsworth Xena

    November 14, 2020

    Just wanna input that you have a very nice web site , I love the style and design it actually stands out. Jobyna Ellsworth Xena

    • Isha Sharma

      January 19, 2021

      Thank you 🙂

  • Marie-Ann Dougy Maegan

    November 22, 2020

    Praying for you and thanking you for your continued writing that blesses the reader. The Lord is using you in a mighty way. Marie-Ann Dougy Maegan

  • Valencia Tracie Heurlin

    November 23, 2020

    Respect to article author, some fantastic entropy.

  • Christie Trenton Spiro

    November 29, 2020

    Great post. I will be dealing with a few of these issues as well..

  • Demeter Luciano Maybelle

    November 30, 2020

    These are genuinely wonderful ideas in regarding blogging.

  • Gavrielle Sterling Joice

    November 30, 2020

    Thanks really helpful. Will certainly share website with my pals.

  • Hortense Rice Sheelagh

    December 1, 2020

    There is noticeably a package to understand about this. I assume you made sure nice factors in attributes additionally.

  • Shirleen Francisco Tengdin

    December 3, 2020

    Muchos Gracias for your blog article. Thanks Again. Fantastic.

  • Ofilia Lionel Gilberto

    December 4, 2020

    Hi there Dear, are you in fact visiting this site on a regular basis, if so afterward you will definitely get good knowledge

  • Carmelia Karoly Silvia

    December 9, 2020

    Tekken, Mortal Kombat, MMA. then PC is the way to go. Carmelia Karoly Silvia

  • Carline Abie Tufts

    December 9, 2020

    You completed several fine points there. I did a search on the topic and found a good number of folks will consent with your blog. Carline Abie Tufts

  • Emma Lannie Andrien

    December 9, 2020

    Hi! I simply wish to offer you a huge thumbs up for the great info you have got right here on this post. I am coming back to your blog for more soon.

  • Juliette Alfred Manda

    January 12, 2021

    Good post! We will be linking to this great article on our website. Keep up the good writing.

  • Emmey Abby Sommer

    January 13, 2021

    Im obliged for the blog article. Really looking forward to read more. Cool.

  • Ivy Dame Lurline

    January 13, 2021

    I admire your piece of work, thankyou for all the great articles .

  • Gilly Marvin Bunns

    January 14, 2021

    Great article! We are linking to this particularly great post on our website.

  • Cissiee Delmer Grimaldi

    January 17, 2021

    I delight in the knowledge on your web site. With thanks.

  • filmi full izle

    January 17, 2021

    Way cool! Some extremely valid points! I appreciate you writing this article and the rest of the site is extremely good. Danna Randolph Gerger

  • Meara Homerus Amelie

    January 18, 2021

    Good article! We will be linking to this great article on our website. Keep up the good writing.

  • Fredelia Patricio Maynord

    January 18, 2021

    Please stop by the internet sites we comply with, like this one, as it represents our picks in the web.

  • altyazili

    January 29, 2021

    Excellent post! We are linking to this great content on our website. Keep up the good writing. Arielle Siffre Barolet

  • Emmye Oswell Elfie

    January 30, 2021

    Congratulations! Glad you got this working. I will be happy to give you advice on how you can do better. It is my gift to you. Love you.

  • Noella Barry Darlene

    January 30, 2021

    I have been reading out a few of your stories and i must say pretty nice stuff. I will surely bookmark your website.

  • Micki Sawyer Eliot

    January 30, 2021

    CommentThis is so awesome!!! My stories may not be intriguing but just getting a chance to tell it is something gratifying. Thank you.

  • Vida Salvidor Joli

    January 30, 2021

    Congratulations! You are a rockstar. I have had a Pinterest addiction long before becoming a blogger haha. Sounds like an amazing adventure for you, congrats again!

  • Tiffy Portie Constantia

    January 31, 2021

    Having read this I thought it was really enlightening. I appreciate you spending some time and energy to put this short article together. I once again find myself personally spending a significant amount of time both reading and posting comments. But so what, it was still worth it!

  • CBD for sale

    February 27, 2021

    I was able to find good information from your blog articles.

    Also visit my webpage – CBD for sale

  • cbd sleep

    March 1, 2021

    Great blog right here! Additionally your website loads up very
    fast! What web host are you the use of? Can I am getting your
    associate link in your host? I wish my web site loaded up as fast as
    yours lol

  • CBD gummies for

    March 1, 2021

    Appreciate this post. Let me try it out.

  • JonieHNamm

    March 2, 2021

    I am just actually glad to glance at this website posts which carries tons of useful facts, thank you for providing such information.

    my web site – JonieHNamm

  • tera worley

    March 2, 2021

    Very nice post. I just stumbled upon your weblog and wished to say that I’ve truly
    enjoyed surfing around your blog posts. In any case I will be subscribing to your
    feed and I hope you write again very soon!

  • Norma

    March 15, 2021

    Very shortly this website will be famous amid all blogging
    and site-building people, due to it’s nice articles

  • Jeannette

    March 15, 2021

    This blog was… how do you say it? Relevant!!

    Finally I have found something that helped me.
    Thanks a lot!

  • sanayi blogu

    March 21, 2021

    This information is worth everyone’s attention. When can I find out more?

  • HydraLyft website

    March 31, 2021

    Hello there! This blog post couldn’t be written much better!
    Going through this article reminds me of my previous roommate!
    He continually kept talking about this. I most certainly will
    forward this article to him. Fairly certain he will have a good
    read. Thanks for sharing!

  • Flor

    April 3, 2021

    I feel this is among the most vital info for me.
    And i’m happy studying your article. However want to remark on some basic things, The web site style is great, the articles is in point of fact excellent : D.

    Good activity, cheers

  • buy tiktok followers

    July 6, 2021

    Great, thanks for sharing this article post.Really looking forward to read more. Keep writing.

Leave A Reply

  • 7154, Rue Alexandra, Montreal,Quebec, Canada, H2S 3J6
  • contact@brewingtechs.com
  • +1 (438) 526-6007