How to use LLMs for Text Analysis
Not on the map. Why?
Abstract (arXiv)
This guide introduces Large Language Models (LLM) as a highly versatile text analysis method within the social sciences. As LLMs are easy-to-use, cheap, fast, and applicable on a broad range of text analysis tasks, ranging from text annotation and classification to sentiment analysis and critical discourse analysis, many scholars believe that LLMs will transform how we do text analysis. This how-to guide is aimed at students and researchers with limited programming experience, and offers a simple introduction to how LLMs can be used for text analysis in your own research project, as well as advice on best practices. We will go through each of the steps of analyzing textual data with LLMs using Python: installing the software, setting up the API, loading the data, developing an analysis prompt, analyzing the text, and validating the results. As an illustrative example, we will use the challenging task of identifying populism in political texts, and show how LLMs move beyond the existing state-of-the-art.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 7 of its 28 references that are in the map. First posted on arXiv 24 Jul 2023.
Builds on
7 of 28 references.
References · 7
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Emergent Abilities of Large Language Modelscited by 2,512
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,150
- 2023ChatGPT Outperforms Crowd-Workers for Text-Annotation Taskscited by 870
- 2022Out of One, Many: Using Language Models to Simulate Human Samplescited by 752
- 2023ChatGPT-4 Outperforms Experts and Crowd Workers in Annotating Political Twitter Messages with Zero-Shot Learningcited by 100
- 2023Large Language Models Can Be Used to Estimate the Latent Positions of Politicianscited by 33
Built on by
Citing papers per year: 2023: 1; 2024: 2; 2025: 1; 2026: 1.
5 papers.
- 2023Simulating Social Media Using Large Language Models to Evaluate Alternative News Feed Algorithmscited by 65
- 2024Best Practices for Text Annotation with Large Language Modelscited by 36
- 2024Eliciting Problem Specifications via Large Language Modelscited by 2
- 2025Evaluating Large Language Models (LLMs) in Financial NLP: A Comparative Study on Financial Report Analysiscited by 2
- 2026LLM Predictive Scoring and Validation: Inferring Experience Ratings from Unstructured Textcited by 1
- 2026LLM Predictive Scoring and Validation: Inferring Experience Ratings from Unstructured Text15 Apr 2026
- 2025Evaluating Large Language Models (LLMs) in Financial NLP: A Comparative Study on Financial Report Analysis24 Jul 2025
- 2024Eliciting Problem Specifications via Large Language Models20 May 2024
- 2024Best Practices for Text Annotation with Large Language Models5 Feb 2024
- 2023Simulating Social Media Using Large Language Models to Evaluate Alternative News Feed Algorithms5 Oct 2023