Skip to main content

ORIGINAL RESEARCH article

Front. Public Health
Sec. Public Mental Health
Volume 13 - 2025 | doi: 10.3389/fpubh.2025.1512537
This article is part of the Research Topic Empowering Suicide Prevention Efforts with Generative AI Technology View all 3 articles

Deductively coding psychosocial autopsy interview data using a fewshot learning Large Language Model

Provisionally accepted
  • 1 113 Suicide Prevention, Amsterdam, Netherlands
  • 2 Psychiatry, Amsterdam University Medical Center, Amsterdam, Netherlands
  • 3 Department of Mathematics, Faculty of Science, VU Amsterdam, Amsterdam, Netherlands
  • 4 Department of Clinical Psychology, Leiden University, Leiden, Netherlands
  • 5 GGZ Oost Brabant, Boekel, Netherlands
  • 6 Department of psychiatry and psychosocial care, Radboud University, Nijmegen, Gelderland, Netherlands
  • 7 Department of child- and adolescent psychiatry and psychosocial care, Amsterdam University Medical Center, Amsterdam, Netherlands

The final, formatted version of the article will be published soon.

    Background: Psychosocial autopsy is a retrospective study of suicide, aimed to identify emerging themes and psychosocial risk factors. It typically relies heavily on qualitative data from interviews or medical documentation. However, qualitative research has often been scrutinized for being prone to bias and is notoriously time-and cost-intensive. Therefore, the current study aimed to investigate if a Large Language Model (LLM) can be feasibly integrated with qualitative research procedures, by evaluating the performance of the model in deductively coding and coherently summarizing interview data obtained in a psychosocial autopsy.Methods: Data from 38 semi-structured interviews conducted with individuals bereaved by the suicide of a loved one was deductively coded by qualitative researchers and a server-installed LLAMA3 large language model. The model performance was evaluated in three tasks: [1] binary classification of coded segments, [2] independent classification using a sliding window approach, and [3] summarization of coded data. Intercoder agreement scores were calculated using Cohen's Kappa, and the LLM's summaries were qualitatively assessed using the Constant Comparative Method.Results: The results showed that the LLM achieved substantial agreement with the researchers for the binary classification (accuracy: 0.84) and the sliding window task (accuracy: 0.67). The performance had large variability across codes. LLM summaries were typically rich enough for subsequent analysis by the researcher, with around 80% of the summaries being rated independently by two researchers as 'adequate' or 'good'. Emerging themes in the qualitative assessment of the summaries included unsolicited elaboration and hallucination.Conclusions: State-of-the-art LLMs show great potential to support researchers in deductively coding complex interview data, which would alleviate the investment of time and resources.Integrating models with qualitative research procedures can facilitate near real-time monitoring.Based on the findings, we recommend a collaborative model, whereby the LLM's deductive coding is complemented by review, inductive coding and further interpretation by a researcher. Future research may aim to replicate the findings in different contexts and evaluate models with a larger context size.

    Keywords: qualitative research, Psychosocial autopsy, large language model (LLM), suicide prevention, Public Health

    Received: 16 Oct 2024; Accepted: 29 Jan 2025.

    Copyright: © 2025 Balt, Salmi, Bhulai, Vrinzen, Eikelenboom, Gilissen, Creemers, Popma and Mérelle. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

    * Correspondence: Elias Balt, 113 Suicide Prevention, Amsterdam, Netherlands

    Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.