Inspiration:

Sepsis kills 350,000 adults per year in the US. Every hour of delayed antibiotics raises mortality by 4-8%. The brutal part: early sepsis looks exactly like "expected post-surgical recovery," low-grade fever, mild tachycardia, and slight BP changes. Nurses see it, chart it, rationalize it. By the time it's undeniable, the intervention window is gone.

We wanted to build a system that catches what humans rationalize away.

What it does:

A clinical dashboard that layers AI-powered sepsis detection on top of standard vitals monitoring. For each patient, the system:

  • Tracking vitals over 24h and detects co-trending patterns (temp and heart rate rising together over hours, not just single abnormal readings)
  • Runs an ML sepsis risk scorer (Random Forest trained on synthetic trajectories informed by PhysioNet 2019 sepsis data)
  • Feeds vitals, nurse notes, and ML score into a Gemini-powered diagnostic agent that returns a structured differential diagnosis, recommended labs, and suggested interventions
  • Surfaces a "Clinical Intelligence" panel showing sepsis risk score, AI diagnosis, and an alert timeline

The demo case: Jacob Smith is post-op day 2 from an appendectomy. His nurse charted "expected post-surgical fever." Our system flagged his sepsis risk at 82% and recommended blood cultures three hours before the nurse would have escalated due to detected temp and heart rate co-trending upward over 12 hours with early MAP narrowing.

How we built it

Four services built over 24 hours:

  1. Frontend: React dashboard with hardcoded patient fixtures for the demo. Vitals chart, prediction panel, clinical intelligence panel with full diagnostic display. Deployed on Vercel.
  2. Bridge API: FastAPI on port 8001. Proxies between frontend and backend, builds time series, logs calls. Seeds 6 demo patient trajectories on startup.
  3. Backend: FastAPI on port 8000. Ingests vitals, orchestrates ML scoring and agent calls, broadcasts WebSocket alerts when sepsis score crosses threshold.
  4. ML Model: scikit-learn RandomForestClassifier. 11 features (HR, SBP, DBP, Temp, Resp, SpO2, MAP, shock_index, plus 3h deltas). Trained on 400 synthetic patient trajectories. Outputs a 0-1 sepsis probability score.
  5. Diagnostic Agent: Google Gemini. Two-pass architecture: draft diagnosis → critique pass → merged output. Takes vitals history, nurse notes, and ML score as input, returns structured JSON with differential diagnosis, recommended actions, risk level, and confidence.

Challenges we ran into

  • Wiring the full pipeline to the hosted frontend in time. The ML and Gemini pipeline runs locally, but we couldn't deploy the Python services within the hackathon window. The Vercel demo runs on hardcoded snapshots of real pipeline output.
  • Getting synthetic training data that produces realistic sepsis trajectories without access to real patient data during the hackathon.
  • Balancing the agent's diagnostic output; too conservative and it flags everything, too aggressive and it misses the subtle cases that are the whole point.

Accomplishments that we're proud of

  • The Gemini agent actually produces clinically coherent differential diagnoses with the two-pass draft/critique architecture
  • The ML model correctly scores stable patients low (0.06-0.12) and septic patients high (0.82). Good specificity matters as much as sensitivity
  • The frontend tells a real clinical story, not just numbers on a screen

What we learned

  • Sepsis detection is fundamentally a pattern-over-time problem, not a threshold problem. No single vital reading is diagnostic; it's the co-trending that matters.
  • Two-pass LLM architectures (draft and self-critique) produce meaningfully better structured output than single-pass, especially for medical reasoning.

What's next for Sepsis Early Warning System

  • Deploy the full backend pipeline (ML and Gemini) so the hosted demo runs live inference instead of fixtures
  • Train on real PhysioNet 2019 data instead of synthetic trajectories
  • Add the nurse notes input flow so the agent gets real clinical context, not just vitals

Built With

Share this project:

Updates