The problem

Snakebite kills an estimated 81,000 to 138,000 people every year, and about 5.4 million people are bitten (WHO). Most bites happen far from a clinic, and a photo of the snake is often all anyone has. A vision AI that sounds confident and is wrong can do harm, for example by calling a krait "just a wolf snake". For this use, the most important skill of an AI is knowing when not to answer.

What it does

  1. The first screen asks "Has someone been bitten?". If yes, it goes straight to static first-aid text from WHO (move away, remove rings, keep still, get to a health facility; do not cut, suck, or use a tight tourniquet). That text is never AI output and is on every screen.
  2. For a photo check, the user picks a region (South Asia, Sub-Saharan Africa, Latin America). Gemini vision looks at the photo and proposes up to three species from that region's checklist, with its own scores.
  3. Deterministic code, not the model, turns that proposal into exactly one outcome:
  4. Cannot determine (ABSTAIN): on any error, timeout or rate limit, unreadable answer, "none of these", a top score under 60%, or when a WHO-listed species is still a plausible second answer (10% or more).
  5. Potentially venomous: the top answer is on WHO's medically important list for that region.
  6. Not on the WHO list for this region: always with "This is NOT a safety statement. Any bite is an emergency." The tool never says "safe" or "harmless".

How we built it

A static web app (no server, no stored photos). The decision engine is a small pure function with a test for every rule. A copy test scans every user-facing string for "safe" and "harmless" and checks that the first-aid text matches WHO. Gemini is called straight from the browser with the user's own key (kept in memory only). The recorded demo cases replay real model outputs and say so on screen; labelled "Simulate failure" switches show the failure paths. A reproducible benchmark runner is built into the site (Run benchmark): it fetches CC-licensed iNaturalist photos via GBIF, calls the model, and produces the results table.

Results (real, small, honest)

Run on 28 Nov 2026 with gemini-3.1-flash-lite, temperature 0: 56 photos of 28 species (South Asia, Sub-Saharan Africa, Latin America), 118 model calls, none excluded.

  • Right species as top answer: 29/56 (52%) with the regional checklist, 11/56 (20%) with an open question.
  • Photos of WHO-listed snakes flagged (Potentially venomous or Cannot determine) by the full engine: 29/30. Using only the model's top answer, 4 of 30 would have been called "not listed".
  • The price of caution: 10 of 56 photos got "Cannot determine"; 4 of 26 not-listed photos were flagged.
  • 12 of 56 checklist answers were wrong while the model was 0.8 or more confident, which is why no rule trusts one number.
  • 6 repeat runs agreed 6/6.

The demanding case

A real night photo of a krait. The model says wolf snake 85% and krait 10%. Taken at face value that is "not listed". The rules see that a WHO-listed species is still plausible and answer "Cannot determine: treat as potentially venomous, go to a hospital".

Challenges

Making the safety behaviour testable instead of a matter of prompting; getting honest numbers (an early run mixed two model versions and a free-tier daily quota ended it, so we re-ran everything with one model and did not report the earlier run); and keeping the interface calm and beautiful without ever looking like a medical device.

Honest limits

Small test, clean research-grade photos, community identification as ground truth (not a laboratory check), a closed list of species, one model and one run per condition, and model scores that are not calibrated probabilities. It is a research demo of a decision layer. It is not a medical device, not a diagnosis, and not triage. Any snakebite is an emergency.

What we learned

For safety use, "refuse when unsure" has to live in code you can test, not inside the model. Abstaining costs some answers; here it also cut the missed venomous photos from 4 to 1 of 30.

What's next

More species and regions, field-quality photos, WHO category data per species, evaluation with experts, and more languages.

AI disclosure

  • In the product: Google Gemini vision (Gemini API) proposes species in live mode and in the recorded demo cases. Our deterministic code decides the outcome. First-aid text is static WHO guidance.
  • In development: Claude (Anthropic) was used to write and review code, tests and text, with human review of the safety logic and the results.
  • Simulated: only the labelled "Simulate failure" switches. Demo mode replays real recorded model outputs and says so on screen.

Development disclosure

All code, evaluation, UI and write-up were created during the event period (21-28 Nov 2026). Third-party: Three.js, Vite, Vitest (MIT); photos by iNaturalist observers via GBIF (CC licenses, credited in the app and in eval_results.json); WHO guidance text (cited). No code is shared with the author's other projects.

Built With

Share this project:

Updates

Submission history