Health & Medicinearticle2026-12-01

Large language models can disambiguate opioid slang on social media

Open access2 citations

Abstract

Objectives Social media text shows promise for monitoring trends in the opioid overdose crisis. However, many slang terms for opioids used on social media have common non-opioid meanings. The reasoning capability of large language models (LLMs) presents an opportunity to disambiguate these slang terms at scale to better assemble corpora of opioid-related text. Materials and methods We present 3 tasks on which to evaluate 4 state-of-the-art LLMs (GPT-4, GPT-5, Gemini 2.5 Pro, and Claude Sonnet 4.5): a lexicon-based setting, a lexicon-free setting, and an emergent slang setting. We assemble datasets of Twitter posts to conduct each task. Results In both subtasks of the lexicon-based setting, LLM F1 scores (“fenty” subtask: 0.824-0.972; “smack” subtask: 0.540-0.862) exceeded those of the best lexicon strategy (0.126 and 0.009, respectively). In the lexicon-free task, LLM F1 scores (0.544-0.769) surpassed those of lexicons (0.080-0.540), and LLMs demonstrated uniformly higher recall. On emergent slang, all LLMs had higher accuracy (average: 0.784), F1 score (average: 0.712), precision (average: 0.981), and recall (average: 0.587) than the 2 lexicons assessed. Discussion The consistency of performance across the 4 LLMs assessed suggests that these findings generalize across LLMs broadly. Our results show that LLMs can be used to identify relevant content for low-prevalence topics, including but not limited to opioid references, enhancing data provided to downstream analyses and predictive models. Conclusion LLMs can be a useful tool for curating opioid-related social media text datasets that can in turn forecast trends in the opioid crisis.

// Source

View paper (DOI)Open access versionOpenAlexJournal of the American Medical Informatics AssociationPublished 2026-12-01

Authors: Kristy A. Carpenter, Issah Abubakari Samori, Mathew Vinhhoa Kiang, Keith N. Humphreys, Anna Lembke, johannes Christopher Eichstaedt, Russ Biagio Altman

Institutions: Stanford University, Stanford Medicine, VA Palo Alto Health Care System