🌸 Lily: Reimagining Maternal Health

Inspiration

The United States faces a maternal mortality crisis that doesn't belong to a peer nation. While the average maternal mortality rate is 22 per 100,000 live births, Black women die at nearly three times that rate.

In "maternity deserts"—which cover 36% of U.S. counties—the barrier to care is structural. We were inspired by the story of Maria, a mother in rural Mississippi who died of eclampsia because the nearest OB hospital had closed years prior. The thing that would have saved her wasn't a better hospital; it was being seen in the four hours before her seizure. We built Lily to be the medical expert and trusted friend that bridges that four-hour gap.

What it does

Lily is a voice-first, pre-clinical companion accessible via any phone—even a flip phone with no data. She acts as a medical expert, a doula, and a navigator who remembers everything.

  • ACOG-Grounded Triage: Lily uses a deterministic rules engine to classify cases into three tiers: Handle (self-care), Hand-up (physician review), and Hand-off (emergency services).
  • Trend Tracking: She doesn't just listen; she tracks vitals over time to detect pre-eclampsia before it becomes an emergency.
  • Doctor Dashboard: When Lily identifies a "Hand-up" case, she pings a volunteer physician dashboard with a 20-minute SLA, delivering a concise SBAR (Situation, Background, Assessment, Recommendation) packet.

How we built it

We architected a high-concurrency, low-latency voice pipeline with a sophisticated medical reasoning layer:

  • Telephony: Twilio PSTN ensures anyone with a phone number can call Lily for free.
  • The RAG Layer: We implemented a robust Retrieval-Augmented Generation (RAG) layer atop the Anthropic models. This layer uses a ChromaDB vector store containing thousands of pages of ACOG, MedlinePlus, and CDC clinical guidelines. Before speaking, Lily retrieves the exact clinical guidance needed for the reported symptoms—ensuring every response is evidence-based, not just guessed.
  • STT & TTS: We used Deepgram for sub-200ms transcription and ElevenLabs for warm, clinical-grade speech synthesis.
  • Brain: Anthropic Claude 3.5 Sonnet performs deep reasoning over the retrieved context, while Haiku manages rapid classification.
  • Backend: A FastAPI server with an SQLAlchemy (Postgres/SQLite) database manages persistent memory and patient clinical context.

Challenges we ran into

  • Sub-Second Latency: Achieving a natural conversation flow meant the RAG retrieval and Anthropic reasoning had to complete in milliseconds. We optimized the vector search and prompt architecture to hit a round-trip target of $< 800\text{ms}$.
  • Deterministic Safety: LLMs are creative, but medicine must be exact. Our biggest challenge was building a "sandbox" where the AI could be warm and empathetic, but never override the hard-coded clinical rules for escalation.
  • JSON Serialization: Handling complex clinical data snapshots (like vitals with UTC timestamps) required custom serialization to ensure the doctor dashboard updated in real-time without crashes.

Accomplishments that we're proud of

  • Low-Bar Accessibility: We successfully built a system where a mother with a $\$0$ prepaid balance on a 2G flip phone can receive the same quality of evidence-based triage as someone in a Tier 1 hospital.
  • The Triage Lock: We developed a robust "Triage Lock" mechanism—once the rules engine identifies an emergency, the AI is programmatically prevented from de-escalating the situation.
  • Memory Integration: Unlike standard nurse lines that "start from zero," Lily successfully retrieves semantic memories from past calls to detect trends like worsening headaches or rising blood pressure.

What we learned

We learned that Continuity of Care is the most powerful tool in maternal health. Technology is often built for the "power user," but in healthcare, it must be built for the "powerless." We learned that trust isn't built through a sleek UI, but through a voice that remembers your name and grounds every word in medical evidence.

What's next for Lily - Saving not one life but two

Lily is more than a hackathon project; she is a path to survival.

  • Multi-Language Expansion: Moving beyond English and Spanish to include Vietnamese, Tagalog, and Diné Bizaad.
  • Wearable Integration: Automatically pulling HR and $SpO_2$ data from SMS-enabled vitals sensors to detect sepsis risk in real-time.
  • Real E911 Conferencing: Integrating direct 3-way conferencing between Lily, the mother, and local emergency dispatch.
  • Scaling to 10,000 Mothers: Transitioning to a HITRUST-certified cloud infrastructure to serve mothers across every maternity desert in America.

Built With

Share this project:

Updates