DrugBank explainable RAG

Local-first drug interactions with cited evidence.

Pharos checks every interaction pair, scores patient-context risk with full evidence trails, and answers natural-language clinical questions via a local NLP + BM25 pipeline. No external APIs, no model downloads — the answer is always grounded in DrugBank.

-- drugs
-- interactions
-- food warnings

Interaction checker

Add two or more medicines to check every interaction pair.

Select at least two drugs.

Your interaction results will appear here.

Automated prescription audit

Paste one medicine per line. The app will match drugs, fill the checker, and run the interaction audit.

No audit run yet.

AI risk intelligence

Run an interaction check to generate graph, patient-context, food, and mechanism insights.

Local AI

Patient context

Optional clinical context for explainable risk scoring.

Patient risk score

Select context chips, then run an interaction check.

Explainable AI

Evidence trace will appear here after scoring.

AI summary

No analysis yet.

Interaction graph

No graph yet.

Food warnings

No selected-drug food warnings yet.

Shared biology

No shared target, enzyme, or category signals yet.

Alternative suggestions

Select a drug to see related alternatives.

RAG knowledge assistant

Ask a clinical question about your selected drugs. Answers are grounded in retrieved DrugBank text with citations.

Local RAG Β· BM25

Tip: ⌘/Ctrl + Enter to submit.

Answer

Select drugs above, then ask a question. The retriever indexes the selected drugs' DrugBank fields on every query.

Browse interactions

Select a drug from your list, then filter its interaction table.

No drug selected yet.

About Pharos

Pharos is a local-first drug-drug interaction tool powered by a DrugBank SQLite database. It checks every selected pair, audits prescription lists, scores patient-context risk with explainable evidence trails, and answers natural-language questions through a local NLP + BM25 retrieval pipeline.

The NLP layer

  • Porter stemmer — folds metabolize, metabolized, metabolic, metabolism into one stem.
  • ~175-entry synonym lexicon — bridges lay vocabulary (blood thinner, painkiller, sleepy) to DrugBank's clinical terms.
  • Intent detection — recognises pair-interaction, adverse-event, and CYP intents and injects domain vocabulary into the BM25 query.
  • Pair-intent guarantee — ensures the best Pair interaction chunk lands at position #1 when the user asks about co-administration.
  • Description fallback — even if retrieval misses, you always get a useful citation.

The explainable risk scorer

  • Scans DrugBank fields (description, indication, pharmacodynamics, mechanism, toxicity, metabolism, absorption, half-life, elimination, food + pair interactions).
  • Matches eight patient contexts: older adult, pregnancy, kidney disease, liver disease, bleeding risk, diabetes, hypertension, alcohol use.
  • Boosts score with high-attention language: contraindicated, fatal, severe, toxicity, increased risk.
  • Every signal includes the matched terms, source field, and a citable evidence excerpt — nothing is a black box.

Important disclaimer

Pharos is a research and educational decision-support tool. It is not a medical device, does not provide medical advice, and should not be used as a substitute for professional clinical judgment.

DrugBank content requires appropriate licensing. The database is obtained separately under your own DrugBank agreement and is never redistributed by this project.

Stack

  • Python standard library HTTP server
  • SQLite DrugBank export
  • Vanilla HTML / CSS / JavaScript (no build step)
  • Source: github.com/aakri0/Pharos