Depth — Patient Preparation Assistant

Inspiration

Healthcare doesn't fail people at the diagnosis — it often fails them before they ever walk through the door. 42 million Americans are uninsured, and when they get sick, they face a cascade of unanswered questions: Is this serious enough for the ER? How do I explain what I'm feeling? Could this be a side effect of something I'm already taking?

I come from a pharmacy background before transitioning into computer science, and this problem felt personal. I've watched patients struggle to articulate their symptoms under pressure and seen how much time gets lost on both sides of the exam table. Depth was built to fix that gap — not by replacing the doctor, but by making sure patients show up prepared and physicians can hit the ground running.

The guiding philosophy is what medical ethicists call the "brilliant friend" model: not a clinician giving a diagnosis, but a knowledgeable friend helping you understand your own situation well enough to make an informed decision. That framing shaped every feature decision we made.

What It Does

Depth is a conversational AI health navigator that guides patients through a structured symptom intake and produces three outputs:

  1. A clinical summary in SOAP note format a physician can read in seconds
  2. A triage recommendation across three urgency levels:
    • 🔴 URGENT — Seek emergency care immediately
    • 🟡 SOON — Schedule an appointment within 1–3 days
    • 🟢 HOME — Likely manageable at home
  3. Contextual adverse reaction flagging — when reported symptoms match known adverse reactions to current medications, Depth surfaces that connection in plain language

Depth does not diagnose or prescribe. Every output includes an explicit disclaimer directing users to consult a licensed medical professional. When severity is ambiguous, the system is calibrated to escalate — we would always rather send someone to a doctor unnecessarily than suggest they stay home when they shouldn't.

How We Built It

  • Google Gemini API (gemini-2.5-flash) powers the full conversational agent — multi-turn intake, SOAP summary generation, triage reasoning, and adverse reaction detection via function calling
  • Human Delta serves as the RAG backbone, indexing MedlinePlus and FDA documentation so responses are grounded in NIH and FDA sourced content rather than model memory alone
  • OpenFDA + RxNorm provide the drug data layer — RxNorm normalizes medication names to standard identifiers, OpenFDA surfaces known adverse event records
  • FastAPI handles the backend agent loop and external API orchestration
  • React + Vite on the frontend with a deep sea aesthetic — deep navy, bioluminescent cyan accents, and a sonar animation while the agent processes

Triage logic deserves a callout: rather than keyword matching, Gemini reasons over the combination of symptom type, duration, severity, and patient context. A chest pain lasting 3 hours reads differently than one that appeared this morning, and the model handles that distinction. Adverse reaction flagging is contextual — we only surface a medication connection when symptoms have a meaningful match to known reactions, avoiding false alarm fatigue.

Challenges We Ran Into

Prompt engineering for clinical accuracy was the hardest problem. Getting Gemini to ask one question at a time, stay in character, and transition cleanly between intake, summary, and triage stages required significant iteration. Early versions rushed to triage before collecting enough information, or produced summaries too verbose to be clinically useful.

Holding the ethical line under time pressure required constant attention. Every feature decision ran through the same filter: are we preparing the patient or are we practicing medicine? That question shaped the triage copy, the disclaimer placement, and the decision to frame all outputs as recommendations rather than conclusions.

Scoping honestly was the third challenge. We had four modules planned and made the deliberate call to cut the clinic finder and narrow the medication module to contextual adverse reactions only. Shipping two things that work well beats four things that almost work.

Accomplishments That We're Proud Of

Getting the triage reasoning to feel genuinely clinical rather than mechanical was the thing we're most proud of. We tested against three case studies — community acquired pneumonia, a UTI in a diabetic elderly patient on Warfarin, and a minor tension headache — and Depth correctly differentiated all three without keyword shortcuts. The UTI case in particular requires real reasoning: it's not an emergency, but it's not manageable at home either, and the patient's age, diabetes, and worsening trajectory over three days all factor into that call.

We're also proud of the RAG grounding. Gemini reasoning over indexed FDA and NIH content produces responses that feel qualitatively different from a general-purpose prompt — more precise, more citable, and easier to trust in a domain where trust matters.

What We Learned

Grounding an LLM in authoritative sources changes the character of its outputs in ways that matter for high-stakes domains. We also learned that the hardest part of building an AI health tool isn't the AI — it's the judgment calls around what it should and shouldn't do, and having the discipline to hold that line.

The "asking a knowledgeable friend" model is underrated as a design constraint. It gave us a clear answer every time we were unsure whether a feature belonged: would a brilliant friend who happened to be a doctor say this at a dinner party? If not, Depth shouldn't say it either.

What's Next for Depth

  • Clinic finder — surface nearby FQHCs for uninsured users using the HRSA free clinic API, which was cut for time but is fully designed
  • Full medication interaction checking — expand beyond adverse reaction flagging to cross-reference drug-drug interactions for suggested OTC remedies against current prescriptions
  • Provider-facing dashboard — give physicians a queue view of incoming patient summaries before appointments
  • Multilingual support — the uninsured population Depth serves is disproportionately non-English speaking; Spanish support is the obvious first expansion
  • Voice intake — removing the typing barrier entirely for elderly or low-literacy users

Built With

Share this project:

Updates