AI Coding with Few-Shot Prompting for Thematic Analysis

Flanders, Samuel, Nungsari, Melati, Loong, Mark Cheong Wing

arXiv.org Artificial Intelligence 

This paper explores the use of large language models (LLMs), here represented by GPT 3.5-Turbo (henceforth "GPT"), to perform coding for a thematic analysis. Coding is highly labor intensive, making it infeasible for most researchers to conduct exhaustive thematic analyses of large corpora. Recent advances in large language models (LLMs) have opened the door to novel approaches for automating aspects of qualitative research, including thematic analysis (TA). Prior work has shown that LLMs can generate plausible thematic codes for text data (Dai, Xiong, and Ku, 2023; Morgan, 2023; De Paoli, 2024). This paper focuses on the development and evaluation of an AI-assisted coding methodology designed to enhance the thematic coding of text passages using large language models.