How to Make a ChatBot Smarter

Chat Bot Intelligence – Current State

A simple chat bot can answer simple queries about – “How is the weather?”, “How are you feeling today”, “Where is the stock market today?” and so on. In most cases, the backend software in the Bot is doing a simple look-up in a database, comparing it with the user utterance and giving a reply.

In some cases, where the Bot is unable to find a match then it simply says – “Sorry, I am unable to understand it”, or something similar. If we target to build a complex Bot that can answer far more questions perhaps everything in the world, then it becomes an impossible task (for now). To achieve such a scale and reduce complexity we will need to process all the information in the world and do a real-time comparison with the user utterance to come up with the best answer.

In the search engine world, this is how it is done; a user search query is compared to all the available documents and the best document is surfaced to the top. Users are used to typing simple keywords and if we base the technology to build a Bot on such model then this is how the conversation would look like

Even if the top results are used to read out the actual results, from a human perspective it does not make a good conversation since summarization of the results would still result in a complex answer to a simple human gesture.

Pure search engine based chat mechanisms are not that effective. The other mechanism is to craft standard replies to a large number of questions and put -those in some database. This method even though effective is similar to Interactive Voice Response (IVR) systems that lack human touch and remotely resemble normal human interaction.

Human touch is achieved when simple social skills are introduced in a Bot.

Do Smooth Social Skills Provide Human Touch?

Adding simple chit-chat abilities to a bot might give some semblance of human interaction but the real intelligence is not captured by mere chit chat. In general, humans value intelligence where a nuanced interaction results in some mutually beneficial useful action.

In short, it is good to have the ability in a Bot to do small talk but it is not sufficient.

Language Grammar to the Rescue

In order to do better than smalltalk, it is important to understand language grammar, and use it to do better dialog management. Humans use language in a very nuanced way to convey relationships between the entities. Various Natural Language Processing (NLP) techniques such as Constituency parsing, Dependency parsing, Coreference resolution etc. give a  good understanding of the entities user is interested in and the action that user wants to take. Some simpler entities can be extracted using regular expressions too.

In the above example of Spacy’s Dependency parser, extracting only the verbs and the nouns gives a good indication of what the user wants

Action (Intent) – buying

Entities – a pair, jeans

A simple classifier that takes this information can build a large number of intents and the entities that the intent can operate upon. Does a large collection of intents along with the entities that it operates upon sufficient to answer user queries?

The answer is still a firm ‘No’. There are other problems that still need answers such as  how to craft dynamic replies, how to identify complex sentences, if the information provided by the user is not sufficient then how to elicit the required information from the user and so on.

The real value comes from building a conversational flow model based on initial user intent and using a variety of algorithmic techniques as shown in the next few sections.

Context and Human Brain

As per Christoph Koch from Allen Institute of Brain, recent research indicates that higher intelligence (in any species including Humans) is a side product of more connectivity between various neural regions of the brain. Going by the same result, if context can be intertwined even more effectively into more complex slot-filling algorithms then it will indicate a higher bot intelligence.

As elementary school students, we learn various sentences and grammar. We learn how to create simple sentences and convey our thoughts using some templates of commonly used sentences that can be used in responding to a well known query. For example –

Q: “How much did this <product> cost?”

A: “The price of this product is <price>”

This is a very simple mechanism which can be overloaded with more complex information retrieved from a context that “knows” about the entity that is being queried and the specific “entity” relationship that is being queried (we call this piece of code a  ‘Botlet’ at Linc)

For example, in actual code, this might look like this:

How to Make a Bot Smart-2

In a more complex scenario, where a user is engaging in a dialog a more sophisticated slot-filling can be employed to ask user appropriate questions as per the requirements of a slot and the current user intent while maintaining a good conversation flow.

Slot-filling is a very common methodology in asking the correct questions. If slot-filling is combined with some randomness within a given range of sentences then it gives a semblance of intelligence.

While slot-filling is useful in identifying the questions that the Bot can ask, a component in the Bot needs to track the  ‘Conversation flow’ too, as it indicates that a conversation topic has changed and establish some ground rules on how the Bot should respond to it.

Context and Chat Bot – How to Intertwine them?

Identifying the right intent for the initial user question and then accessing the relevant context for the user to generate a sensible reply is the crux of building an intelligent chatbot.

Context can contain information about the entities extracted, past and current user behavior and sentiment, merchant level metrics and so on. A user can have hundreds of interesting context keys that are associated with him/her, and choosing the right context can become tricky.

For example, if the user has a question about finding the right product for a given category, the problem can then be divided up into these general areas

  1. Identify user intent
  2. Extract any relevant entities from user utterance (e.g. product attributes such as color, size etc.)
  3. Search and identify the historical and current context of the user
  4. Search and identify the correct Botlet that can answer the user intent
  5. Use some kind of slot-filling mechanism that also understands the specific attribute the user is querying about, and then does a product search (as in the example below)

How to make bots smarter with code

Can we build this in software?

The real challenge in building a chatbot is taking all the above problems and creating a workflow that resonates well with an end user. Having a ready cache of user context that can answer and intent is half of the solution. The other half relates to creating a workflow that is specific for a use case (in Linc’s case it is eCommerce). Simple workflows per use case are best handled by the experts in the area and providing simple tools for these experts is more important than creating all the possible use cases yourself. To give an example, in the case of HTML language, providing the HTML constructs and parser is sufficient as developers can use the provided tools to build their custom web pages.

Similarly, for Bots, individual small pieces of code (Botlets) that have been abstracted out for being common across various use cases and identifiable using an id are sufficient for real experts to develop bot dialog flows.

Intelligence is achieved by providing a high level of interconnectivity between context items and Botlets. Botlets are basically a syntax for creating user dialog flow (see the earlier example of price) and a domain expert can provide them.

As identified in the earlier problem decomposition, to summarize, in order to build an intelligent, generalized and scalable bot, the components below are required

  1. Intent Classification – use a classification mechanism based on known services for the domain and the various sentences / phrases / words that fall under the various services (a Service Map). This provides an entry point for any dialog.
  2. A Context Building Mechanism – how will you get user data? Which context values are important for given use cases?
  3. An Entity Extraction Mechanism
  4. A Tool for Writing Bot Questions and Answers (Dialog flow or Botlets) – A domain expert can provide the inputs but the tool needs the capability to appropriately mix it with context.
  5. A Search mechanism that can take user intent, identify the specific Bot Question/Answer, and the context that goes along with it.

Future Directions

Combining user context into meaningful sentences which can either be questions or answers to user questions is an area of research that will provide more meaningful answers to users.

Slot-filling can be combined with Long Short-Term Memory (LSTM) based Neural architectures to provide deeper and thoughtful answers to users which can also include some personalization using contextual data.

Learn more about Oracle AI and Digital Assistants

About Sameer Yami

Sameer is the Head of Architecture and AI at Linc Global. He is responsible for crafting the ‘smarts’ as well as scaling the AI of Linc’s Botlet Platform. He previously founded WikiSeer – a text summarization and semantic advertising company, and also worked in various senior engineering leadership roles at Ampush, Toshiba and Sun Microsystems/Netscape. Sameer has received multiple ‘Top Inventor’ awards and has filed over 30 patents of which 6 have been granted.”

Follow Sameer Yami: TwitterLinkedIn

Link to Original Post on the Oracle Blog

Subscribe to Linc Insights.

Stay updated on the latest in AI Automated Customer Assistance Software.


Insights for the Customer Experience.

Prioritize Customer Support to Navigate the Recovery

Prioritize Customer Support to Navigate the Recovery

Your CX Playbook: How to Build An Automation-First CX Strategy

Your CX Playbook: How to Build An Automation-First CX Strategy

Stimulate Buying When We Start Coming Out Of This

Stimulate Buying When We Start Coming Out Of This

Be More Responsive and Protect Your Brand In These Trying Times

Be More Responsive and Protect Your Brand In These Trying Times

eTail 2020 Highlights – Direct Customer Conversations Drive High Organic Revenue Growth

eTail 2020 Highlights – Direct Customer Conversations Drive High Organic Revenue Growth

How AI Makes Your Human Agents More Efficient

How AI Makes Your Human Agents More Efficient

Bespoke Customer Experience – Customization Doesn’t Involve Reinventing The Wheel

Bespoke Customer Experience – Customization Doesn’t Involve Reinventing The Wheel

2020 Customer Experience Trends – Privacy Will Get Real

2020 Customer Experience Trends – Privacy Will Get Real

The Quality of AI Will Make Or Break Brands This Year – 2020 Trends

The Quality of AI Will Make Or Break Brands This Year – 2020 Trends

2020 Trends in Customer Experience – Both Free and Fast Matter

2020 Trends in Customer Experience – Both Free and Fast Matter

2020 Trends in Customer Experience- Two-Way Conversations Flourish

2020 Trends in Customer Experience- Two-Way Conversations Flourish

Why conversational commerce is a must-have after this holiday season

Why conversational commerce is a must-have after this holiday season

2019 Conversational AI Recap

2019 Conversational AI Recap

New Feature: FAQ Curator for Conversational AI and Post-Purchase Engagement

New Feature: FAQ Curator for Conversational AI and Post-Purchase Engagement

5 Reasons Why Retailers Should Optimize For Live Chat

5 Reasons Why Retailers Should Optimize For Live Chat

2020 Trends in Customer Experience- Two-Way Conversations Flourish

2020 Trends in Customer Experience- Two-Way Conversations Flourish

2020 Trends in Customer Experience- Service is the Secret Sauce

2020 Trends in Customer Experience- Service is the Secret Sauce

2019 Holiday Survival Tips For Retailer’s: Automate Predictive Intelligence To Drive

2019 Holiday Survival Tips For Retailer’s: Automate Predictive Intelligence To Drive

2019 Holiday Survival Tips For Retailer’s – Spotlight loyalty club holiday perks

2019 Holiday Survival Tips For Retailer’s – Spotlight loyalty club holiday perks

2019 Holiday Survival Kit: Use Holiday Service as a Loyalty Builder

2019 Holiday Survival Kit: Use Holiday Service as a Loyalty Builder

How To Choose a Live Chat Vendor

How To Choose a Live Chat Vendor

2019 Holiday Survival Kit: Perfect Blended Human/AI Capabilities

2019 Holiday Survival Kit: Perfect Blended Human/AI Capabilities

2019 Holiday Survival Tips: Practice Omnichannel Transitions for Stellar Customer Experience

2019 Holiday Survival Tips: Practice Omnichannel Transitions for Stellar Customer Experience

2019 Holiday Planning | Content Preparation

2019 Holiday Planning | Content Preparation

2019 Holiday Prep Survival Kit

2019 Holiday Prep Survival Kit

Your Data Won’t Get Results Without Context

Your Data Won’t Get Results Without Context

Best Practices for Setting up a Referral Marketing Program

Best Practices for Setting up a Referral Marketing Program

How to Evaluate an Automated Shopper Assistance Platform

How to Evaluate an Automated Shopper Assistance Platform

Automated Shopper Assistance: What It Is and What It Means for Retailers

Automated Shopper Assistance: What It Is and What It Means for Retailers

Multi-Channel Customer Journeys Are The New Reality

Multi-Channel Customer Journeys Are The New Reality

Best Practices for Increasing Shopper Opt-In Rates

Best Practices for Increasing Shopper Opt-In Rates

The Role of Artificial Intelligence (AI) in Reshaping the Customer Experience

The Role of Artificial Intelligence (AI) in Reshaping the Customer Experience

Building Your Conversational Commerce Technology Stack

Building Your Conversational Commerce Technology Stack

New Feature Alert: Intelligent Promotion Botlet

New Feature Alert: Intelligent Promotion Botlet

Turning Touchpoints into a Journey

Turning Touchpoints into a Journey

Designing a Customer Experience Strategy for Conversational Commerce

Designing a Customer Experience Strategy for Conversational Commerce

How the New Silo-Less Organization is Creating a CX Evolution

How the New Silo-Less Organization is Creating a CX Evolution

Best Practices for Customer Engagement at Every Touchpoint

Best Practices for Customer Engagement at Every Touchpoint

New Feature Alert: Automated Assistance for BOPIS

New Feature Alert: Automated Assistance for BOPIS

New Feature Alert: Content Inspiration Botlet

New Feature Alert: Content Inspiration Botlet

6 Costly Misunderstandings about Chatbots and Amazon Alexa

6 Costly Misunderstandings about Chatbots and Amazon Alexa

2019 Omni-Channel Tech Journey

2019 Omni-Channel Tech Journey

4 Steps for Integrating Customer Care Automation Into Your Marketing Strategy

4 Steps for Integrating Customer Care Automation Into Your Marketing Strategy

Customer Experience as the New Competitive Battleground

Customer Experience as the New Competitive Battleground

Conversational Commerce is the Future and the Present

Conversational Commerce is the Future and the Present

Press Release | CUTS Clothing Automates the Customer Experience

Press Release | CUTS Clothing Automates the Customer Experience

The Future is Automation- How to Deploy Customer Care Automation as a Complement to Existing Post-Purchase Solutions

The Future is Automation- How to Deploy Customer Care Automation as a Complement to Existing Post-Purchase Solutions

New Feature Alert: Consultative Buying Botlet

New Feature Alert: Consultative Buying Botlet

Using Enriched Data to Enhance Automation, Marketing, eCommerce and Operations Programs

Using Enriched Data to Enhance Automation, Marketing, eCommerce and Operations Programs

New Feature Alert: Product Inspiration Botlet

New Feature Alert: Product Inspiration Botlet

The Evolution of Customer Care Automation

The Evolution of Customer Care Automation

Press Release: PureFormulas Automates Customer Engagement with Linc Global

Press Release: PureFormulas Automates Customer Engagement with Linc Global

Customer Success: PacSun Differentiates the Customer Experience

Customer Success: PacSun Differentiates the Customer Experience

How to Make a ChatBot Smarter

How to Make a ChatBot Smarter

The Challenges of Optimizing Post-Purchase in a Silo

The Challenges of Optimizing Post-Purchase in a Silo

New Feature: Automated Web Chat and How It Will Change Customer Engagement Benchmarks

New Feature: Automated Web Chat and How It Will Change Customer Engagement Benchmarks

New Feature: Organic Marketing Opt-In

New Feature: Organic Marketing Opt-In

Customer Highlight: How Lamps Plus Delivers an Innovative Customer Experience

Customer Highlight: How Lamps Plus Delivers an Innovative Customer Experience

Six Challenges You Need To Conquer To Effectively Deliver Automated Customer Care

Six Challenges You Need To Conquer To Effectively Deliver Automated Customer Care

Schedule a Demo

 

Schedule a call with one of our experts to start building your AI roadmap.