Data Visualization

Using AI to make sense of elections

Let’s face it — deciphering what politicians are saying is a nearly impossible task even for humans. They have an unprecedented gift of uttering words that can mean virtually anything. Even though one of the real tangible benefits of large language models and semantic search is the ability to understand the meaning behind words, applying it to analyze what politicians are saying is just as tough as it is for us humans. But we tried anyway!

BF

Ben Fistein

Co-Founder

4 min read

Featured Image

What is Semantee?

Semantee.ai is a technology to leverage AI over various types of data — short text, documents, images, audio or structured data. It understands the meaning behind words or images and thus let’s you work with them in a very human way; for example by searching on top of the data using natural language. We’ve done implementations on e-shops, where you can simply describe your need and our solution will find the closest matching products:

We’ve also made applications that help companies search through their internal knowledge base (RAG — retrieval augmented generation) or helped categorize large amounts of texts quickly. However, we also occasionally have fun with it and use the technology for more outlandish use cases.

Analyzing the U.S. presidential elections

We went through a variety of resources that compile statements made by the main candidates for U.S. President, sifted through Twitter feeds and public debates and collected everything in a simple spreadsheet. In total, we had roughly 1400 statements. Then, we ran them through Semantee to categorize them (e.g. “abortion”, “gun rights” or “foreign policy”) and subsequently analyzed and visualized the degree of agreement among the candidates. Here’s what we found:

Overall agreement

Across all the 1400 statements, unsurprisingly, the candidates nearly perfectly clustered into Democrats and Republicans:

!Overall agreement of U.S. presidential candidates

On this map, the distance between each person signifies their level of agreement; Jill Stein, for instance, strongly disagrees with Ron DeSantis on most matters, whereas Mike Pence and Tim Scott are fairly aligned.

However, since our AI smartly categorizes the statements, we can also zoom in on individual topics. In fact, we can pose a question and see how the map forms around that topic to quickly understand the stance of each candidate on this matter.

Gun rights

Because our technology ‘understands’ meaning, we can ask a question and compare the semantic closeness of all the statements to that given topic. We started off with a statement: “I believe it’s every American’s right to own a gun.” and now the map indicates what the candidates likely think about this topic based on all their public statements:

Candidates’ stance on gun rights

Here, the distance between the candidates is irrelevant, but the color scale is significant: the “colder” (i.e. dark blue) the color, the less they agree, and the “warmer” (i.e. dark red), the stronger the agreement. For example, Asa Hutchinson or Nikki Haley would likely concur with our input statement, wheras Joe Biden and Jason Palmer disagree.

Abortion

Here’s the kicker; people rarely actually use “abortion” when talking about the topic, but instead they may state something like “I believe Roe v. Wade should not have been overturned”. Understanding what this statement refers to and correctly assigning it to a category is tough even for humans.

Candidates’ stance on abortion

In this map, we stated “I believe it’s every woman’s right to do whatever she wants with her body.” and watched the map form around that. As a result, Cenk Uygur and Marianne Williamson seemed to agree with our input, while Ron DeSantis and Asa Hutchinson disagree.

So what?

The results are not surprising in these two topics — you would expect Republicans to oppose abortion and support gun rights and the opposite should be true for Democrats. However, with a larger database of statements and a simple interface for our system, you could pretty much ask any question of interest to you and see what the candidates would likely think.

We believe this could enhance the preparedness of voters prior to elections and make it easier to orientate oneself in the jungle that is politics. If you’re interested in a quick walkthrough of these results, please check out the video below: