JavaScript Required

We're sorry, but we doesn't work properly without JavaScript enabled.

Looking for an Expert Development Team? Take two weeks Trial! Try Now

Chatbot – Building and Testing - Part I

Chatbot

With a growing number of web and mobile apps in the market, in the recent past, written language and speech are rapidly becoming the popular user interface of the current trend and future. We are already seeing voice assistants (like Alexa, Siri, Google Assistant) or textual chatbots (like Duolingo, Hipmunk, TechCrunch) are influencing the technology and the way people are using in real life. Some are even thinking of that bots might even kill web and mobile apps because of cost efficiency, performance, speed and increase in artificial intelligence.

In this series of articles, we would like to share our learnings with challenges of building and testing a chatbot in a short amount of time. We also like to share some sensible practices, testing strategies, different types of testing to do in different layers in building the quality and valuable chatbot for any business.

Before we go deeper on testing the chatbots, let’s look and understand the essence of chatbots on following

  • What is bot or chatbot?
  • Why we need a chatbot?
  • Types of chatbots available in the market based on evolution
  • Classification on chatbots based on usage
  • How does Chatbot works?
  • Where chatbot is used?
  • Companies providing chatbot solutions/services

Ready? Let’s go.

What is bot or chatbot?

  • A Chatbot is a program that simulates a natural human conversation. Users communicate with a chatbot like how they would talk to a real person.
  • Chatbots interpret and process user’s words or phrases and provides an immediate pre-set answer or use AI techniques to answer.
  • They occupy platforms like – FB Messenger, Whatsapp, Skype, Slack, Line, Kik, Wechat or even your website.

Why we need a chatbot?

  • Intelligently address customer needs
  • Reduce customer leaving rate
  • Enhance overall customer experience
  • Increase engagement with the brand
  • Reduce repetitive customer calls
  • Increase response time of queries
  • Cost-efficient and time-efficient

Types of chatbots available in the market based on evolution

  • Rule-based/Menu/Buttons/Scripted/Quick Reply/Action Chatbots
  • Keyword Recognition/Intellectually independent Chatbots
  • Contextual/ AI- powered chatbots
  • Voice-Enabled Chatbots

Rule-based/Menu/Buttons/Scripted/Quick Reply Chatbots

  • People collaborate with these bots by clicking on buttons and using pre-defined options.
  • To provide relevant answers these chatbots need individuals to make a few selections based on the options displayed.
  • As a result, these bots are the slowest to guide the customer to their goal.
Chatbot

Keyword Recognition/Intellectually independent Chatbots

  • Keyword recognition-based chatbots can able to listen to what users type and respond accordingly.
  • These chatbots apply customizable keywords and AI to determine how to deliver a devoted response to the user.

Contextual/ AI- powered chatbots

  • Contextual chatbots are the most leading kind of conversational bots because they take advantage of Machine Learning and Artificial Intelligence to remember conversations that happened in the past, for specific users and try to learn and grow over time to improve themselves.
  • These chatbots learn with their real involvement with the user. Some of the examples of contextual chatbots are Siri, Alexa, Google, etc.
Chatbot

Voice-Enabled Chatbots

  • Voice-enabled chatbots build a personalized experience for the users.
  • These chatbots accept user inputs through voice and answer their queries.
  • Businesses can able to create their voice-enabled chatbot by using text-to-speech (TTS) and voice recognition APIs.
Chatbot

Classification on chatbots based on usage

  • Personal Chatbots
  • Team Chatbots
  • Domain/Brand-Specific Chatbots

Personal Chatbots

Personal chatbots provide direct communication between an individual user and the bot. E.g.: Weather Bot

Team Chatbots

Team chatbots are used when multiple users are involved in the communication process. E.g.: Slack

Domain/Brand-Specific Chatbots

Domain/Brand Chatbots are preferred when the companies service needs to go deeper into detail to serve customers like notification on discounts, relevant search on location, price, etc. E.g. Airbnb, MedWhat

How does Chatbot works?

Chatbots work based on three classification methods:

  • Pattern Matches
  • Natural Language Understanding (NLU)
  • Natural Language Processing (NLP)

Pattern Matches

  • Chatbots make use of pattern matches to organize the text and it produces an appropriate response from the clients.
  • Artificial Intelligence Markup Language (AIML), is the standard model of these Patterns.
  • Chatbots behave to anything relating it to the correlate patterns.

Natural Language Processing (NLP)

  • NLP or Natural Language Processing is a cover term used to describe the following
    • Machine ability to process what is said to it
    • Break down into multiple parts
    • Understand its meaning
    • Find the correct action
    • Respond in a language the end-user will understand

Natural Language Understanding (NLU)

  • NLU or Natural Language Understanding is a subgroup of NLP that approach with how to handle unstructured inputs from users like mispronunciations, swapped words, contractions, colloquialisms, etc. to convert and organize into structured inputs so that machine can able to understand and determine.

Natural Language Generation (NLG)

NLG or Natural Language Generation is used to turn structured data into text.

Chatbot

Let’s see an example to understand the chatbot architecture.

Imagine you are going to buy a watch in the showroom. What are the questions that will come to your mind? Watch brand? Size? Price? Type? So, based on your needs you will process the search and buy in real-time. Chatbot follows the same process behind the scene lets walk through step by step to understand in detail.

  • You find a product on Amazon Alexa platform and let’s say it’s Watch. You will be using the presentation layer of Amazon Alexa chatbot and whatever inputs given by you will be transferred to the backend API layer to process to next layer.
  • Natural Language Processing converts text to structured data i.e. to coded commands so that the next decision engine layer will understand and process.
  • Now the decision engine loop will think to exit the conversation loop to meet certain criteria because it needs more information like what brand watch, Size, Price, etc.
  • Then this array of response will go to the backend API and will be shown as a question to the user in the presentation layer.
  • Now the user will again give the specific values for the watch he wants to buy.
  • Again, the data will go back through NLP into the decision engine and this time bot will analyze data given by user to find watch is available in stock with the store and also gives back the available of watches in the stores nearby.
  • Once choose the product which you want then you will be directed to the payment page and places the order for you.

One of the biggest challenges chatbot industry facings is in understanding the conversation with empathy. As like humans, conversational tones will not be able to understand by chatbot because it is still a bot. But the industry is working towards it, sooner chatbot will able to respond with feelings.

Where chatbot is used?

  • E-commerce and online marketing
  • Travel, hospitality, and tourism
  • Healthcare
  • Banking and finance
  • Customer service
  • Education & Learning

Let’s look at how chatbot helping in each of the above industries in detail

E-commerce and online marketing:

  • Substituting for emails
  • Managing sales funnels
  • Adding interactivity 
  • Building customer relationships on a more personal level 

Travel, hospitality, and tourism

Healthcare

  • Support self-care and self-monitoring 
  • Offer reliable medical information
  • Get important information from new patients
  • Perform automated appointment follow-ups 

Banking and finance

  • Account alerts and notifications
  • Tips and suggestions on financial management
  • Help with enterprise resource management

Customer service

  • Automating frequently asked questions
  • Differentiating between questions the chatbot can answer and questions that should be referred to a real person

Education & Learning

  • Intelligent, instant teaching and training models
  • Agile adaptation to the user's ability

Companies providing chatbot solutions/services

Chatbot
  • IBM – IBM Watson
  • Microsoft - Bot Framework
  • Facebook - Wit.ai
  • Google – Dialogflow
  • Amazon – Lex
  • AI

In the next part of the article, we will look into how the chatbots are build using Amazon Lex and technologies, skills needed to develop a chatbot and also how to test the Chabot from functional perspective through manual testing.

You can also read

NSS Note

Some of our clients

team