Skip to content
S

SafeRx

GraphRAG-Powered Clinical Safety Platform

Created on 15th March 2026

•

S

SafeRx

GraphRAG-Powered Clinical Safety Platform

The problem SafeRx solves

Every year, medication errors harm over 1.3 million people globally. Current healthcare systems face two critical failures:

AI Hallucinations: Generic AI models often 'invent' medical facts, making them too dangerous for clinical use.

Prescribing Cascades: Doctors often treat a new symptom with a second drug, unaware it is actually a side effect of the first.

Existing software flags too many 'minor' risks, causing alert fatigue, while failing to explain if an interaction can be managed simply by Time-Spaced Dosing. We need a system that provides deterministic biological evidence, not just a guess

Challenges we ran into

  1. The "Gated Model" Permission WallThe Hurdle: We initially ran into a 403 Permission Denied error when trying to use Llama 3.3 70B through Featherless.ai. Because it’s a "gated" model, Meta requires a signed license agreement on Hugging Face before the API will grant access.The Solution: We implemented a Dual-Model Strategy. We requested the official license for the high-power 70B model for our final production version, but we immediately pivoted our code to use Llama 3.1 8B as a high-speed fallback. This ensured our development never stopped and taught us the importance of API Permission Management in production AI.
  1. The "Indications Only" Blindspot (The 50% Accuracy Bug)The Hurdle: During our first accuracy audit, the system scored only 50%. It caught obvious drug duplicates (like two blood pressure meds) but missed complex interactions like Aspirin and Warfarin. We realized our Graph was too "shallow"—it only contained "Drug $\rightarrow$ Indication" links.The Solution: We went back to the Data Processing stage and expanded our ontology. We added Proteins, Enzymes, and Biological Targets to our Neo4j filters. By adding these "biological side-streets," we enabled our GraphRAG engine to see the hidden paths that cause bleeding risks, pushing our accuracy toward 100%.
  2. The "Silent Failure" Ingestion BugThe Hurdle: When uploading millions of medical relationships from PrimeKG to Neo4j AuraDB, the connection would sometimes "choke" or timeout, leaving us with a half-empty graph. The worst part was it failed "silently," so the AI would just report "No risk found" because the data was missing.The Solution: We built a Verified Ingestion Pipeline. Instead of one giant upload, we wrote a script to process the data in Batches of 2,000 using the UNWIND command in Cypher. We added a Verification Layer that counts the relationships in the database after every batch. If the count doesn't match our CSV, the system alerts us, ensuring our "Source of Truth" is always complete.
  3. Fuzzy Name Matching (The "Human Error" Hurdle)The Hurdle: In our early tests, if a user typed "aspirin" (lowercase) or "Aspirin-pill," the system returned zero results because Neo4j looks for an exact string match.The Solution: We replaced exact matching with Regex-based Case-Insensitivity (=~ '(?i)' + $drug) and are now implementing a Vector Index within Neo4j. This allows the system to find the "closest" medical node even if there is a typo, making the tool much more usable in a fast-paced hospital environment.

Tracks Applied (1)

HealthTech

SafeRx is a GraphRAG-powered clinical safety platform that anchors AI reasoning in Harvard’s PrimeKG.Deterministic Retri...Read More

Technologies used

Discussion

Builders also viewed

See more projects on Devfolio