OpenParable
Skip to content
← Back to skills

Tac2017 Adr

Research
tac2017-adr

Tac2017 Adr is an Agent Skill for research published in the BioTender-max/awesome-bio-agent-skills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Query TAC 2017 ADR annotated drug labels for adverse drug reactions. Use whenever the user asks about ADRs extracted from FDA drug labels, MedDRA-normalized adverse reactions, or wants to look up a drug name, ADR string, or MedDRA code in the TAC 2017 ADR corpus.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/BioTender-max/awesome-bio-agent-skills/blob/HEAD/skills/drugclaw/tac2017/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/tac2017-adr, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

TAC 2017 ADR Query Skill

Search 200 FDA drug labels annotated with adverse reactions, severity, and MedDRA normalization from the TAC 2017 shared task.

Entity Auto-detection

Input PatternDetected AsMatch Logic
10019211 (8 digits)MedDRA IDexact on meddra_pt_id or meddra_llt_id
ACTEMRA (known drug)Drug nameexact (case-insensitive) on drug label name
headache (known ADR)ADR stringexact on ADR reaction string
anything elseFree textsubstring on drug names, ADR strings, MedDRA PT/LLT names

API

FunctionInputReturns
search(entity)single entity stringlist[dict] — matching label hit(s)
search_batch(entities)list of entity stringsdict[str, list[dict]]
summarize(hits, entity)hit list + query labelcompact LLM-readable text
to_json(hits)hit listlist[dict] (JSON-serializable)
list_drugs()—sorted list of all drug names
stats()—dataset-level statistics dict

Hit Dict Structure

Each hit returned by search() contains:

FieldTypeDescription
drugstrDrug label name
source_filestrXML filename
sectionslist[str]Annotated section names (e.g. "adverse reactions")
mention_countsdictCount per mention type (AdverseReaction, Severity, …)
num_reactionsintTotal unique reactions in this label
positive_adrslist[str]Positive (non-negated, non-hypothetical) ADR strings
reactionslist[dict]Each with adr, meddra_pt, meddra_pt_id, optional meddra_llt, meddra_llt_id, flag

Usage

See if __name__ == "__main__" block in 37_TAC_2017_ADR.py for runnable examples covering: drug name lookup, ADR string search, MedDRA ID search, batch search, and JSON output.

from importlib.machinery import SourceFileLoader
tac = SourceFileLoader("tac2017", "/path/to/37_TAC_2017_ADR.py").load_module()

# Single drug
hits = tac.search("ACTEMRA")
print(tac.summarize(hits, "ACTEMRA"))

# ADR across all labels
hits = tac.search("headache")
print(tac.summarize(hits, "headache"))

# MedDRA PT ID
hits = tac.search("10019211")

# Batch
results = tac.search_batch(["ENBREL", "nausea", "10002198"])

Data

  • Source: TAC 2017 ADR shared task (NLM / FDA)
  • Files: gold_xml/ (99 test labels) + train_xml/ (101 training labels), each annotated XML
  • Annotations: Mentions (AdverseReaction, Severity, Factor, DrugClass, Negation, Animal), Relations (Negated, Hypothetical, Effect), Reactions (unique ADRs with MedDRA PT/LLT normalization)
  • MedDRA version: 18.1
  • Path: DATA_DIR variable in 37_TAC_2017_ADR.py
  • Reference: https://bionlp.nlm.nih.gov/tac2017adversereactions/