cleandataengineering.aiDrug-Safety Agent on Databricks, drawn simply
You are here: Purpose

Drug-Safety Agent on Databricks · Purpose

The job, in plain words

When a medicine is on the market, people report side effects to regulators. Safety scientists read these reports looking for something new: a side effect that shows up with one drug more often than it should. This agent does the routine first look, so the scientist spends time on judgement instead of on counting.

Goes inA drug name and a side effect name
What happensCount the reports; work out whether the pair stands out; see whether the label already warns about it
Comes outA short draft: the numbers, whether it is on the label, what is uncertain, and what to do next

Why this is worth automating. For each pair the scientist pulls report counts, calculates a ratio, searches the drug's label for the side effect, and writes it up. It is careful, repetitive work, and the numbers must be exactly right. That mix is a good fit for an agent that fetches facts through tools and lets code, not the model, do the arithmetic.

Why it is hard to do safely. A draft that sounds like a finding can do harm. If a draft says "this drug causes that condition" and it is wrong, a person may stop a medicine or a company may react. So the agent is built around three rules: every number must equal what a tool returned, the agent never says a drug causes an event, and a person decides everything.

The data is public. Reports come from openFDA's adverse-event database (called FAERS) and drug labels from openFDA. No patient-identifiable data and no company data is used.

Where the agent stopsIt does not file anything with a regulator, does not tell anyone to take or stop a medicine, and does not say a drug causes an effect. Asked to, it refuses in a fixed sentence and offers what it can do instead. See what it will not do.

Look inside