agentsclimarketplace

Phee

Skill BioTender-max/awesome-bio-agent-skills/skills/drugclaw/phee

Query the PHEE pharmacovigilance event extraction dataset. Use whenever the user asks about annotated adverse drug events, pharmacovigilance case reports, drug–effect associations from medical literature, or wants to find PHEE examples mentioning a drug name, adverse effect, or condition.From its SKILL.md

Install
npx -y skills add BioTender-max/awesome-bio-agent-skills --skill phee

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.7 KB, 677 tokens by cl100k_base, as published. Nobody here has run it

PHEE Query Skill

Search PHEE annotated pharmacovigilance events by drug name, adverse effect, or free text. Substring matching is case-insensitive across all event fields.

Input PatternMatch Logic
drug name (e.g. phenytoin)substring on drug, treatment, combination_drug, and text
adverse effect (e.g. hepatotoxicity)substring on effect, treatment_disorder, and text
any other textsubstring on all event fields and full sentence

API

FunctionInputReturns
load_phee(data_dir)directory pathlist[dict] (cached)
search(records, entity)single entity stringlist[dict]
search_batch(records, entities)list of entity stringsdict[str, list[dict]]
summarize(hits, entity)hit list + labelcompact text (sentence count, ADE/PTE counts, top drugs & effects)
to_json(hits)hit listlist[dict]

Record Schema

Each record returned by search:

{
  "id": "8908396_3",
  "text": "A 52-year-old Black woman on phenytoin therapy ...",
  "split": "train",
  "events": [
    {
      "event_type": "Adverse_event | Potential_therapeutic_event",
      "trigger": ["developed"],
      "subject": ["A 52-year-old Black woman ..."],
      "subject_age": ["52-year-old"],
      "subject_gender": ["woman"],
      "subject_race": ["Black"],
      "subject_population": [],
      "subject_disorder": ["post-traumatic epilepsy"],
      "treatment": ["phenytoin therapy ..."],
      "drug": ["phenytoin"],
      "dosage": [],
      "freq": [],
      "route": [],
      "duration": [],
      "treatment_disorder": ["post-traumatic epilepsy"],
      "combination_drug": [],
      "effect": ["transient hemiparesis"]
    }
  ]
}

Usage

See if __name__ == "__main__" block in 38_PHEE.py for runnable examples covering: single drug search, single effect search, batch search, and JSON output.

Data

  • Source: PHEE dataset (Zenodo record 7689970), EMNLP 2022
  • Files: train.json (~2,900 sentences), dev.json (~960), test.json (~960)
  • Path: DATA_DIR variable in 38_PHEE.py (resources_metadata/drug_nlp/PHEE/data/json)
  • Event types: Adverse_event, Potential_therapeutic_event
  • Main arguments: Subject, Treatment, Effect
  • Sub-arguments: Subject (age, gender, race, population, disorder); Treatment (drug, dosage, freq, route, duration, disorder, combination.drug)

What ships with it: 5 files

19.7 KB alongside SKILL.md, 4 of them executable

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.