Frank's Blog

Intents Classification

With the development of AI technologies, AI-powered call center solutions can use natural language processing and sentiment analysis to automatically route calls to the most appropriate agent based on the caller’s language, tone, and emotional state. This can help improve call resolution rates and reduce customer wait times.

Contact Drver Analysis (CDA) is able to help call center identify the most high frequent questions or topics during the calls. The key technique of this analysis is Intent Classification.

Key Techniques used in Intent Classification

1. Key Techniques for Labeling

Some great techniques can be used to explore intents/topics from a huge amount of calls, and automatically label a call with the best fit intent. The primary techniques here are Top2Vec and Context Keyword Search.

1.1 Explore major intents/topics by Top2Vec

Top2Vec is used for topic modelling since it automatically finds number of topics and creates jointly embedded topic, document and word vectors. considering it’s ability to scan a set of documents, detecting words, phrases, patterns between them and automatically clustering word groups and similar expressions that best characterize a set of documents.

Context Keyword Search module determines sub intents for a pre-determined set of intents for each document based on a particular intent’s representational words and its context-specific keywords using a finite length window. The appropriate sub intent is determined based on the presence of keywords near the intent’s representational words within the context window in a document. You can find the Context Keyword Search module from Snorkel

2. Key Techniques for Classification

You have a lot of models to choose from the current NLP toolkit. I usually try following models:

2.1 BERT - text classification

BERT is a pre-trained deep learning model for natural language processing (NLP) tasks, including text classification. BERT was developed by Google AI language researchers in 2018 and has since become one of the most widely used NLP models. Note that the label in this case is a hierarchical label consists of multiple intents, for example

Credit Query -> Recent Transactions -> Suspicious Transaction -> Fraud -> Block My Card.

Therefore, you need to use BERT - Multilabel Text Classifiction instead. BERT has been shown to achieve state-of-the-art results on a wide range of NLP tasks, including text classification, and has become a popular choice for many NLP applications.

2.2 CNN - text classification

One advantage of using CNNs for text classification is that they can capture local dependencies between words, meaning they can identify patterns that occur in specific parts of the input text. Additionally, because they operate on a fixed-size window of text, they can process variable-length input sequences, such as sentences of different lengths. CNNs have been shown to be effective for text classification tasks, especially when dealing with short input sequences, and they have been used in a wide range of applications, including sentiment analysis, topic classification, and spam filtering.

2.3 Universal Sentence Encoder (USE) + Neural Netwrok

The Universal Sentence Encoder (USE) is a pre-trained deep learning model for natural language processing (NLP) tasks that was developed by Google in 2018. The model is designed to encode input text into fixed-length vector representations, which can be used as input for various downstream NLP tasks, such as text classification, sentiment analysis, and question-answering. The sentence and multi-sentence encodings generated by the USE model have been shown to be highly effective for a variety of NLP tasks, and the model has achieved state-of-the-art results on several benchmark datasets.

2.4 A Benchmark model e.g. TF-IDF/W2V + Random Forests (RF)

Leverae Tf-IDF or W2V, etc those basic methods to convert the call to a train-ready data and use RF or any basic classifiers to perform the classification.

3. Boosting Labels

When initial sets of labels prove to be insufficient, we needed additional data to improve model performance. However, due to the limited availablility of labeling resources, we decided to take a semi-automated approach using cosine similarity and word embeddings to compare the labeled utterances to unlabeled utterances to find matches. We used the sentence-transformers to create two sets of embeddings: one for the unlabeled data and one for the labeled data. We then used cosine similarity to determine which unlabeled utterances are most semantically similar to a labeled utterance, using a conservative threshold of 0.9. We then manually reviewed the newly created dataset to ensure accuracy.