{"slug":"prompt-engineering-llm-qualitative-coding-2025","title":"Does Prompt Wording Change AI Qualitative Coding? (2025)","description":"A 2025 study (HALC) tested 1,512 prompts for LLM qualitative coding. See how prompt design affects reliability, the Krippendorff alpha results, and what it means.","keywords":"prompt engineering qualitative coding, LLM qualitative coding, AI thematic analysis, prompt sensitivity LLM, Krippendorff alpha AI coding, automated coding LLM, computational social science, AI qualitative research","date":"2026-05-31","author":"Qualitati Research Team","category":"Methodology","readTime":"6 min read","content":"<p><em>Last updated: May 31, 2026</em></p>\n\n<h2>Short answer: does prompt design change AI qualitative coding?</h2>\n<p>Yes. How you word a prompt measurably changes the codes a large language model assigns to qualitative data. A 2025 study introducing <strong>HALC</strong> (Reich, Thoms &amp; Schrimpf, 2025) tested 1,512 prompts across roughly two million model requests and found that systematically optimized prompts lifted agreement with expert human coders into the \"substantial\" range (Krippendorff's alpha up to 0.78). Prompt design is not a cosmetic detail — it is a core validity decision in AI-assisted coding.</p>\n\n<h2>What did the study test?</h2>\n<p>The paper, \"Introducing HALC: A general pipeline for finding optimal prompting strategies for automated coding with LLMs in the computational social sciences,\" was posted to arXiv on 29 July 2025 by Andreas Reich, Claudia Thoms, and Tobias Schrimpf. HALC is a pipeline that systematically builds and tests prompts for a given codebook and model, rather than rewriting the codebook to suit the model. The authors ran 1,512 distinct prompts — totalling about two million requests — against local open-weight models, then compared the resulting codes against expert-coded ground truth on two social-science corpora (a \"climate\" dataset and a \"movement\" dataset).</p>\n\n<h2>How reliable was the AI coding?</h2>\n<p>Using Mistral NeMo with HALC-optimized prompts, the authors reported the following agreement with human experts, measured in Krippendorff's alpha (where 0.667 is a common minimum threshold and 0.80 is considered strong):</p>\n\n<table border=\"1\" cellpadding=\"6\" cellspacing=\"0\">\n  <thead>\n    <tr><th>Coding task</th><th>Dataset</th><th>Krippendorff's alpha</th></tr>\n  </thead>\n  <tbody>\n    <tr><td>Single-variable coding</td><td>Climate</td><td>0.76</td></tr>\n    <tr><td>Single-variable coding</td><td>Movement</td><td>0.78</td></tr>\n    <tr><td>Multi-variable coding</td><td>Climate</td><td>0.71</td></tr>\n    <tr><td>Multi-variable coding</td><td>Movement</td><td>0.74</td></tr>\n  </tbody>\n</table>\n\n<p>According to Reich, Thoms &amp; Schrimpf (2025), single-variable tasks (deciding one code at a time) reached higher reliability than multi-variable tasks (juggling several codes at once) — a pattern that mirrors how human coders also struggle more as a codebook grows more complex. Critically, these numbers were achieved with an open, locally hosted model, not a frontier commercial API, suggesting that careful prompting can partly substitute for raw model size.</p>\n\n<h2>How does HALC actually work?</h2>\n<p>The pipeline's logic can be broken into four steps:</p>\n<ol>\n  <li><strong>Hold the codebook fixed.</strong> HALC aligns the model to an existing, human-authored codebook instead of simplifying definitions to make the model's job easier — preserving the original analytic intent.</li>\n  <li><strong>Generate prompt variants.</strong> It constructs many candidate prompts that vary structure, context, and instruction style for the same coding task.</li>\n  <li><strong>Score against ground truth.</strong> Each prompt's output is compared to expert codes, so the \"best\" prompt is chosen empirically rather than by intuition.</li>\n  <li><strong>Select and reuse.</strong> The top-performing prompt configuration is retained for production coding on the rest of the corpus.</li>\n</ol>\n\n<h2>Why this matters for researchers</h2>\n<p>The headline lesson is that <strong>a single fixed prompt is a hidden methodological assumption.</strong> Two researchers coding the same transcripts with the same model but different prompt wording can reach different conclusions — a reproducibility risk that traditional intercoder-reliability checks were never designed to catch. The study reframes prompt design as something to be documented, tested, and reported, just like a codebook or an interview guide.</p>\n<p>For applied UX and market researchers, the practical takeaway is to (1) keep a human-authored codebook as the source of truth, (2) test more than one prompt before trusting the output, and (3) report the reliability of AI codes against a human-coded sample. Tools that keep every AI code anchored to the underlying data make this far easier. In Qualitati, <a href=\"/themelens\">ThemeLens</a> proposes themes that stay linked to participant quotes, and the <a href=\"/qda-workspace\">QDA Workspace</a> lets researchers review, edit, and validate every AI-assigned code before it counts as a finding. Pair that with <a href=\"/\">AI-moderated interviews</a> to collect the raw data in the first place.</p>\n\n<h2>The limits of the evidence</h2>\n<p>This is one study on two social-science corpora using specific open models, so the exact alpha values will not transfer to every domain, codebook, or language. The two-million-request scale also implies real compute cost, which smaller teams may not be able to replicate. And high agreement with expert codes measures reliability, not interpretive depth — an LLM can be consistent and still miss the nuance a skilled qualitative researcher would surface. The result argues for prompt optimization as a discipline, not for removing humans from the loop.</p>\n\n<h2>FAQ</h2>\n<p><strong>Does prompt wording really change qualitative coding results?</strong><br>Yes. The 2025 HALC study tested 1,512 prompts and found prompt design materially affected agreement with human coders, with optimized prompts reaching Krippendorff's alpha up to 0.78.</p>\n\n<p><strong>What is a \"good\" reliability score for AI coding?</strong><br>Krippendorff's alpha of 0.667 is a common minimum and 0.80 indicates strong agreement. HALC's best results (0.71–0.78) fall in the substantial range, below the 0.80 strong threshold.</p>\n\n<p><strong>Do I still need human coders if I optimize prompts?</strong><br>Yes. Optimized prompts improve reliability but do not guarantee interpretive validity. Best practice is to validate AI codes against a human-coded sample and keep researchers in the loop.</p>\n\n<p><strong>Where can I read the original paper?</strong><br>The preprint is on arXiv: <a href=\"https://arxiv.org/abs/2507.21831\">arxiv.org/abs/2507.21831</a>.</p>\n\n<p><em>Primary source: Reich, A., Thoms, C., &amp; Schrimpf, T. (2025). Introducing HALC: A general pipeline for finding optimal prompting strategies for automated coding with LLMs in the computational social sciences. arXiv:2507.21831. <a href=\"https://arxiv.org/abs/2507.21831\">https://arxiv.org/abs/2507.21831</a></em></p>\n\n<p><em>Last updated: May 31, 2026. This is an independent editorial summary of third-party research; Qualitati is not affiliated with the authors.</em></p>\n","related":[{"slug":"batching-synthetic-respondents-inflates-correlations-2026","title":"Batching Synthetic Respondents Inflates Correlations (2026)","description":"Generating many synthetic respondents in one LLM request inflates correlations, a 2026 LSE study finds. What it means for synthetic survey data validity.","category":"Methodology","date":"2026-10-13","readTime":"7 min read","author":"Qualitati Research Team"},{"slug":"ai-chatbot-qualitative-interviews-lessons-2026","title":"AI Chatbot Interviews at €0.04: Lessons From a 2026 Study","description":"Can AI chatbot interviews replace qualitative interviewers? A 2026 study of 74 chatbot-led interviews found cheap, engaging data collection but limited depth.","category":"Methodology","date":"2026-10-06","readTime":"7 min read","author":"Qualitati Research Team"},{"slug":"llm-inductive-content-analysis-survey-responses-2026","title":"Can GPT-5 Do Inductive Content Analysis of Survey Text?","description":"Can GPT-5 do inductive content analysis? A 2026 study of 903 survey answers found moderate human-AI agreement (ARI 0.61 codes, 0.54 themes), varying by question.","category":"Methodology","date":"2026-10-05","readTime":"7 min read","author":"Qualitati Research Team"}]}