Ontology-Enhanced LLMs Aim to Catch Drug Slang Before It Spreads

Digital drug surveillance is running behind the language people actually use. Emerging substances, coded references, emojis, and deliberately vague slang often move faster than traditional monitoring systems, leaving public health teams to identify harm only after emergency department visits, overdoses, or broader community fallout have already climbed.

The proposed answer is an ontology-enhanced large language model architecture built around dynamic drug knowledge rather than unconstrained text generation. In this framework, established drug inventories are transformed into machine-readable ontologies and knowledge graphs, then paired with retrieval-augmented generation so an LLM can ground its interpretation in structured drug knowledge during inference. The goal is simple in concept and difficult in execution: detect what people mean when they write around the drug itself.

A single coded term can break surveillance. The word “tea” may point to a beverage, gossip, or a referent for nitazenes depending on context, and the same ambiguity applies to abbreviations, emojis, and slang that evolve inside platform-specific communities.

Why Conventional Monitoring Misses Emerging Drug Discourse

Traditional epidemiologic systems still matter, but they are slow by design. Drug-related surveillance datasets such as DAWN and other public health systems can trail real-world behavior by months or years, which means recommendations arrive after patterns are already established. That lag becomes especially costly when a new substance or new combination of drugs begins circulating online before clinicians recognize the resulting burden in emergency care.

The article places that problem in stark public health terms. In 2024, DAWN reported more than 8.4 million nonfatal drug-related emergency department visits in the United States, and social media has already been linked with parallel signals for emerging drugs and combinations, including synthetic opioids such as nitazenes, opioid-like compounds such as kratom, and polydrug exposures involving benzodiazepines, kratom, ketamine, and fentanyl. Those are not abstract signals. They are precursors to overdose risk, toxic interactions, and escalating care needs.

Public platforms also create a semantic fog that standard natural language processing often cannot clear. The material notes that roughly 10% of publicly accessible social media content advertises, depicts, or promotes illegal drugs, while more than 60% of adolescents have reported encountering drug-related content on TikTok, Instagram, and Snapchat. Even when researchers apply strict filters, new lexicons can evade capture because they are time-bound, audience-specific, and deliberately obscured. Semantic drift then compounds the problem: the model sees text, but misses the drug.

Dynamic Ontologies Turn Static Drug Inventories into Searchable Logic

The proposed system starts with existing drug inventories such as NIDA’s Drugs A-Z database and DEA slang term lists. Those repositories already contain valuable translational material, but they are static and depend on human curation to remain current. The article argues for reworking them into ontologies: structured, machine-readable maps of concepts and relationships that describe drug class, route of administration, effects, adverse interactions, and alternative names.

Once transformed, each fact can be expressed as a description-logic triple in a subject-predicate-object structure. Xanax can be linked to the benzodiazepine class; benzodiazepines can be linked to drowsiness; alcohol can be linked to interactions with benzodiazepines. Those relationships are not cosmetic. They allow a model to retrieve clinically relevant context rather than improvise from general language patterns that may have nothing to do with pharmacology.

When that ontology sits inside an ontology-grounded retrieval-augmented generation system, the LLM does not have to rely solely on its pretrained weights. It can query the knowledge graph during inference, narrow down possible interpretations, and classify ambiguous language against a constrained list of drug-related possibilities. In a message such as “To relax, I took a pill, drank a beer, and passed out,” the model can move from a vague phrase to a pharmacologically plausible class such as a benzodiazepine, because the structured knowledge layer connects sedation, pill form, and alcohol co-use.

Real-Time Classification Depends on Refusing to Overclaim

The most important feature of the proposed design is not confidence; it is restraint. When a term has no match inside the ontology, the system should not force a classification. Instead, it should flag the term as a candidate referent, preserve the surrounding text, and route the case for human review. That workflow matters because the drug vocabulary is intentionally unstable, and false certainty would be worse than silence.

Continuous updating is built into the model logic. New candidate terms can be reviewed by experts, classified, and added back into the ontology as the language evolves. Over time, the system becomes bidirectional: new observations refine the knowledge graph, and the improved graph strengthens future inference. In theory, that makes surveillance more adaptive than static dictionaries or one-time training sets, especially for obscure terms that shift meaning across communities and platforms.

Human oversight remains central. Expert coders can compare manual classifications with model output, measure disagreement, and feed mismatches back into ontology refinement. Without that loop, a model can still hallucinate or misclassify drug language, especially when a referent is culturally specific, ironic, or used in a deliberately evasive way.

Public Health Surveillance Needs Infrastructure, Not Just Models

The article lands on a hard systems issue: surveillance tools need durable infrastructure. DAWN discontinued data collection as of June 2025, exposing how vulnerable drug-monitoring systems become when they depend on changing federal priorities rather than funding-independent architecture. A more resilient approach would not rely on one database, one platform, or one model. It would combine structured drug knowledge, live social data, and human validation inside a continuously updated framework.

That matters because drug discourse online is not just a data problem; it is a linguistics problem with clinical consequences. When users hide substance use behind coded language, public health programs lose visibility into emerging exposures, and clinicians lose time. A surveillance model that can distinguish between ordinary slang and a drug referent offers a better chance of catching trends before they reach the bedside.

The remaining limitation is straightforward: model validity must be proven, not assumed. Ontology-guided systems still need careful evaluation to show that classifications align with pharmacologic reality and that newly identified terms are not simply artifacts of noise. The architecture is plausible, but the operational question is whether health systems can maintain expert review, update ontologies quickly enough, and deploy these tools at the scale demanded by rapidly mutating online drug culture.


Reporting by Dr. Sarah Lin, MD, MPH for Medicine World Foundation, with additional data provided by Nature Medical Research.