Back

How Zen works

Three Gemma 4 paths. Verbatim wins ties.

Every protocol step Zen speaks is sourced from the public bystander first-aid material of the Red Cross, the AHA, and the WHO. Gemma 4 paraphrases that source for the audience you choose. The path it travels depends on what the network and your browser can do at the moment of the emergency. The verbatim source is the floor under all three.

Source of truth · cached in your browser

The six verbatim Red Cross / AHA / WHO bystander protocols (cardiac arrest, choking, severe bleeding, anaphylaxis, stroke, seizure) ship as a static JSON bundle. The service worker pre-caches the bundle plus voice WAVs for CPR step 3 in five languages on first visit. From that moment on, the emergency coach has a complete, deterministic, network-independent fallback for every step on every path.

PRIMARY PATH

Online · Cloud cross-check

≈ 13–22 s end-to-end

  1. Triage from cached protocol bundle≈ 50 ms
  2. Gemma 4 26B-A4B-it paraphrase≈ 12–21 s
  3. Gemma 4 31B-it audit (parallel)≈ 6–10 s
  4. Audit panel: agree / revise / fallbackverbatim wins ties
MOAT

Offline · On-device Gemma 4 E2B

≈ 4–12 s on M-series, longer on phone

  1. Triage from cached bundle≈ 50 ms
  2. Gemma 4 E2B paraphrase (browser, WebGPU)no network round-trip
  3. No 31B auditor available offlineverbatim is the safety floor
  4. Audit panel: 'on-device · no cross-check'honest disclosure
ALWAYS-ON FLOOR

Offline · Verbatim only

≈ 50 ms

  1. Triage from cached bundle≈ 50 ms
  2. Spoken verbatim Red Cross / AHA / WHO textno LLM at all
  3. Pre-warmed CPR voice WAVs in 5 languagesservice worker cache
  4. Audit panel: 'verbatim-only'always safe

Why verbatim wins ties

A language model paraphrasing a medical protocol can drift on a single token (dropping a number, inverting an order) and that drift can kill a patient. So every path here has the same safety contract: if the paraphraser fails or the auditor disagrees, the spoken text falls back to the verbatim Red Cross / AHA / WHO source. The model adds language fluency and audience-awareness; the medical knowledge stays where it belongs.

Try the architecture live: autorun the toddler-choking flow with the audit panel filling in live. Or open /emergency and tap "Enable Gemma 4 E2B" to download the on-device model. Then turn off your network and watch the offline path take over.