ISSR Methodology Workshop | Using Large Language Models in R for Social Science Research: Text Classification and Validation
Instructor: Venkat Dasari
Large language models offer social scientists new ways to classify text, apply qualitative codebooks at scale, and create variables for quantitative analysis. This workshop provides a focused introduction to using LLMs in R with the ellmer package.
Through hands-on examples, participants will learn how to prepare text data, translate research concepts into classification prompts, and generate structured outputs containing labels, concise rationales, and confidence assessments. We’ll compare these outputs with human-coded data, examine common classification errors, and assess consistency across prompts and model runs. The workshop will conclude with practical guidance on reproducibility, privacy, bias, and responsible human oversight.
Learning Objectives:
By the end of this workshop, participants will be able to:
- Identify appropriate uses of LLMs for qualitative and quantitative text classification
- Connect to and interact with LLMs in R using the ellmer package
- Translate research concepts and codebooks into clear classification prompts
- Generate structured outputs containing labels, rationales, and confidence assessments
- Compare LLM classifications with human-coded or validated data
- Evaluate classification performance, consistency, and common errors
- Create reproducible LLM-assisted text-classification workflows in R
- Recognize concerns involving privacy, bias, transparency, and human oversight
Prerequisites:
Prior experience with R is expected. Participants should be familiar with basic R commands, data frames, and working with libraries. Familiarity with qualitative coding or basic quantitative research methods will be helpful but is not required. No prior experience with large language models, APIs, or natural language processing is necessary. Instructions for installing ellmer and accessing the required language model will be provided before the session.