Disclaimer: This project uses only synthetic examples and does not process real patient data. It is a technical demo, not medical advice or a clinical triage tool.
During the MedGemma Impact Challenge on Kaggle, I designed and built Clinic Inbox Assistant, a focused prototype that turns messy clinical inbox notes into structured, triage‑ready summaries. In this post, I’ll share why I chose this problem, how I used MedGemma inside a single Kaggle notebook, the safety constraints I built in, and what I learned about turning a raw health AI model into something closer to a real‑world workflow.
Project links
- Kaggle writeup & notebook: https://www.kaggle.com/competitions/med-gemma-impact-challenge/writeups/clinic-inbox-assistant-medgemma-impact-challenge
- Demo video (YouTube): https://youtu.be/t-7_SpzPxoc?si=fpkzGIPIA6ISjVUF
- Source code (GitHub): https://github.com/Arul1998/clinic-inbox-assistant2
You can also read Google’s announcement of the MedGemma Impact Challenge here:
https://www.edtechinnovationhub.com/news/google-launches-medgemma-impact-challenge-to-advance-human-centered-health-ai
The problem: messy inbox notes
Every day, clinics receive phone call summaries, portal messages, and nurse notes written in free text. Important details and red flags can hide inside long paragraphs, and someone still has to read everything line by line under time pressure. I wanted a way to turn one unstructured note into a structured, machine‑readable summary that could support triage, without pretending to replace clinical judgement.
The idea: one note in, structured triage out
Clinic Inbox Assistant takes a single free‑text note plus its type (for example, “phone call”, “patient message”, “nurse note”) and produces a structured JSON‑like object describing the situation. The output includes:
- Key symptoms and complaints
- Onset and duration where possible
- Relevant risk factors or comorbidities
- Potential red‑flag indicators
- Suggested urgency bucket (for example, routine, soon, urgent)
- A short natural‑language summary
- A clear disclaimer that this is not real medical advice or triage
This structure is designed so an EHR, rules engine, or downstream workflow could plug it in and build their own logic on top.
Tech stack and MedGemma integration
The entire project runs inside a single Kaggle notebook as required by the MedGemma Impact Challenge. I used:
- MedGemma 4B instruct from Google’s Health AI Developer Foundations collection
- Python for orchestration and formatting
- Simple helper functions to validate input and normalise the JSON‑like output
At the core of the notebook is one carefully designed prompt that:
- Explains the clinical inbox scenario in plain language
- Lists exactly which fields the model should extract
- Defines a strict JSON‑like schema to follow
- Reminds the model to be conservative with red‑flag claims and to default to “unknown” when unsure
Here is a simplified version of the output format:
{
"note_type": "phone_call",
"summary": "Short description in plain language",
"symptoms": [
{ "name": "chest pain", "duration": "2 hours", "severity": "moderate" }
],
"risk_factors": ["hypertension", "smoker"],
"possible_red_flags": ["sudden onset chest pain at rest"],
"urgency": "urgent",
"disclaimer": "This is not medical advice or a real triage decision."
}
The notebook then calls MedGemma with this prompt and the raw note text, parses the response, and prints both a human‑readable summary and the structured object.
Safety, privacy, and “this is not medical advice”
Because this is health‑adjacent, I made safety and privacy explicit goals. The project uses only synthetic examples and does not process real patient data in the notebook. Every output includes a strong disclaimer that this is a prototype and not a replacement for clinical judgement, triage protocols, or emergency services.
In a real deployment, I would expect:
- Proper dataset curation and evaluation with clinicians
- Guardrails for hallucinated red flags or missing critical symptoms
- Integration into existing clinical workflows and EHR systems
- Regulatory and privacy review before touching any real data
For the competition, the goal was to demonstrate a plausible workflow that could eventually be hardened, not to ship a production‑ready medical device.
Lessons from the MedGemma Impact Challenge
The challenge itself is focused on human‑centred, deployable healthcare AI that can run with privacy and edge constraints in mind. Working within a single notebook and model forced me to think more like a product designer than just someone calling an API.
Some key lessons:
- Scope matters: doing one thing well (single‑note triage structure) beats a vague “AI for everything in the clinic” idea.
- Prompt is product: most of the behaviour came from carefully iterating on the prompt and schema, not complex code.
- Explainability wins: a structured JSON‑like output is easier to audit, debug, and plug into other systems than a free‑form paragraph.
- Communication counts: the competition explicitly scores execution and communication, so the writeup and demo video matter almost as much as the notebook.
Even if this project never leaves the notebook, the design pattern of “one unstructured input → structured, auditable output” is reusable in many domains beyond healthcare.
How you can reuse or extend this idea
If you want to experiment with something similar, here are some easy variations:
- Adapt the schema to other clinical documents (for example, discharge summaries, referral letters).
- Use the same pattern for non‑medical inboxes: support tickets, HR requests, or legal notes.
- Add a small rules engine or dashboard on top of the structured output instead of staying in a notebook.
If you build a spin‑off of Clinic Inbox Assistant, I’d love to see how you adapt the schema and safety choices for your own domain.
Top comments (0)