March 23, 2023 in Five-Minute Analyst
Political GPT
SHARE: PRINT ARTICLE:
https://doi.org/10.1287/LYTX.2023.02.08
The OpenAI ChatGPT has been a bit of a shock to the white-collar world and, in particular, educational institutions – to the point that a student claimed he did not plagiarize because the AI, not another person, wrote the paper. Philosophical discussion aside, that is just ridiculous. The student gets a zero for the assignment because he did not actually do the work. What about the rest of the world that doesn’t have clearly defined rules for use of this technology?
GPT stands for generative pretrained transformer. This is how OpenAI does natural language processing (NLP) in their model. Their model is not the only one of this type, but they have made news with their offer to let anyone use it for free. So, that is what I’ve done for this article in, ahem, 5 minutes or less.
I have previously done text mining to assess national defense strategy documents, and the original author of this column also wrote about various assessments of speeches, including the State of the Union, presidential acceptance and presidential inauguration speeches. With all the pretrained knowledge of this model, I wanted to see how it might write political speeches. This didn’t simply come out of left field. I was, and still am, reading “Forward: Notes on the Future of Our Democracy,” written by 2020 Democratic presidential candidate Andrew Yang. In the book, he mentions the relatively low bar to become a candidate. And, if perhaps you don’t have a paid staff to help you, a model such as ChatGPT might help you craft your speeches and more. With this thought in mind, I set out to see what the latest technology would produce.
I used the following prompts to produce speeches:
Write a stump speech for a [insert party name] party U.S. presidential candidate.
Write a state of the union speech for a [insert party name] party U.S. presidential candidate.
You can find my four text files of results here (Democrat, Republican, Libertarian, Independent).
Once I had this information, I used R statistical software to create word counts. I wanted to see which words were most frequently associated with each of the political party options. I have the ordered results from this relatively small sample in their entirety, but after about the top 3 words, there is not much of interest. So, what were the top 3 for each? Table 1 lists the results.
|
Candidate |
Word |
Frequency (n) |
|
Democrat |
Americans |
5 |
|
Democrat |
Future |
5 |
|
Democrat |
Change |
4 |
|
Republican |
American |
9 |
|
Republican |
Nation |
6 |
|
Republican |
Government |
5 |
|
Libertarian |
Country |
7 |
|
Libertarian |
Individual |
7 |
|
Libertarian |
Americans |
6 |
|
Independent |
Country |
8 |
|
Independent |
Americans |
5 |
|
Independent |
Change |
5 |
Table 1: Top 3 word counts for each candidate type. Each one had at least one word with the stem “America” in the list. Some had slightly more repetition of words than others.
Certainly, each top 3 list must be looked at in context, but some mention of “America” or “Americans” shows up in all three. Actually, if you expand each to search for all words with the stem “America,” then that stem would take the No. 1 spot for each candidate. The others are more telling of bias that is coming from the ChatGPT tool. Independents are more likely to mention “country,” as are Libertarians, with the addition of “individual.” Democrats align with words such as “future” and “change,” whereas Republicans use “nation” and “government.” Democrats seemed to have the lowest frequency in their top 3.
I created some word clouds to help provide a visual of the results. Figure 1 shows them side by side. This was from a combination of two speech requests per political party affiliation. More requests and/or longer speeches could provide further insight into what biases may exist in the AI tool.
|
Democrat |
Republican |
![]() |
![]() |
|
Libertarian |
Independent |
![]() |
![]() |
Figure 1: Word clouds produced in R based on speeches produced by OpenAI ChatGPT tool. The R code used was also produced by the same tool.
Certainly not everyone will be running for president. However, one could see value in using this tool to get a start on a speech or paper. I would recommend only as a starting point vice a final product. I say this because I’ve read about instances in which false information has been produced. I can verify that although ChatGPT is an excellent tool, it is not perfect, because the code for the above analysis was written by the same tool. The R code it produced did have some minor errors that I had to fix. However, the simplicity of providing the following prompt and getting results in seconds truly empowers even novices to produce fast analyses. I also ran the prompt by replacing “R” with “Python.” It worked just as well to produce Python code.
Prompt for R code:
Write R code to compare and contrast the content four text files of political candidate speeches and output the top three words or phrases by each candidate. Include output of wordclouds for each candidate.
Prompt creation does still require an analyst to think about the approach, so we are not quite replaceable yet. Many zero-code (or low-code) tools are limited to the options provided. This new technology opens the door to allowing a learning environment that moves beyond those types of tools. In theory, as more people utilize tools like ChatGPT, more learning occurs and the results improve.
Historically, automation meant the loss of repetitive factory work. Now, those in white-collar jobs need to begin assessing their value to an employer. It takes only a little creative thinking to imagine many use cases. Which ones can you imagine?
Nick Ulmer, CAP, has been an operations research analyst since 2014. He is the inaugural chair of the INFORMS Military Veterans Interest Forum and a Principal Operations Research Analyst for CANA LLC, leading teams of analytics professionals to produce high level analytics products across federal and commercial domains.
([email protected])



