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.
Check interactions
Pick two or more drugs and audit every pair. Patient-context risk score with explainable evidence for bleeding, kidney, liver, pregnancy, and more.
Go to checker →Ask the RAG assistant
Type a natural-language question — Porter stemming, ~175-entry synonym expansion, intent detection, BM25 retrieval, cited extractive answer.
Open RAG →Browse the database
Search by name or synonym, open a drug profile, filter its interaction table, or jump to alternative-drug suggestions.
Browse drugs →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.
Patient context
Optional clinical context for explainable risk scoring.
Explainable AI
AI summary
Interaction graph
Food warnings
Shared biology
Alternative suggestions
RAG knowledge assistant
Ask a clinical question about your selected drugs. Answers are grounded in retrieved DrugBank text with citations.
Tip: β/Ctrl + Enter to submit.
Answer
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,metabolisminto 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