TL;DR
Thematic analysis (TA) of patient and caregiver interviews is essential in healthcare research, but manually analyzing long qualitative transcripts is labor-intensive and hard to scale. This paper introduces LLM-TA, a pipeline combining transcript chunking and structured prompting (using GPT-4o mini) to automate inductive coding and theme generation on real-world parent interviews. Evaluated against human ground truth, the pipeline cuts analysis time by up to 97% while significantly outperforming previous LLM baselines in thematic overlap and specificity.
What Problem Does This Paper Address?
Inductive Thematic Analysis—most notably the six-phase framework developed by Braun and Clarke—is a gold standard in qualitative healthcare research. Analysts read transcripts without pre-set codebooks, inductively extracting codes, clustering them into candidate themes, and refining overarching concepts. However, this process is resource-heavy: a standard project can easily require dozens to hundreds of expert person-hours.
While large language models (LLMs) have shown promise in qualitative text coding, existing efforts suffer from critical gaps:
- Unrealistic datasets: Prior work mostly evaluates short transcripts (e.g., social media or ~3,000-word interviews) or low-stakes consumer domains (video games, music).
- Context degradation: Feeding entire long-form conversational transcripts directly into LLMs triggers "lost-in-the-middle" phenomena, missing fine-grained nuances.
- Weak evaluation: Studies rarely compare LLM outputs against qualitative themes created and validated by the original clinical domain researchers who conducted the interviews.
Methods
The authors designed LLM-TA, an automated two-stage pipeline built with LangChain and OpenAI’s GPT-4o-mini (temperature = 0):
Transcript Chunks (≤1,500 words)
│
▼ (LLM Initial Coding)
N Initial Codes with Quotes (~1 code / 225 words)
│
▼ (Sequential Partitioning: ~50 codes/group)
Preliminary Themes per Group (LLM Synthesis)
│
▼ (Global LLM Consolidation)
Overarching Themes & Descriptions
- Stage 1 (Fine-Grained Coding): Lengthy transcripts are split into conversational chunks of up to 1,500 words. The LLM roleplays as a qualitative researcher, outputting code names, descriptions, and supporting quotes. These codes are then batched into sequential groups of 50.
- Stage 2 (Hierarchical Theme Generation): The LLM synthesizes preliminary themes within each code group, then consolidates these group-level themes into a coherent final theme list.
- Prompting Variations: The authors benchmarked Zero-Shot (rich background context on the condition and TA methodology), One-Shot (curated qualitative examples from an adjacent study), and Reflexion (self-evaluating preliminary themes and regenerating them iteratively).
Datasets
- AAOCA Focus Group Transcripts: Nine de-identified focus group sessions involving 42 parents of pediatric patients diagnosed with Anomalous Aortic Origin of a Coronary Artery (AAOCA)—a rare, potentially fatal congenital heart disease.
- Scale: The dataset features rich, unscripted discussions with a median transcript length of 11,457 words (far longer than previous LLM-TA benchmarks).
- Ground Truth: Twelve overarching themes developed independently by a team of three human qualitative researchers over approximately 30 person-hours.
Key Insights and Ideas
- Chunking is not optional for long qualitative data: Baseline approaches that pass entire interviews directly into models lose crucial narrative detail. Dividing transcripts into ~1,500-word windows generated roughly one code per 225 words, preserving conversational context.
- Metric scores don’t tell the whole qualitative story: Although the 1-shot prompt configuration achieved the highest automated "Hit Rate," the original human researcher judged the 0-shot themes as more nuanced and qualitatively useful. Pure embedding-similarity metrics can reward generic, broad themes that lack actionable depth.
- LLMs over-index on drama and miss systemic clinical context:
- Salience bias: The model overrepresented rare, dramatic events (e.g., explicit cardiac arrest narratives or rare financial complaints) relative to the pervasive, low-drama anxiety felt by parents whose children were diagnosed incidentally.
- Missing external clinical context: Parents frequently asked clinicians for more information. The LLM interpreted this as a breakdown in doctor-patient communication; in reality, human experts recognized it as reflecting a genuine lack of clinical consensus and outcome evidence in AAOCA literature.
Key Results
- Massive Time Savings: Manual thematic analysis took ~30 person-hours. The LLM-TA pipeline ran in under 10 minutes for zero-shot and one-shot setups, and ~90 minutes (1.5 hours) for 1-shot + Reflexion—a 97% time reduction.
- Quantitative Superiority: Compared to the baseline method from Mathis et al. (2024), LLM-TA demonstrated:
- A 216% increase in average Jaccard Similarity (up to 0.410 vs. baseline 0.111–0.146 on Sentence-T5-XXL).
- A 45% increase in average Hit Rate (reaching 0.917–1.000 across multiple sentence-transformer embeddings vs. 0.417–0.750 for baselines).
- Expert Validation: In blind evaluations by the original study expert, LLM-TA scored significantly higher on thematic similarity, specificity, and usefulness than prior automated baselines.
Limitations and Future Work
- Expert-in-the-Loop is Mandatory: LLMs currently lack the clinical and structural knowledge needed to distinguish idiosyncratic participant statements from clinically meaningful patterns. Automated TA should augment, not replace, human analysts.
- Single-Condition Scope: The dataset is restricted to nine focus groups on pediatric AAOCA; performance on individual 1-on-1 interviews or different clinical domains remains unverified.
- Evaluator Breadth: The qualitative feedback relied primarily on one core researcher from the original coding team.
- Future Directions: The authors advocate enriching LLM prompts with external clinical practice guidelines and regulatory documents to bridge the context gap, alongside involving multiple diverse experts to mitigate individual interpretive bias.
Summary updated