The problem
Java's smallholder corn farmers, mostly in Central and East Java, face growing climate unpredictability. Rainy seasons start earlier or later than historical averages, and planting too early or too late relative to the first rains significantly cuts yields. Most farms are under 2 hectares, and farmers rely on generational knowledge of planting seasons that climate change is making less reliable.
The national weather agency (BMKG) publishes forecasts but not planting recommendations, and agricultural extension services are under-resourced. Nothing bridged weather data and planting decisions for someone without agronomy training.
Prompt design
The quality of the advice depended far more on the system prompt than on the model. The first version produced generic advice:
You are an agricultural assistant. Given weather forecast data, advise on the best time to plant corn.
By the third iteration, the prompt carried local context and a clear output format:
You are an agricultural advisor for smallholder corn farmers in Java, Indonesia. Given a 14-day weather forecast for a specific regency, advise on optimal planting windows. Consider: rainfall onset (>10mm/day for 3 consecutive days signals monsoon onset), soil moisture recovery time, and the risk of planting into a dry spell. Output must be in plain language suitable for a farmer without agronomy training. Provide a recommended planting window, a risk level (low / medium / high), and one sentence of reasoning.
The tool
Farmers choose their province on Java and their crop's current growth stage, such as planting and germination. The tool then shows a 7-day forecast with temperature, rainfall, humidity and growing degree days (GDD), a measure of how much heat the crop accumulates for growth, along with the 7-day GDD total and advice for that stage.
In this prototype, the forecast is simulated from typical wet- and dry-season ranges for Java rather than pulled from a live weather service.
What I learned
Context in the prompt matters more than the model. Local thresholds, like the monsoon onset rule, are what made the advice actionable rather than obvious.
Readable output is a design problem. "14-day precipitation accumulation exceeds 80mm" is accurate but useless to a farmer. The output format is a UX decision, and it lives in the prompt.
Validation against domain standards is essential. Recommendations matched BPTP planting calendars in normal seasons but diverged in years with unusual rainfall, which is a real limitation.
Delivery is the bigger barrier. An accurate predictor only helps if farmers can reach it. Smartphone use in rural Java is growing, but data costs remain high, so SMS or WhatsApp would probably reach more people than a web app.