How we use machine learning to predict why your client is calling

And if they’re happy (or not).

Michèle Brüggemann
Call Voicy
9 min readNov 16, 2016

--

Voicy lights up: incoming call. John Bakker, one of our clients that we are doing a project for, is calling. We know who he is calling for. We know why he is calling: he is concerned. We know what his concerns are, because they pop up on Voicy screens all around the office before John has expressed them. We know who is working on these issues and we know when they will be fixed. And we know all of this before we have even picked up the phone. We are as prepared as we will ever be.

Bart, project lead on John’s project, picks up the phone and says with confidence:

Bart: “Hello John, this is Bart. How are you doing?”

John: “Hey Bart, I’m good thanks, I just have some…”

Bart: “… Concerns, I know. Way ahead of you John. No worries! Daphne and Jeffrey started working on bug A, B and C an hour ago. They will be fixed before lunch.”

John: “Wow Bart, how did you know that? Well yes, those were exactly my concerns. I was a little worried but I am feeling much better now.”

Bam. In a split second we predicted why John was calling, how he was feeling and how we could respond properly to make him feel better, improving both customer satisfaction and John’s faith in us handling his business. This is what Voicy is all about.

Project ‘AI’ — all about predictions

Two months ago we started ‘Project AI’ (Artificial Intelligence) for Voicy. The goal of this project is to see if we can implement a feature that predicts why someone is calling. We thought: how cool would it be if we couldn’t only see WHO is calling, but also WHY they are calling? Who doesn’t like being ahead of an issue, having relevant information available right when you need it? Then we thought: sure, that would be cool indeed. But wouldn’t it be WAY cooler if we could not only predict why they are calling, but also how they are feeling about the call they are about to make? This way, the person picking up the phone knows exactly what to expect, and can adjust their tone of voice and response accordingly.

In order to make these predictions, we need innovative and advanced technologies like… Machine learning. Secretly we have been wanting to experiment with this for a while. Big tech companies like Google and Facebook are using it more and more and their accuracy is astonishing! Apparently the Google Photos app can even distinguish the Eiffel Tower in Paris from the one in Las Vegas. Like… HOW?!

These predictions in the Google Photos app are so on point I can’t even…

Basically, machine learning is processing large sets of data and picking the relevant items — no matter the source. And we believe this could be useful almost… Anywhere. And we have only just scratched the surface. We believe there are still many unexplored possibilities with machine learning in many different settings. And we are super excited to start exploring the possibilities of machine learning within Voicy.

Step 1: collect ALL the data

First we need to analyze data. A LOT of data. To do so we built an application we call Nostradamus (named after the famous prophet, astrologist and writer of the book Les Prophéties). This application is able to conduct analysis on data of all the clients we registered in JIRA and Zendesk.

We collect all this data from Zendesk and JIRA through their APIs. This ‘raw’ API data is then analyzed by the Nostradamus application. We analyze the title, properties and text. The analysis includes:

  • Calculating the polarity of a data set;
  • Calculating the subjectivity of a data set (for which we don’t have a purpose yet, but who knows what it will reveal);
  • Removing ‘clutter’ from data sets like e-mail footers.

The information we get from this is being stored in a local database. And because this data is pre-analyzed, we only have to fetch the relevant data when a client calls (which obviously saves time).

Step 2: training time!

Picture a massive pile of entries. These entries can either be tickets (from Zendesk) or issues (from JIRA). Got that massive pile of entries visualized? Now double that pile. This is the pile we need to pick the best and most relevant ones from, whenever a client calls. THIS is where machine learning comes into play.

We are training a classifier to find the three (perhaps more?) best options out of that massive pile of entries. Training a classifier is pretty much like raising a baby. At first it knows nothing, you start with an empty, pretty useless (but with a lot of potential) thing. It needs to be fed information to teach it the basics. You talk to a baby and eventually the baby starts memorizing words. You introduce a baby to family and friends until it starts recognizing faces and voices. That is the first phase of training our classifier too. Just simply feeding it information to train it to a basic level.

We do this by keeping track of all the incoming phone calls of clients that are registered in Voicy. We write down who called, at what time they called and who they were calling for. After the phone call the person who the call was for, provides feedback to us about the nature of the call and they rate the polarity of the call, so whether a conversation was mostly positive or mostly negative. Polarity in this case is expressed in values between -1 (a very negative phone call) and 1 (a very positive phone call). A value of 0 would be neutral in this case. We feed all this information to the classifier until we have created a baseline.

Step 3: correcting your toddler

The next step is about broadening the classifier’s knowledge by letting it get to work, and then correct or approve its actions. And this is why I like the baby raising comparison, because this is exactly how people learn as well. We make mistakes and we learn from them. When a toddler touches the hot stove for the first time, it hurts. The toddler has learned to not do this again. Training a classifier isn’t any different.

These kids have just learned something–the hard way.

So it is time to let the classifier make its first predictions, based on the knowledge it gained from the previous training. For this we are currently building another application with which we can approve or correct the classifier’s predictions. The classifier will give its best bet and picks three options (these can be JIRA issues and/or Zendesk tickets). We can then validate its choices by telling it which predictions are correct, and where it made a mistake. It then learns from its mistakes, getting more precise every time. Hopefully eventually reaching an accuracy of 80–90% (although we predict it will land somewhere between 60–70% after our first try).

Doing something new comes with challenges

Even though the progress of our project is promising, we have had some obstacles on our path. One of them weirdly enough being that we are doing too well at the moment. We have found that clients are most likely to call our office when something is not good, when they are worried or dissatisfied about something. We don’t get many calls these days, which means we are doing a good job. It also means that it is difficult for us to collect caller data to test and train with. Which, in the long run, could mean that the predictions aren’t as accurate as we’d like them to be.

A second problem we’re facing has to do with TextBlob, which is a Python library for processing contextual data. Our Nostradamus application uses it to establish the polarity of entries. The default configuration is English and thus doesn’t work with Dutch texts. And since most of our entries are in Dutch… You get the problem. A temporary and easy solution for this is to auto-translate the texts to English first. But some of the information might get lost in translation, compromising the external validity of our outcome. We know, however, it is somehow possible to use Dutch data sets in TextBlob. So this is an issue that we can fix in the future.

“If you are trying to achieve, there will be roadblocks. I’ve had them; everybody has had them. But obstacles don’t have to stop you. If you run into a wall, don’t turn around and give up. Figure out how to climb it, go through it, or work around it.“ ~Michael Jordan

The last challenge we are currently trying to overcome is cross service identification based on fuzzy string comparison. Each service we implement could have different naming conventions regarding specific clients. A good (fictitious) example would be Coca-Cola. They could for example be called ‘Coca-Cola Enterprises’ in JIRA while still being registered as ‘Coca-Cola European Partners’ in Zendesk and maybe ‘Coca-Cola’ in Voicy.

Manually linking these is not an option since Voicy is designed to be a ‘plug and play’ service. The key is to match client and company names across platforms automatically. This way users receive relevant content predictions with minimal to no configuration. We use the FuzzyWuzzy Library for Python 3 to dynamically link these together and so far it seems like we have solved this issue.

The goal: Voicy as a smart personal assistant

Our goal is to equip Voicy with smarter technology to have it enhance the office and take the role of an assistant. Your P.A. Voicy will tell you everything you want to know about an incoming call. It will tell you the nature of the call, it will show you the matching tickets or issues on the screen and it will tell you whether your client is most likely gonna be happy or not so happy. This gives you the advantage of picking up the phone very prepared, which will definitely positively surprise your client and help building trust and better your client relationships.

That’s cool and all, but will it work?

Will we be able to make relevant content predictions with minimum to no configuration? Yes. Undoubtedly we will. Nostradamus is only our first prototype to try and achieve this goal. If we can’t get the accuracy high enough, not all is lost. There are many ways that lead to Rome. Machine learning is just one of the cooler ways to Rome.

We’ll let you know more when we know more!

We would love to hear from you if you have any questions or feedback! Don’t hesitate to give us a call at +31 20 820 37 38, or drop a comment.

Download the latest version of Voicy from the stores:

--

--