{"slug":"can-llms-code-open-ended-survey-responses-2025","title":"Can LLMs Code Open-Ended Survey Responses? A 2025 Study","description":"2025 study: GPT, Llama and Mistral coded 5,072 open-ended survey answers. Only a fine-tuned model reached professional quality (macro F1 0.87); prompting alone fell short.","keywords":"Can LLMs Code Open-Ended Survey Responses? A 2025 Study","date":"2026-07-16","author":"Qualitati Research Team","category":"Guides","readTime":"8 min read","content":"\n<p><strong>Can large language models reliably code open-ended survey responses?</strong> Not out of the box. A 2025 study in <em>Survey Research Methods</em> tested GPT, Llama, and Mistral on 5,072 German survey answers and found that only a <em>fine-tuned</em> model reached professional coding quality (macro F1 of 0.87). Zero- and few-shot prompting fell well short of trained human coders and even a classic machine-learning baseline.</p>\n\n<h2>What did the study test?</h2>\n<p>Researchers Leah von der Heyde, Anna-Carolina Haensch, Bernd Weiß, and Jessica Daikeler asked a focused question: can off-the-shelf LLMs classify open-ended survey responses into a predefined coding scheme as well as human experts? They used real data from the GESIS Panel — a random 20% sample of 5,072 responses to a question about why people participate in surveys. Two survey researchers had already coded this data independently with very high agreement (Cohen's kappa = 0.91), giving a trustworthy human benchmark across 22 categories.</p>\n<p>The team compared three multilingual models — GPT-4o (proprietary), Llama 3.2, and Mistral NeMo (both open-source) — across several prompting strategies: zero-shot, few-shot, category descriptions, and fine-tuning. Because the categories were unevenly distributed, they used <strong>macro F1</strong> (which weights rare categories equally) as the primary metric rather than raw accuracy.</p>\n\n<h2>How accurate was AI coding of survey responses?</h2>\n<p>Accuracy depended heavily on both the model and the prompting approach. According to von der Heyde et al. (2025):</p>\n<ul>\n<li><strong>Fine-tuned GPT</strong> reached a macro F1 of <strong>0.87</strong> — the only setup the authors called \"satisfactory,\" and a 16-point jump over few-shot prompting.</li>\n<li><strong>Few-shot GPT</strong> was the best non-fine-tuned result at macro F1 <strong>0.71</strong>, with GPT hovering around 0.7 across prompting approaches.</li>\n<li><strong>Open-source models</strong> (Llama 3.2, Mistral NeMo) trailed badly; even their best prompting setups did not come near GPT. For some categories, Llama produced <em>no</em> correct classifications at all.</li>\n<li>A classic <strong>support vector machine</strong> trained on the same data (Haensch et al., 2022) reached a median F1 of 0.83, beating every non-fine-tuned LLM setup (best 0.72).</li>\n</ul>\n\n<h3>The uneven-category problem</h3>\n<p>The models were not uniformly good or bad — they were lopsided. GPT coded common, concrete categories very well (macro F1 around 0.9 for <em>incentive</em>, <em>interest</em>, and <em>fun</em>) but collapsed on ambiguous or rare ones (macro F1 between <strong>0.02 and 0.3</strong> for <em>no reason</em>, <em>non-identifiable/other</em>, and <em>other survey characteristics</em>). Because performance varied so much by category, the AI-generated distribution of reasons diverged from the human-coded distribution — meaning that reported frequencies, not just individual labels, can be distorted when fine-tuning is skipped.</p>\n\n<h2>Prompting approach vs. model: which matters more?</h2>\n<table>\n<thead><tr><th>Setup</th><th>Macro F1 (GPT)</th><th>Verdict</th></tr></thead>\n<tbody>\n<tr><td>Zero-shot prompting</td><td>~0.70 (worst of the three)</td><td>Below supervised baseline</td></tr>\n<tr><td>Few-shot prompting</td><td>0.71</td><td>Best without fine-tuning, still short of SVM</td></tr>\n<tr><td>Fine-tuning</td><td>0.87</td><td>Only \"satisfactory\" setup</td></tr>\n<tr><td>SVM baseline (2022)</td><td>0.83 (median F1)</td><td>Beat all non-fine-tuned LLMs</td></tr>\n</tbody>\n</table>\n<p>The headline pattern: <strong>model choice mattered more than prompt engineering</strong>. Few-shot beat zero-shot across the board, but the size of that gain depended on the model, and no amount of prompting closed the gap between open-source models and GPT. The single biggest lever was fine-tuning — retraining GPT on labeled examples — which is also the most resource-intensive to do.</p>\n\n<h2>What this means for researchers</h2>\n<p>The study is a useful corrective to the assumption that a capable general model plus a good prompt equals reliable coding. Three practical takeaways:</p>\n<ol>\n<li><strong>Validate before you trust category frequencies.</strong> Uneven per-category performance can quietly skew your distributions, not just individual labels.</li>\n<li><strong>Non-English, domain-specific coding is harder than English sentiment demos.</strong> Earlier optimistic results came from simpler English tasks; this German, 22-category scheme exposed the limits.</li>\n<li><strong>Budget for fine-tuning or human-in-the-loop review</strong> if you need publication-grade reliability. Few-shot prompting is a fast first pass, not a final answer.</li>\n</ol>\n<p>If you code open-ended survey data or interview transcripts, treating the model as an assistant that proposes codes for human confirmation — rather than an autonomous coder — matches the evidence. Tools like <a href=\"https://qualitati.com\">QualiTaTi's ThemeLens</a> are built around that human-in-the-loop pattern for AI thematic analysis, and its <a href=\"https://qualitati.com\">AI Surveys</a> feature keeps researchers in control of how open-ended answers are interpreted.</p>\n\n<h2>Frequently asked questions</h2>\n<p><strong>Can ChatGPT code open-ended survey responses accurately?</strong><br>Only partially. In this 2025 study, GPT-4o with few-shot prompting reached macro F1 of 0.71 — decent but below a trained SVM and short of expert-level reliability. Fine-tuning was needed to reach 0.87.</p>\n<p><strong>Are open-source LLMs good enough for survey coding?</strong><br>Not in this test. Llama 3.2 and Mistral NeMo trailed GPT substantially and failed entirely on some categories, even with their best prompting setup.</p>\n<p><strong>Does prompt engineering fix weak AI coding?</strong><br>It helps but has limits. Few-shot beat zero-shot, yet prompting alone never closed the gap to a supervised baseline. Fine-tuning drove the largest gains.</p>\n<p><strong>Should I still use AI for qualitative coding?</strong><br>Yes, with guardrails: use it for a first-pass draft, validate per-category performance, quote verbatims, and keep a human coder in the loop for final decisions.</p>\n\n<p><em>Last updated: July 16, 2026.</em></p>\n<p style=\"color:#666;font-size:0.9em\"><em>This is an independent editorial summary of third-party research. QualiTaTi is not affiliated with the study's authors. Primary source: von der Heyde, L., Haensch, A.-C., Weiß, B., &amp; Daikeler, J. (2025). \"AIn't Nothing But a Survey? Using Large Language Models for Coding German Open-Ended Survey Responses on Survey Motivation.\" <a href=\"https://arxiv.org/abs/2506.14634\">Survey Research Methods (arXiv:2506.14634)</a>.</em></p>\n","related":[{"slug":"ai-conversational-interviewing-2026-study","title":"Can AI Conduct Research Interviews? A 2026 Field Study","description":"Wuttke et al. (2026) ran AI-led interviews with 571 respondents on migration attitudes: richer reasoning than surveys, and ratings at or above the survey. Delivery mode matters.","category":"Guides","date":"2026-07-31","readTime":"8 min read","author":"Qualitati Research Team"},{"slug":"digital-twins-survey-respondents-2026-study","title":"Can Digital Twins Replace Survey Respondents? A 2026 Study","description":"A 2026 Columbia Business School study found LLM digital twins correlate with real survey answers at only r = 0.20 across 164 outcomes: funhouse mirrors, not substitutes.","category":"Guides","date":"2026-07-29","readTime":"8 min read","author":"Qualitati Research Team"},{"slug":"is-ai-qualitative-coding-biased-2025","title":"Is AI Qualitative Coding Biased? What a 2025 Study Found","description":"A 2025 Sociological Methods & Research study found ChatGPT and Llama 2 coding errors correlated with respondent traits; a small supervised model was more accurate and less biased.","category":"Guides","date":"2026-07-28","readTime":"8 min read","author":"Qualitati Research Team"}]}