Chatbot – Building and Testing – Part I

testing

Chatbot – Building and Testing – Part I

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 (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 strategy, 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

  1. What is bot or chatbot?
  2. Why we need a chatbot?
  3. Types of chatbots available in the market based on evolution
  4. Classification on chatbots based on usage
  5. How does Chatbot works?
  6. Where chatbot is used?
  7. 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.
A screenshot of a cell phone

Description automatically generated

Keyword Recognition/Intellectually independent Chatbots

  • keyword recognition-based chatbots can able to listen to what users type and provide the response accordingly.
  • These chatbots apply customizable keywords and AI to determine how to deliver a devote 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.
A screenshot of a cell phone

Description automatically generated

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.
A screenshot of a cell phone

Description automatically generated
  1. Classification on chatbots based on usage

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 server 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.
A close up of a map

Description automatically generated

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.

  1. You find a product on Amazon Alexa platform and let’s say its 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.
  2. Natural Language Processing converts text to structured data i.e. to coded commands so that the next decision engine layer will understand and process.
  3. 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.
  4. 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.
  5. Now the user will again give the specific values for the watch he wants to buy.
  6. 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.
  7. 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

  • Engage audiences 
  • Anticipate user needs
  • Give recommendations on nearby locations
  • Offer automated services
  • 24/7 customer service

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

  • IBM – IBM Watson
  • Microsoft – Bot Framework
  • Facebook – Wit.ai
  • Google – Dialogflow
  • Amazon – Lex
  • Recast.AI
A picture containing drawing

Description automatically generated

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.

Comment (1)

  1. Balaramesh

    Very useful article about chatbot building and testing.

    August 23, 2020 at 6:57 am
    |Reply

Leave your thought here

Your email address will not be published. Required fields are marked *