Back to Prompt Library
implementation
Build the application
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Build a Multi-Crop Drought Resilience Seed Shift Simulator
Format
Code-aware
Lines
78
Sections
11
Linked challenge
Build a Multi-Crop Drought Resilience Seed Shift Simulator
Prompt source
Original prompt text with formatting preserved for inspection.
78 lines
11 sections
No variables
1 code block
## Build
Model agricultural yield sensitivity under ERA5 heat and precipitation deficits across multi-crop cooperatives. Formulate adaptive seasonal crop transition plans to mitigate drought exposure.
## User
Cooperative Agronomy Planner
## Workflow
1. Load multi-parcel baseline crop distributions, expected yield curves, and drought tolerance limits.
2. Retrieve historical ERA5 2-metre temperature and total precipitation records using cdsapi queries.
3. Simulate projected cooperative revenue under severe 90-day dry spell conditions across crop mixes.
4. Synthesize an acreage transition schedule shifting vulnerable acreage toward drought-tolerant varieties.
## Interface
Multi-tab browser dashboard presenting baseline versus adapted yield scenarios, revenue trade-off charts, and acreage transfer tables.
## Data
Download representative seasonal ERA5 single-level grib/netcdf files using cdsapi, stored locally as cached parquets for quick test loops.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Copernicus Climate Data Store client](https://raw.githubusercontent.com/ecmwf/cdsapi/master/README.rst)
Queries ERA5 reanalysis datasets via cdsapi specifying 2m_temperature and total_precipitation variables.
## Tools
optuna, cdsapi, numpy, pandas.
Optimizes crop acreage transition weights across parcels to maximize drought resilience while honoring crop rotation constraints.
Fast local or cloud model for explaining mathematical trade-offs in final crop transition reports.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Calculates simulated yield degradation rates under retrieved ERA5 dry season parameters.
- Solves for an acreage transition portfolio that limits simulated catastrophic yield losses below 15%.
- Exports structured contingency plan tables requiring agronomist and board verification.
## Starter Examples
```json
[
{
"input": {
"coop_id": "COOP-MIDWEST-09",
"total_acres": 1000,
"current_mix": {
"maize": 700,
"sorghum": 300
},
"simulated_rain_deficit_pct": 35,
"maize_loss_per_pct_deficit": 0.012,
"sorghum_loss_per_pct_deficit": 0.004
},
"expected_output": {
"coop_id": "COOP-MIDWEST-09",
"baseline_yield_loss_pct": 33.6,
"recommended_mix": {
"maize": 400,
"sorghum": 600
},
"projected_yield_loss_pct": 19.6,
"resilience_gain_pct": 14
}
},
{
"input": {
"coop_id": "COOP-PLAINS-02",
"total_acres": 500,
"current_mix": {
"barley": 500
},
"simulated_rain_deficit_pct": 5,
"barley_loss_per_pct_deficit": 0.008
},
"expected_output": {
"coop_id": "COOP-PLAINS-02",
"baseline_yield_loss_pct": 4,
"recommended_mix": {
"barley": 500
},
"projected_yield_loss_pct": 4,
"resilience_gain_pct": 0
}
}
]
```
## Safety
Calculates simulation scenarios only; does not provide formal seed purchase commitments or financial guarantees.
Use mock external writes. Require human review before any real deployment.Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Hold the task contract and output shape stable so generated implementations remain comparable.
Tune next
Update libraries, interfaces, and environment assumptions to match the stack you actually run.
Verify after
Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.