How Sombra decides
Sombra's agents decide when and where each crew works from the hourly heat forecast and California's heat law, and our own classifier learns to spot heat illness from a worker's words in Spanish, Punjabi or English.
Three layers
- Agents draft. Cielo reads the weather, Ley explains the law, Crítico tries to break the plan, Cuadrilla rebuilds the day, Voz writes the briefings, Medic gives a second opinion on check-ins.
- Code decides. A deterministic rules engine checks every plan against Cal/OSHA thresholds. A plan that breaks a rule can't be sent; if the agents miss something, the engine fixes it.
- Our model listens. When a worker checks in by voice, our classifier labels it ok, warning, heat exhaustion or emergency. Emergency keywords always escalate, and Medic can raise the label but never lower it.
Model card: sombra-triage v1
- Model
- Character n-gram TF-IDF (2–4) + logistic regression (scikit-learn), balanced class weights
- Why this model
- Character n-grams handle Spanish, Gurmukhi Punjabi, Spanglish and typos without a tokenizer per language; tiny enough to run anywhere
- Labels
- ok · warning · heat_exhaustion · emergency (CDC/NIOSH categories)
- Data
- 430 training sentences; 40 test sentences written by hand
- Results
- Accuracy 0.8 · macro F1 0.799 · emergency recall 0.8
- Limits
- Small dataset; it reads words, not vital signs. It supports a crew boss and never replaces calling 911. We also trained a v2 with 150 extra off-topic sentences: same accuracy, but emergency recall fell from 0.80 to 0.70, so we kept v1 and route off-topic messages with the AI and a confidence gate instead.
- Privacy
- Worker IDs only, no names; no audio stored; plans and check-ins expire after 2 days

Credits
- Agent models
- Anthropic Claude Sonnet 5.5 or Google Gemini 3.8 Flash (whichever is configured), called from our server
- Weather
- Open-Meteo forecast, ERA5 historical archive and air-quality APIs (CC BY 4.0)
- Map
- MapLibre GL, OpenFreeMap tiles, © OpenStreetMap contributors
- Heat math
- Stull (2011) wet-bulb formula; ISO 7243 WBGT weighting; ACGIH-style action levels
- Rules
- Cal/OSHA Title 8 §3395 (heat illness) and §5141.1 (wildfire smoke); CA Labor Code 226.2 (paid rest)
- First aid
- CDC/NIOSH heat-related illness guidance
- Training data
- Sentences generated with Google Gemini from CDC/NIOSH symptom lists and hand-checked; test set written by our team
- Libraries
- Next.js, React, Tailwind CSS, scikit-learn, pandas, matplotlib, qrcode.react
- Tools
- Claude Code helped write the app code; Google Colab for training; design skills frontend-design (Anthropic), taste-skill (Leonxlnx), transitions.dev (Jakub Antalik)