Skip to main content
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 STAC Agricultural Drought Vegetative Loss Assessor

Format
Code-aware
Lines
74
Sections
11
Linked challenge
Build a STAC Agricultural Drought Vegetative Loss Assessor

Prompt source

Original prompt text with formatting preserved for inspection.

74 lines
11 sections
No variables
1 code block
## Build
Quantify vegetation stress over commercial crop fields using multi-temporal STAC Catalog items. Compute vegetation anomaly percentiles across the growing season to assist in agricultural claim evidence preparation.

## User
Agricultural Claims Investigator

## Workflow
1. Ingest field parcel boundaries and historical normal NDVI reference curves.
2. Query STAC API for Sentinel-2 cloud-free Item collections over the target growing cycle.
3. Calculate parcel-level average NDVI and compute seasonal biomass deficit percentages.
4. Assemble an objective crop loss claim evidence report with direct STAC asset links.

## Interface
Web interface displaying parcel NDVI time-series charts alongside thumbnails retrieved from STAC assets.

## Data
Access public STAC APIs for Sentinel-2 COGs (e.g., Earth Search) or load local mock STAC collection directories.
Starter examples below are synthetic. They are not downloaded records.

## Source
[STAC specification](https://raw.githubusercontent.com/radiantearth/stac-spec/master/README.md)
Interrogates STAC Item collections, bounding boxes, and asset links for multispectral bands as specified in STAC standard.

## Tools
anthropic-claude, pystac-client, rasterio.
Claude analyzes complex multi-temporal vegetation anomaly trends and synthesizes objective, structured claim evidence memos.
Hosted Claude API for expert-level interpretation and structured summarization of seasonal crop vigor curves.

## 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
- Queries STAC Items matching parcel geometry and seasonal date range.
- Calculates mean NDVI deficit compared to baseline expected reference value.
- Formats output containing all parent STAC Collection IDs and asset hrefs.

## Starter Examples
```json
[
  {
    "input": {
      "_record_type": "simplified synthetic app record",
      "parcel_id": "PARCEL-KS-771",
      "crop_type": "Winter Wheat",
      "baseline_ndvi": 0.72,
      "stac_observations": [
        {
          "item_id": "S2A_20230501",
          "mean_ndvi": 0.45
        },
        {
          "item_id": "S2A_20230515",
          "mean_ndvi": 0.42
        }
      ]
    },
    "expected_output": {
      "parcel_id": "PARCEL-KS-771",
      "mean_observed_ndvi": 0.435,
      "deficit_percentage": 39.58,
      "loss_evidence_grade": "SUBSTANTIAL_ANOMALY"
    }
  },
  {
    "input": {
      "_record_type": "simplified synthetic app record",
      "parcel_id": "PARCEL-KS-772",
      "crop_type": "Winter Wheat",
      "baseline_ndvi": 0.7,
      "stac_observations": []
    },
    "expected_output": {
      "parcel_id": "PARCEL-KS-772",
      "mean_observed_ndvi": null,
      "deficit_percentage": null,
      "loss_evidence_grade": "NO_OBSERVATIONS"
    }
  }
]
```

## Safety
Vegetative deficit reports are evidence preparation materials and do not constitute formal adjuster appraisal or claim settlement.
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.