Text Classification

From customer support emails to open ended lead capture forms, text is a critical way your customers interact with your business. With Akkio’s natural language processing, it’s easy to build and deploy everything from negative tweet flagging to targeted nurture campaigns.

Background

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.

Tweet Sentiment Classification

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.

Connecting Training Data

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.

A screenshot of the Akkio Flow with “Table” highlighted as the primary input.

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.

A screenshot of the Akkio Flow with a sentiment dataset uploaded.

Building the Model

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!

A screenshot of the Akkio Flow in the second step, where the user created a text classification model.

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.

Deploying the 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. 

A screenshot of the Akkio Flow in the third step, with deployment via Zapier as the output.

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. 

Retweeting Positive Tweets

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.

A screenshot of a Zapier Trigger named “Search Mention in Twitter.”

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.

A screenshot of a Zapier Action named “Run Python” that cleans a tweet.

Now, we can run sentiment analysis on the cleaned tweet.

A screenshot of a Zapier Action named “Make Prediction in Akkio” that predicted the sentiment of a 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%.

A screenshot of a Zapier Action named “Only continue if” that selects only tweets with a negative sentiment probability greater than 0.9.

Finally, let’s send a Slack notification with a link to the negative sentiment tweet.

A screenshot of a Zapier Action named “Send Channel Message in Slack.”

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.

Summary

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.

Similar applications
Operations
·
Feb 13, 2024
Predictive Maintenance
Operations
Finance
Operations
·
Feb 13, 2024
Employee Absenteeism
Operations
Finance
Finance
·
Jun 24, 2024
Cost Modeling
Finance
Product
By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.