
The problem
Rainfed maize farmers in the Toluca valley live with more than 100 frost days a year; in 2019 frost hit 3,511 ha of rainfed maize in the Toluca district alone. The free regional forecast runs ~1.5 °C warm at weather stations and catches 1 in 4 frost nights. And once a crop is lost, the state program PASACME gives farmers 10 calendar days to report it.
What I built
We built it as a team (SysCallOx4, 4 people) for the World Bank's Small AI for Development challenge at Hack-Nation, October 3 to 4, 2026, in the Agriculture sector. We placed 4th in the Mexico hub.
Within the team I focused on:
- The problem statement in the format the challenge required, with the evidence behind it and the rule of not claiming skill away from a weather station.
- The five-part video script, with timings, shots and sources, and the recording run sheet: who presses what, and when.
- The English version of the team repository's README.
- Testing the app on a phone, including airplane mode, and reaching out to farmers for the field shoot.
What the team's system does:
- A 372 KB LightGBM model corrects tonight's forecast for each parcel using what weather stations have measured, and gives a calibrated chance of frost. The farmer hears it as a Spanish voice note on WhatsApp.
- The same model, ported to JavaScript, runs on the phone with no signal.
- A fixed rule decides the alert (chance of frost ≥ 30%). When data is missing, the answer is «No estoy seguro, pregunte a su técnico» (I'm not sure, ask your technician), with no temperature.
- After a loss, a voice note and photos become a PDF evidence packet for PASACME, using speech to text (faster-whisper) and Spanish rules. Helada never decides eligibility.
- The backend runs on FastAPI, SQLite and a hash-chained audit log, and deploys to AWS with CDK as two stages, dev and prod, from a single pipeline.
Architecture
Results
These are the team's results, from the model backtest. For each method the alert threshold is set so that only 5% of frost-free nights get an alert, and then the frost nights caught are counted.
| Where | Night minimum error (forecast → Helada) | Frost nights caught |
|---|---|---|
| Parcel near a station: 2025-26 season, held out of training; 39 stations, 5,855 station-nights, 503 with frost | 2.65 → 1.40 °C | 24.3% → 57.9% |
| Parcel with no station nearby: 80 held-out stations | 2.83 → 2.32 °C | 32.1% → 32.4% |
Near a station the model adds real skill. Away from one it removes the warm bias but doesn't detect frost any better than the default forecast. The repository reports 2,274 passing tests: 2,216 for the app, 33 for the model and 25 for the infrastructure. All three demos are live.
Known limits
- The model's skill only holds near SMN stations, and only 2 frost seasons of forecast archive exist to train and evaluate on.
- Speech to text was tested on 12 synthetic voice notes, not on real farmers.
- WhatsApp Business sending was not tested on a live account, the dashboard has no sign-in, and the advice table is not yet signed by an agronomist.
- It is a team project: my part focused on the problem, the story and the phone testing.

