One Prompt Does Not Fit All: Comparing Uniform and Adaptive Code‐Specific Prompting for Deductive Qualitative Coding With Large Language Models
ABSTRACT Background Large language models (LLMs) have demonstrated potential for (semi‐)automating the qualitative analysis of unstructured data, particularly in deductive qualitative coding using codebooks. While prior research has shown the feasibility of this technology, model performance seems to vary depending on the nature of the constructs being coded. However, existing approaches typically apply a single LLM prompting strategy across entire datasets, often of discourse transcripts or questionnaire data, using a single coding scheme or theoretical frame. Objectives We aim to explore whether code‐specific adaptive prompting, where LLM prompts are customised based on expert coders' or data‐driven rules for specific codes, outperforms uniform prompting in terms of agreement with a negotiated human coding and, secondarily, reduced computational cost when agreement is maintained. Methods We apply this approach to analyse the description of 35 multimedia learning designs (comprising 758 items/activities) created by teachers in an inquiry‐based learning digital platform. Two human coders and two open‐weights LLMs (Llama 3.3 and GPT‐OSS) coded the dataset, attending to three different pedagogical frameworks. Results and Conclusions Our results indicate that, with both LLMs, the data‐driven adaptive prompting reached similar or higher agreement with the reference point (i.e., the coding agreed by humans) than uniform prompting strategies (namely, zero‐shot and few‐shot with and without context), while reducing costs. These results may be especially relevant for the coding of large‐scale datasets, highlighting opportunities for human–AI collaboration in deductive qualitative coding of educational data.
Authors
- Mohamed Saban (ORCID: https://orcid.org/0000-0003-3412-8574)
- Cristina Villa-Torrano (ORCID: https://orcid.org/0000-0002-1882-0547)
- Juan Ignacio Asensio-Pérez (ORCID: https://orcid.org/0000-0002-1114-2819)
- María Jesús Rodríguez-Triana (ORCID: https://orcid.org/0000-0001-8639-1257)
- Luis P. Prieto (ORCID: https://orcid.org/0000-0002-0057-0682)
- Denis Gillet (ORCID: https://orcid.org/0000-0002-2570-929X)
- Inmaculada Haba-Ortuño (ORCID: https://orcid.org/0000-0002-0712-8619)
Institutions
- Universidad de Valladolid (ES)
- Universidad de Burgos (ES)
- École Polytechnique Fédérale de Lausanne (CH)
Publication Details
- Journal
- Journal of Computer Assisted Learning
- Published
- 2026-09-24
- DOI
- https://doi.org/10.1002/jcal.70334
- Primary Topic
- Computational and Text Analysis Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00