Why AI, and not just a form?
LifeLine+ is submitted under the AI4I Development track. The Challenge explicitly penalises 'AI as a label'. This page documents where AI is doing real work and where simpler logic is deliberately used instead.
The three problems AI solves here
A patient can upload a photo of a wound or a short video. A rules engine cannot judge if a burn is second- or third-degree; Gemini vision can, and it feeds that observation into the severity score.
Patients describe symptoms in English, Shona and Ndebele, often mixing languages. Keyword matching misses 'inhliziyo iyaphimisela' but the model reads intent, negation and colloquialisms.
Hospitals receive a clinical summary, red flags and recommended specialty in English, generated from the patient's local-language description. That translation-plus-summarisation task is what LLMs do best.
How the AI pipeline works
The patient describes symptoms by text or voice, selects tags, and optionally uploads photos or video.
Vision layers describe wounds, rashes, swelling or breathing effort from the uploaded media.
The model weighs red flags, pain level, age and history against a clinical severity rubric.
A SQL query ranks hospitals by distance, specialty and beds. AI does not replace this step.
A structured report is generated for the receiving hospital: severity, red flags, first aid given, allergies and recommended specialty.
Rules-only vs LifeLine+ (side by side)
| Task | Rules / SQL baseline | LifeLine+ with AI |
|---|---|---|
| Assess a wound from a photo | Impossible - no visual understanding. | Gemini vision reads bleeding, swelling, depth and colour into the severity score. |
| Understand Shona/Ndebele free text | Requires per-phrase keyword lists that break on typos or code-switching. | Handles negation, mixed languages and colloquialisms out of the box. |
| Generate a clinical hospital handoff | Templated string with slot-filling - no reasoning about what the ED needs to know. | Structured English report with red flags and specialty, ready for the receiving team. |
| Real-time first-aid guidance | Static decision tree, hard to keep current across every symptom combination. | Instructions tailored to the exact reported symptoms and history in the patient's language. |
Where we deliberately do NOT use AI
- Hospital ranking is a scored SQL query over haversine distance, specialty match and bed availability - no model needed.
- Status transitions (dispatched, en_route, arrived) are a plain state machine.
- Offline fallback triage is rule-based on-device, so a patient still gets a severity band when the AI Gateway is unreachable.
Google Gemini 3.6 Flash via the Lovable AI Gateway. Chosen for native vision, sub-2s latency and multilingual coverage of Bantu languages.
Only the current SOS payload: selected symptom tags, free-text description, pain score, age, optional photos/video frames. No training on patient data, no PII shared beyond the active request.
Under 2 seconds for text triage; under 6 seconds for multimodal assessment with one image.
Temperature 0.3 with a strict Zod JSON schema to constrain output and reduce hallucination.
Safety & guardrails
AI recommends; dispatchers and hospital staff decide. The handoff is a decision-support document, not a diagnosis.
Critical cases are flagged immediately and bypass the queue so they reach the nearest capable hospital first.
Every model response is validated against a typed Zod schema before it reaches the patient or hospital UI.
If the AI Gateway is unreachable, a deterministic rule-based triage runs on-device so the patient is never left without guidance.
What happens when the AI is unreachable?
If the network drops or the AI Gateway is rate-limited, LifeLine+ falls back to a deterministic, on-device rule-based triage. The result is clearly labelled as offline triage, and hospital staff re-assess on arrival. The app keeps working even when connectivity does not.