cs.CLMar 26, 2026

Navigating the Prompt Space: Improving LLM Classification of Social Science Texts Through Prompt Engineering

Authors: Erkan Gunes, Christoffer Florczak, Tevfik Murat Yildirim

Organizations: Constructor University · Aalborg University · University of Stavanger

Abstract

Recent developments in text classification using Large Language Models (LLMs) in the social sciences suggest that costs can be cut significantly, while performance can sometimes rival existing computational methods. However, with a wide variance in performance in current tests, we move to the question of how to maximize performance. In this paper, we focus on prompt context as a possible avenue for increasing accuracy by systematically varying three aspects of prompt engineering: label descriptions, instructional nudges, and few shot examples. Across two different examples, our tests illustrate that a minimal increase in prompt context yields the highest increase in performance, while further increases in context only tend to yield marginal performance increases thereafter. Alarmingly, increasing prompt context sometimes decreases accuracy. Furthermore, our tests suggest substantial heterogeneity across models, tasks, and batch size, underlining the need for individual validation of each LLM coding task rather than reliance on general rules.

Figures & tables

Explore similar work

CardsList
  1. Researchers waste 80% of LLM annotation costs by classifying one text at a time

    Apr 4, 2026Christian Pipal, Eva-Maria Vogel, Morgan Wack +1LLM-Assisted AnnotationLarge Language Model-Based Text Classification

  2. BenCSSmark: Making the Social Sciences Count in LLM Research

    May 6, 2026Arnault Chatelain, Étienne Ollion, Qianwen Guan +7LLM EvaluationBenchmark Design

  3. Prompting Complexity: Shortest Prompts for Texts and Behaviors in LLMs

    Jul 7, 2026Adrian CosmaLLM PromptingPrompt Optimization