Tête-à-Tête -The ChatBot Creator

Rahul Bajaj
Walmart Global Tech Blog
6 min readDec 10, 2020
Source
Image Source

“I believe that at the end of the century the use of words and general educated opinion will have altered so much that one will be able to speak of machines thinking without expecting to be contradicted.”

~ Alan Turing

Hello World! Growing up, Ironman used to be my favourite superhero(still is) and I couldn’t pass over the vital contribution of JARVIS in saving the world with great Tony Stark. He just had to instruct JARVIS what to do and ….poof…. “Task Completed Mr. Stark” .

Ironman with JARVIS (Image Source)

Wikipedia defines chatbot as:

A chatbot is a software application used to conduct an on-line chat conversation via text or text-to-speech, in lieu of providing direct contact with a live human agent.

From the definition, you must have guessed JARVIS is an MCU (For Non-Millennials MCU is Marvel Cinematic Universe) exaggeration of intelligent chatbots. I know what you are thinking, is it really possible to make such a sophisticated machine? I will answer this in the words of Oscar Wilde -

“Shoot for the moon. Even if you miss, you’ll land among the stars”

The Origin of chatbots dates back to 1960s when ELIZA was developed at MIT. It was followed by PARRY which imitated being a schizophrenia patient. Jabberwacky, Dr. Sbaitso, ALICE, SmarterChild, Siri, Google Now, Cortana so on and so forth have donned different robes to serve us in numerous ways since then.

Today, chatbots are even smarter, can be both proactive and reactive in their approach and can even imitate a real human being(both in intellect and emotions).

Over the past couple of years, chatbots have become remarkably sophisticated negotiators. And these are no mere assertions. As we move, here are some ambitious chatbot usage stats to keep in the back of your mind:

  • Chatbots can cut operational costs by up to 30%.
  • 85% of customer interaction will be handled without human agents by 2021.
  • 50% of businesses plan to spend more on chatbots than on mobile apps.

Why do we need chatbots?

- Case Deflection: Chatbots can answer commonly asked questions resulting in fewer cases getting logged.- Reduced wait times: Customers spend less time waiting in the queue. They get commonly answered questions in a chat window instead of a call, waiting for an email or any other channel.- Saved time for agents: As chatbots are deflecting common questions, agents can spend time in complex issues.- Intelligent responses through NLU (Natural Language Understanding): Using NLU, bots can learn how to respond to customers in humanly way.

Microsoft’s LUIS, Google’s Dialogflow and IBM Watson are some of the other sophisticated chatbot creators available in the market. In the open source domain, RASA is leading the way.

The motive behind tête-à-tête’s creation was to aid the organisations and people, to produce and operate bots, not backed by data science workforce/knowledge. It would facilitate in constructing bots at scale.

Enough blabbering from my end. Tête-à-Tête bot, please continue…..

Tête-à-Tête bot: Hi! I am here to tell you about my creator. Go!
Image Source

The Burning Question

What is Tête-à-Tête?

Tête-à-Tête is Natural Language Understanding Platform which helps to create and optimise AI-powered interactive chatbots. The console will be able to generate the required components in a plug and play manner along with their models for deployment.

“tête-à-tête” literally means a private conversation between two people. The platform will enable to build constant companions for business and personal needs.

What does Tête-à-Tête do?

  • Design a novel architecture/pipeline for intelligent processing and streamlining dataflow in the chatbot creation process.
  • Deliver a tool to build bots seamlessly without having to interact with the back-end architecture.
  • Compare the performance of multiple architectures and suggest the most promising architecture in the tool.

Basic Terminologies

Entity refers to the modifier the user uses to describe their issue, intent is what they really mean. Entity depicts key details in the user’s text such as the location, time, name etc.

Intent refers to the goal that we are trying to achieve through the chatbot. It typically encapsulates a category of tasks to be performed.

Architecture

The platform consists of 3 major components-

1Grip: This component majorly handles Preprocessing pipeline, Entity Extraction, Vectorisation.

Preprocessing includes removing noise, removing stop words, stemming, lemmatisation etc.

Entity Extractor will help in gaining essential information by organising the raw input which will result in understanding of morphological richness of the utterance.

In Vectorisation, input utterances are converted to sequence of word embeddings to be processed by neural network.

2Cody: This component is the decision maker and categorises the utterance to a specific intent.

  • Classification of intent from the vector formed from the phrase including the entities identified
  • Classification of intent from the vector formed from the phrase without including the entities identified
  • Identification of intent based upon the set of entities identified (Unstructured classifier)
  • This component will also identify the final intent from the weighted average from the confidence values of intents predicted from the above classifiers
LSTM cells (Image Source)

Classifier 1, which is a statistical one, will make predictions based upon the set of entities identified.

Classifier 2 & Classifier 3 are RNN(Recurrent Neural Network). Recurrent Neural Networks suffer from short-term memory. If a sequence is long enough, they’ll have a hard time carrying information from earlier time steps to later ones. LSTM have internal mechanisms called gates that can regulate the flow of information. Classifier 2 is fed with the tensor with tokens including entities and Classifier 3 is fed with the tensor without taking into account the entities.

A wrapper voting classifier takes into account the results obtained from these three classifiers and predicts the final intent.

3Action Invoker: Last but not the least, this component actually bring our whims and fancies to life, based upon the intent identified the platform will execute the pre-defined functions/methods. Every intent is mapped to a response or an action to be performed. It may be a single string response or a complex transaction.

Architecture

Everyone is unique and special in their own way. Let me tell my special qualities:

  • Auxiliary data generation using paraphrasing of training samples
  • Plug n Play methodology to include any kind of pre-processor, entity extractor & classifiers which makes it highly customisable and personalisation possible
  • Support for transformers like BERT
  • Special ingestion methods catering to FAQ only bot, eliminating the need to annotate data enabling to take the system up and running in no time
  • Can be used both as a state as well as stateless machine by maintaining context
  • Dynamic layer generation in neural network architecture to avoid curse of dimensionality and also extract complete essence

Summing-up

Chatbots are evolving everyday, opening doors to new dimensions and will come in handy to use cases which we never thought could be automated. There is a huge unused utility potential which organisations are getting familiar with which must be harnessed to make this world a better place.

It’s time to break the loop of this article. This blog talked about the intuitive parts of Tête-à-Tête. In the next article, we will bring the implementation as well as the GitHub repository of the project to help everyone with the code.

Adios!! Amigo (Chatbot on sleep….zzzzz)

References & credits:

https://en.wikipedia.org/wiki/Chatbot

--

--