Blog

Intent Classification and its Significance in Chatbot Development

Written by Michael-Ross | Oct 19, 2017 1:51:38 PM

Chatbots are making major waves in the digitally empowered business and tech worlds today. Moreover, with chatbot abilities conversations to be more contextual while delivering better information better user experiences has made chatbot development to become an in-demand area of practice. In this blog, we take an in-depth look at what intent classification means for chatbot development as well as how to compute vectors for intent classification.

What is Intent Classification?

The Natural Language Processing (NLP) enables chatbots to understand the user requests. But it is conversation engine unit in NLP that is key in making the chatbot to be more contextual and offer personalized conversation experiences to users. The major aspect of this chatbot conversation engine is intent classification. As simple as it may sound, it is actually quite a complex process. Text input is identified by a software function referred to as a "classifier", which will associate the information provided with a specific "intent", producing a detailed explanation of the words for the computer to understand.

A classifier is a way to categorize pieces of data - in this case, a sentence - into several different categories. Much alike how humans will classify objects into sets, such as a violin is an instrument, a shirt is a type of clothing, and happy is an emotion, chatbots will classify each section of a sentence into broken down categories to understand the intention behind the input it has received.

There are several options available to developers for this:

  • Pattern Matching:Pattern matching involves using regex to find patterns in the incoming text, and classify it into different intents.
  • Machine Learning Algorithms:Use various machine learning algorithms to create multi-class classification. Machine learning platforms help the chatbots to be more contextual and analyse about the prospective clients, improvements in processes, and more.
  • Neural Networks:These networks are used to learn from text using word embedding. These involve deep learning, which in turn is a sort of machine learning technique that uses Artificial Neural Network (ANN) concept. ANN is a computing system inspired by the biological neural networks.  These systems are taught and "learn" by improving their performance without task-specific programming

For both machine learning algorithms and neural networks, we need numeric representations of text that a machine can operate with. Sentence vectors fills this requirement. They are built on the concept of vector space models, which provide a way to represent sentences that a user may type into a comparable mathematical vector. This can then be used to represent the meaning in multi-dimensional vectors. Then, these vectors can be used to classify intent and show how different sentences are related to one another.

Vector Space Models

There are several different ways to compute vectors from user-submitted sentences. Each approach has its advantages and its shortcomings. Choosing one depends the task you want to perform with your vectors:

  • Average of Word2Vec
  • Weighted Average of Word2Vec from TF-IDF
  • Doc2Vec
  • LSTM

You can view a more in-depth look at these ways to compute vectors here.

Choosing the approach that best suits your needs is important. For example, the Word2Vec approach preforms poorly in sentiment analysis tasks as according to a whitepaper by Le and Mikolov it “loses the word order in the same way as the standard bag-of-words models do,” and “fails to recognize many sophisticated linguistic phenomena, for instance, sarcasm.”

Interested in learning more about how chatbots work? Download our free executive guide on Chatbots, to get a more in-depth understanding of how they work.