The majority of consumers will sever a relationship with a business due to poor customer service, according to a study by Microsoft. At the same time, consumers are spending more time than ever on social media, and the expectation of good customer service carries over.
Therefore, monitoring customer conversations is critical. If you’re not quick to handle customer complaints, then you’ll lose business.
Every day, millions of people turn to the Internet to voice their opinions about businesses. Twitter is perhaps the number one source of this customer sentiment data. We can use Akkio to automatically analyze the sentiment of tweets, and send those with negative sentiment to an internal social media team for immediate review.
To get started, sign up to Akkio for free. As with any machine learning task, the first step is getting historical data and picking a column to predict.
The training dataset we’ll use is a Kaggle dataset containing 1,000 reviews and their sentiment, with the value 0 for negative sentiment and 1 for positive sentiment.
Let’s explore how to build and deploy a sentiment analysis model. First, hit “Create New Flow” on the homepage, and you’ll then see the interface below.
Then, click “Table” to upload the sentiment dataset. When that’s uploaded, you’ll see an overview of the dataset, including the number of rows, the data types of each column, the latest upload date, and a scrollable preview of the dataset.
Now, we can click on the second step in the AI flow, which is “Predict.” Under “predict fields” you can select the column to predict, named “category.” Then just hit “Create Predictive Model,” and you’re done!
It takes as little as 10 seconds to train a model from scratch. You can also select a longer training time—from 1 to 5 minutes—for potentially more accurate models. Keep in mind that longer training times aren’t always better, and may lead to overfitting.
Also note that you don’t pay for model training time, unlike with many typical automated machine learning tools, so feel free to build as many models as you’d like.
After a model is created, you get a simple overview, which highlights the top fields, model prediction quality, sample predictions, and more. There’s also the option to “See Model Report,” which lets us easily collaborate with others and share these model details with anyone, even if they don’t have an Akkio account.
In short, we’ve discovered that it’s very easy to build a highly accurate sentiment classification model.
Now that we’ve built a model, it’s time to deploy it in the real-world.
With Akkio, it becomes trivial to deploy complex machine learning models. The text classification demo shows deployment via web app as the third step. It’s also possible to deploy through Salesforce, Google Sheets, Snowflake, Zapier, or web app, with many more methods coming soon.
Going beyond a web app, you could deploy the model in practically any setting with Zapier, a no-code automation tool that connects tools with “Zaps.” Zapier allows you to link up thousands of different tools, so no matter where your data is coming from, it’s easy to connect it to Akkio to get a prediction.
If you’re looking for more technical power, you can also use Akkio’s API, which is formatted as a Curl command, allowing you to send a GET request that contains your flow key, API key, and input data, and get a prediction back.
Let’s make a Zapier Flow to automatically flag negative tweets about our company, and send them to an internal social media team.
First, we’ll create a “trigger” that gets activated when any text we’re interested in is mentioned. For this example, the “Search Mention in Twitter” gets triggered when any new tweet includes @AkkioHQ. You can select any account you want, and even duplicate these steps for any number of accounts you’re interested in.
Now, we want to “clean” the tweet, or simply remove characters that are difficult for an AI model to work with, like the “@” symbol. We can do that with the following “Run Python” action.
Now, we can run sentiment analysis on the cleaned tweet.
Our model predicted that the tweet was negative, but only with a probability of around 60%, so it’s not a very strong prediction. We only want to get notified if the model is very confident that the tweet has negative sentiment, so let’s add a filter that gets triggered when the “probability review is negative” is greater than 0.9, or 90%.
Finally, let’s send a Slack notification with a link to the negative sentiment tweet.
Alternatively, you could send an email, an SMS, or even a phone taskbar notification. We’ve now built a system that automatically flags negative tweets about a business and immediately notifies us on Slack for review.
At Akkio, we believe in democratizing AI. As such, we’ve made it easy for non-technical users to create and deploy a variety of AI models—including text classifiers.
We’ve explored how to build and deploy text classification models for sentiment analysis on tweets, but you can replicate these steps for any sort of text data, whether from review sites like G2 Crowd or Forrester, website contact forms, or anywhere else.
Beyond sentiment analysis, you could also use Akkio’s text classification for tasks like content tagging and spam detection.