Offline · Agentic · Context-Aware
📊 Presentation Slides · 🤗 Live Demo
Lost in the wilderness with no signal? One wrong mushroom can kill you in 6 hours. AI Or Die identifies potentially lethal wild species from a photo and issues a survival verdict — no internet required.
Wi-Fi covers only ~20% of the Earth's land surface. Emergencies happen in the other 80%.
Built at Mistral AI Hackathon 2025.
Photo + Location Context (image · GPS · season · environment)
↓
Fine-tuned Ministral-3B ←→ Local species_db (offline JSON)
[TOOL_CALLS]
↓
🟢 SAFE / 🔴 DO NOT EAT / 🚨 EMERGENCY
The model is trained not to memorize species facts, but to call the right tool, interpret the DB result, and issue the correct warning. Facts live in a structured local DB — zero hallucination.
| Approach | Problem |
|---|---|
| Fine-tune for knowledge | Hallucination — model invents facts |
| Cloud API (GPT-4, Gemini) | Needs internet — fails in the wilderness |
| Fine-tune for agentic behavior + local DB | ✅ Reliable facts. ✅ Works offline. |
- Base: Ministral-3B
- Method: QLoRA (4-bit NF4), r=32, alpha=32
- Trained on: 1,394 agentic tool-calling conversations
- HF repo: Yongtae723/survive-or-die-lora
species_db_lookup(species_guess, category, confidence)
emergency_protocol(species_guess, category, time_since_ingestion)
nearby_species_search(latitude, month, altitude_m, environment)
iNaturalist (7,900+ images) Google Gemini 2.5 Flash
↓ ↓
5 mushroom species species_db.json
(one per safety category) (toxins · habitat · range)
↓
Rule Engine (verdict logic) + LLM (natural language)
↓
train.jsonl — 1,394 samples (1,172 / 108 / 114)
↓
Ministral-3B Fine-tuning
Species used for training:
| Species | Category |
|---|---|
| Amanita phalloides | LETHAL (Death Cap) |
| Amanita muscaria | DO_NOT_EAT (Fly Agaric) |
| Flammulina velutipes | CONFUSING (Enoki — wild has lethal lookalikes) |
| Lentinula edodes | CONDITIONAL_SAFE (Shiitake) |
| Hericium erinaceus | SAFE (Lion's Mane) |
3-way comparison (Gemini 2.5 Flash Lite vs Base Ministral-3B vs Fine-tuned) on 75 test samples via W&B Weave:
| Metric | Gemini Flash Lite | Base Ministral-3B | Fine-tuned |
|---|---|---|---|
| Safety recall (lethal cases) | moderate | low | ↑ highest |
| Species exact match | moderate | low | ↑ highest |
| Tool call accuracy | n/a | n/a | ~high |
├── src/
│ ├── app/ # Gradio demo app (HF Spaces)
│ ├── data-prep/ # Training data pipeline
│ ├── train/ # QLoRA fine-tuning
│ └── eval/ # Weave 3-way evaluation
├── notebooks/ # Colab inference + eval notebook
└── requirements.txt
"If in doubt, don't eat."
- Lethal species → absolute refusal, no exceptions
- Species with dangerous lookalikes → DO NOT EAT even if edible
- Unknown species → DO NOT EAT
- Emergency ingestion → skip identification, trigger emergency protocol immediately