Prompt stability scoring for text annotation with large language models

Researchers are increasingly using large language models (LLMs) for text annotation, typically relying on prompts that instruct the model to return a given output. LLM outputs can nonetheless be vulnerable to minor prompt variations, raising concerns about the reliability and reproducibility of classification routines. Stability is a necessary but not sufficient condition for both accuracy and reproducibility. To diagnose this, we propose the prompt stability score, an automated procedure for measuring agreement across repeated runs and semantically similar prompt variants, and provide an accompanying Python package, promptstability. Using 6 datasets and 12 outcomes, we generate tilde $\sim$ ~ 3.1 m annotations (tilde $\sim$ ~ 300 m input tokens) to characterize when prompt-based pipelines are stable versus fragile. We conclude with practical recommendations for applied research.

Authors

Institutions

Publication Details

Journal
Political Science Research and Methods
Published
2026-12-03
DOI
https://doi.org/10.1017/psrm.2026.10159
Citations
47
Primary Topic
Computational and Text Analysis Methods
Type
article
Field-Weighted Citation Impact
68.60
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Prompt stability scoring for text annotation with large language models

Christopher Barrie, Petter Törnberg, Elli Palaiologou
47 citations
Political Science Research and Methods
Computational and Text Analysis Methods
68.60
article

Prompt stability scoring for text annotation with large language models

Christopher Barrie, Petter Törnberg, Elli Palaiologou
article en
47 citations

Abstract

Researchers are increasingly using large language models (LLMs) for text annotation, typically relying on prompts that instruct the model to return a given output. LLM outputs can nonetheless be vulnerable to minor prompt variations, raising concerns about the reliability and reproducibility of classification routines. Stability is a necessary but not sufficient condition for both accuracy and reproducibility. To diagnose this, we propose the prompt stability score, an automated procedure for measuring agreement across repeated runs and semantically similar prompt variants, and provide an accompanying Python package, promptstability. Using 6 datasets and 12 outcomes, we generate tilde $\sim$ ~ 3.1 m annotations (tilde $\sim$ ~ 300 m input tokens) to characterize when prompt-based pipelines are stable versus fragile. We conclude with practical recommendations for applied research.

Political Science Research and Methods
New York University (US), University of Amsterdam (NL)
Openalex Percentile: Top 0%
Computational and Text Analysis Methods
68.60
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon