- Large language models distinguished opioid slang from its non-opioid meanings more effectively than lexicons across three Twitter-text tasks.
- Four models performed consistently well, including when identifying newly emerging slang.
- LLMs could improve opioid-related social media datasets, supporting analyses and forecasts of overdose trends.
J Am Med Inform Assoc. 2026 Dec 1:ocag187. doi: 10.1093/jamia/ocag187. Online ahead of print.
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.
PMID:43118125 | DOI:10.1093/jamia/ocag187
Share Evidence Blueprint
Save to Google Notes

Search Google Scholar
⭐ My Revision List

