Automated coding of communication data using large language models: a comparison of hierarchical and direct prompting strategies
Authors:
Open Access
- 6 March 2026
- journal article
- research article
- Published by Frontiers Media SA in Frontiers in Education
- Vol. 11, 1764154
Abstract
Coding communication data is essential for assessing 21st-century skills such as collaboration and communication, but large-scale human coding is labor-intensive. Large language models (LLMs) such as ChatGPT offer a scalable alternative, yet their accuracy depends on both coding framework complexity and prompting strategy. Using a communication coding framework with five main categories and seventeen subcategories, we compared two prompting strategies: a hierarchical strategy that first assigns main categories and then codes subcategories, and a direct strategy that directly codes subcategories in a single step. Coding accuracy was evaluated against human coding using Cohen’s Kappa and mixed-effects logistic regression. Both strategies achieved agreement comparable to human–human reliability (overall κ ≈ 0.57–0.59). However, direct prompting consistently outperformed hierarchical prompting, yielding an approximately 18% increase in the odds of agreement. Hierarchical prompting was more susceptible to error propagation when main categories were misclassified, whereas direct prompting produced more stable subcategory coding. These results provide guidance for using LLMs to code communication data under complex coding frameworks.Keywords
This publication has 22 references indexed in Scilit:
- Evaluating large language models in analysing classroom dialoguenpj Science of Learning, 2024
- Investigating collaborative problem solving skills and outcomes across computer-based tasksComputers & Education, 2023
- ChatGPT outperforms crowd workers for text-annotation tasksProceedings of the National Academy of Sciences of the United States of America, 2023
- ChatGPT: Jack of all trades, master of noneInformation Fusion, 2023
- Coding schemes and analytic indicators for dialogic teaching: A systematic review of the literatureLearning, Culture and Social Interaction, 2023
- Exploring social and cognitive dimensions of collaborative problem solving in an open online simulation-based taskComputers in Human Behavior, 2020
- Psychometric Considerations and a General Scoring Strategy for Assessments of Collaborative Problem SolvingETS Research Report Series, 2019
- Application of Ontologies for Assessing Collaborative Problem Solving SkillsInternational Journal of Testing, 2019
- CPS‐Rater: Automated Sequential Annotation for Conversations in Collaborative Problem‐Solving ActivitiesETS Research Report Series, 2017
- Assessment and Teaching of 21st Century Skills2015