Intelligent Automation at work (Part One)

Tim Vangilbergen
RoboRana
Published in
5 min readSep 16, 2019

Natural Language processing (NLP) combined with Robotic Process Automation (RPA).

INTRODUCTION TO INTELLIGENT AUTOMATION

Does the combination of technologies, like Robotic Process Automation (RPA) and Natural Language Processing (NLP), always make a good marriage? Can a groundbreaking cognitive technology be a game changer as a standalone (or does it need a Business Process Automation Platform)? In this blog, we try to answer these questions by providing evidence that great results can be achieved when RPA is integrated with a Google NLP engine or Microsoft NLP engine. The outcome? A trained NLP algorithm able to structure and understand the input data before it is being processed by a RPA bot. 🤖

NATURAL LANGUAGE PROCESSING (NLP)

NLP, a component of Artificial Intelligence (AI), is the ability of a computer program to fully understand human language.

The main techniques to complete Natural Language Processing tasks are syntactic and semantic analysis. Google’s Cloud Natural Language engine provides a pre-trained NLP model, where all you have to do is request an API key and there you go! Let’s see what Google can do for us:

  • Syntax analysis: extracts tokens and sentences, identifies parts of the speech and creates dependency parse trees for each sentence.
  • Entity analysis: identifies entities in documents — including receipts, invoices and contracts — and labels them by types such as date, person, contact details, organization, location, events, products and media.
  • Sentiment analysis: understands the general opinion, feeling or attitude expressed in a piece of text.
  • Multi-language: allows you to analyze a simple text in multiple languages, including English, Spanish, Japanese, Chinese (simplified and traditional), French, German, Italian, Korean, Portuguese and Russian.

Beside Google NLP capabilities, we have also tried the Azure Cognitive Services from Microsoft in combination with RPA. We describe this demo in our next blog (“part two: Microsoft NLP + RPA”).

IT’S ALL ABOUT DATA

Many of today’s cases have unstructured data. In order to build and train our NLP model (based on the pre-defined model of Google), we need data, data, and yes, data! The more we train our model, the better we can understand the inputs and anticipate on data exceptions.

For example: the amount of incoming unstructured mails for an organization can be huge and customers can request all sorts of information: insurance issues, contract changes, address updates, claims, health data,…. For some requests, there is a need to get in touch with a particular person that can make a decision or execute a task. All these mail request can be overwhelming for your organization’s mailbox. NLP helps you to categorize the mails and bring them to the right people to allow a clear follow-up action. For this particular use case we used the Microsoft Cognitive Services 👉you can read all about it in part two of our blog. But for now, back to Google NLP.

GOOGLE NLP ENGINE IN COMBINATION WITH RPA

Use case: reviews of a brand new Samsung computer are recorded at the largest online store in the world. Besides saving them, the messages are also sent within an API call to a powerful Google NLP engine for the semantic analysis. As soon as our RPA bot receives an answer from the NLP engine, we interpret and push a structured message with the result of the analysis directly to customer services with the RPA bot.

Thanks to this interaction with NLP, we succeed in separating the good and bad reviews from each other. This way you can thank customers for leaving a good review, immediately interact with people who had a bad experience with one of your products and use this information to fulfill your customer’s needs in the long run.

Customer review

Send an API call containing a review message to the Google engine with semantic analysis.

You’ll receive a score and magnitude from the engine as result.

You can assume the scores as follows:

✔️ Clearly Positive → Score > 0.0

✔️ Neutral → Score 0.0

✔️ Mixed → Score 0.1

✔️ Clearly Negative → Score < 0.0

The “clearly positive” and “clearly negative” sentiment varies for different usage situations and customers. For each specific scenario there are different results, although we recommend that you define a threshold that works best for you to adjust the results immediately after testing and verifying them. For example: you can define a threshold of a score above 0.25 as clearly positive and then change the score threshold to 0.15 once you have looked at the data and results and established that the scores of 0.15 - 0.25 should also be regarded as positive.

A document with a neutral score (around 0.0) may indicate a document with a low score or may indicate mixed emotions with both largely positive and negative values that each cancel out. In general, you can use the magnitude values to disambiguate these cases, since neutral documents have a low magnitude value, while mixed documents have higher magnitude values.

As an example, let’s interpret the following result: a score of -0.7 means clearly a negative sentence. Then we can assume that the customer is not satisfied with his product and may take immediate mitigating actions.

Feedback from the NLP engine with Sentiment analysis

With Entity Analysis, you can extend this case by understanding the context of the review which can result in implementing specific customer suggestions.

🐸 OUR CONCLUSION: GOOGLE NLP + RPA

The standard NLP API offered by Google is fun to play with, although you can’t solve a real business case with it. For complex cases with a lot of unstructured data we need to implement a more robust NLP model that can be trained on the available data. The standard Google NLP model can be used as basis for the training (even in different languages). Every unprocessed case can be manually validated which enhances the model to understand the different named entities and context. Once the NLP model is being trained properly, it is really easy to pass on the variables to the RPA bot to process the case and take the proper action.
___________________________________________________________________

For the second part of our blog, we will talk about a demo case about an email classification with Microsoft Cognitive Services in combination with RPA.

“Imagine receiving hundreds of emails every day from customers with different types of questions and requests. It takes a lot of effort to first understand and categorize them, before they can be actually processed. Once the category is known, the RPA bot can direct them into the desired authority that will answer the question/request. To automate this flow of mail categorization, the NLP model needs to be trained when a message belongs to this specific category. For this specific case, we’ve applied Machine Learning in combination with NLP to increase the outcome of the classification process.” But that’s for the second part of our blog 😉

--

--