💡 The Inspiration
If you talk to any physician today, their biggest complaint isn't the medicine—it's the software. Doctors spend an average of 16 minutes per patient scrolling through fragmented Electronic Health Records (EHRs), trying to piece together a patient's history. With the sheer volume of clinical data, it is incredibly easy to miss a subtle drug interaction or an overdue preventive care screening.
We realized that simply passing giant walls of clinical text to a standard LLM wasn't the solution; medical data isn't a text document, it's a deeply connected web of events. We needed an architecture that could reason spatially over a patient's life to reduce physician cognitive load and catch fatal errors before they happen.
🏗️ What We Built (Agentic AI Track)
MedGraph AI is an autonomous clinical intelligence platform that converts static medical records into a live, spatial Knowledge Graph. Instead of forcing doctors to click through endless tabs, our Voice-driven Copilot allows for seamless, hands-free patient data ingestion.
Once the data is ingested, MedGraph deploys an ecosystem of 7 autonomous AI Agents that simultaneously traverse the patient's graph to identify dangerous drug interactions, calculate risk assessments, and match the patient with global experimental clinical trials.
🧠 How It Works & The Jac Architecture
We built MedGraph specifically to showcase the true power of Jac and its spatial-object programming primitives. We utilized the following Jac/Jaseci features:
- Nodes & Edges: When a patient is inputted, the system dynamically generates
Patient,Condition,Medication, andLabnodes, connecting them via relational edges. - Walkers (Autonomous Agents): We didn't build one monolithic, brittle prompt. We built 7 highly specialized Jac
walkerdefinitions (e.g.,DrugInteractionWalker,TrialMatchWalker). - Spatial Traversal: When the user hits "Initialize", these walkers literally traverse the graph. The
DrugInteractionWalkertravels strictly along the edges connectingMedicationnodes to reason about counter-indications, while thePreventiveCareWalkerevaluates theLabnodes.
💥 What Broke & The Challenges We Faced
What Broke: In our early builds, orchestrating 7 simultaneous LLM calls created a massive bottleneck, crashing our frontend. Furthermore, the agents occasionally hallucinated JSON structures when they couldn't traverse the graph fast enough.
The Fix: We engineered a robust asynchronous Python proxy layer utilizing ThreadPool execution for the Jac agents. We also enforced strict JSON parsing schemas and fallback mechanisms to ensure the UI always receives mathematically sound, clinical-grade data, even during network timeouts.
😲 What Surprised Us
We were genuinely blown away by how much more accurate an LLM becomes when you force it to reason via a Graph (using Walkers) rather than forcing it to read a giant text prompt. By isolating the context to specific spatial nodes, the LLaMA-3.3 70B model caught complex, multi-hop drug-disease interactions (like NSAID-induced renal stress in diabetic patients) that traditional rule-based EHR systems routinely miss.
🚀 What's Next for MedGraph AI
Our next step is integrating FHIR/HL7 interoperability standards so MedGraph can automatically map and pull real-time data directly from legacy systems like Epic and Cerner. We also plan to equip the Walkers with a persistent Vector Memory bank, allowing them to autonomously ingest and retrieve the latest medical journals daily.
Built With
- groq
- jac
- jaseci
- javascript
- llama-3
- python
- tailwind-css
- vis.js
Log in or sign up for Devpost to join the conversation.