Use Cases

How to build a fake news detector with sentiment analysis on Metaranx

A surprising amount of journalism is generated by artificial intelligence (AI) with The Associated Press, Forbes, The Washington Post, LA Times, and Bloomberg News all actively using AI to assist their journalists with content. While this is a brilliant productivity tool it also comes with its fair share of controversy. There are concerns that, as bots become the norm with human interactions on social media, chats, and in content, that people will be less likely to spot fake content or accounts. On the other hand, these type of tools free up professionals to focus on the parts of their job that humans handle best: innovation and creativity.

Anyone who has heard me speak to which AI tools I am most excited about knows that content assistance and generation is at the top of my list. I was a content marketer in the tech and other industries for years and I'd love productivity tools to help push my writing along faster. Frankly, even as someone trained in this profession, there is only so fast I can research, write, edit, and publish content. Many familiar news sources already use artificial intelligence tools to assist their writers, it seems like only a matter of time before these tools become the norm amongst bloggers and content marketers, too.

As AI presence in content and journalism grows, some media are worried about AI discrediting journalism or the inaccuracies it could generate in content. We will be using AI to help combat this by building a "Fake News Detector" application on Metaranx using sentiment analysis. By training the sentiment analysis on what to look for in fake news through the long-form titles of the content. Titles are great to use since, unfortunately, 60% of people read only the title and even worse - 59% of people share an article without clicking it. So, let's find a way to prevent the spread of fake news by building a fake news detector. Sentiment analysis is great to detect this type of pattern. As I always note, sentiment analysis has a broad range of applications with regards to making predictions of language/text-based data. In the example below, we'll train the sentiment analysis model to detect whether a news article is real (reliable) or fake (unreliable) by training it on a fake news dataset.

The dataset we have formatted for Metaranx originally came from Kaggle. It's called the "Fake and real news dataset" and is open source. It was created by Clément Bisaillon who was inspired to create a dataset to "make an algorithm able to determine if an article is fake news or not." On the Metaranx marketplace, you will find this dataset pre-formatted for sentiment analysis. You can learn how to format a dataset for sentiment analysis building on Metaranx on our Help Docs.

Let's build the fake news detector using no code on Metaranx

  1. Log in to your Metaranx Console and navigate to the Canvas
  2. Click "Build/Train an AI"
  3. Select "Language" then "Sentiment Analysis" task
  4. Upload the Fake News dataset that has been prepared for Metaranx or upload your own dataset
  5. As this data is already formatted, you can name your AI application then click "Train AI"
  6. When you receive a notification that training is finished, it's time to test! Find a news article and paste the content in. The AI will presumably determine whether it will is "positive" or "real" news or "negative" which is "fake" news.

Your new AI application will have an accuracy rate that you will find in your console. An accuracy rating of 90%, for example, tells you that 90 predictions out of 100 will be accurate. To improve accuracy, you can always train the model on more data. Keep in mind that there are a lot of (truthfully to me, frightening) calculations that go into determining the accuracy of a machine learning model and bias, overfitting, and more can all impact how well your model works with regards to new data. You will get to see all these fun metrics displayed in your console!

I hope you enjoyed learning how to build a fake news detector artificial intelligence application using sentiment analysis on the Metaranx platform. With no code AI, you can build an application that helps you determine if a news article is reliable or unreliable to verify the legitimacy of what you're reading. This seems especially relevant and important nowadays, when there is an increasing amount of bot-generated content and people are prone to sharing without reading content. As always, I'm looking forward to seeing what you build and how you build it!

Samantha Lloyd

Samantha Lloyd is the co-founder and CEO of Metaranx.