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 an OpenFEMA Coastal Surge Claim Evidence Compiler

Format
Code-aware
Lines
81
Sections
11
Linked challenge
Build an OpenFEMA Coastal Surge Claim Evidence Compiler

Prompt source

Original prompt text with formatting preserved for inspection.

81 lines
11 sections
No variables
1 code block
## Build
Correlate maritime port property loss claims against historical OpenFEMA disaster declarations and flood incident reports. Validate incident dates and county eligibility to prepare clean dossiers for independent claim adjusters.

## User
Marine Insurance Claim Preparer

## Workflow
1. Receive commercial property claim metadata including loss date, damage scope, and county.
2. Dispatch OData query to OpenFEMA DisasterDeclarationsSummaries for the designated state and county.
3. Check temporal alignment between asserted loss dates and official declared incident windows.
4. Assemble structured claim validation packages highlighting verified disaster numbers and inconsistencies.

## Interface
Next.js claims portal featuring declaration verification timelines and exportable evidence packages.

## Data
Query live OpenFEMA API endpoints with fallback to local mock JSON responses.
Starter examples below are synthetic. They are not downloaded records.

## Source
[FEMA OpenFEMA](https://www.fema.gov/about/openfema/api)
Use OpenFEMA query syntax with $filter ge/le date operators and incidentType matching.

## Tools
dspy, httpx, pydantic.
DSPy compiles robust prompt pipelines to extract and cross-reference loss narratives with FEMA dates.
Instruction-tuned LLM capable of strict schema-compliant evidence synthesis.

## 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
- Parses ISO-8601 incident dates correctly from OpenFEMA records.
- Detects claim loss dates falling outside official disaster declaration intervals.
- Generates clean claim dossier with FEMA disaster number reference.

## Starter Examples
```json
[
  {
    "input": {
      "claim_id": "CLM-HURR-991",
      "county": "Galveston",
      "state": "TX",
      "loss_date": "2024-07-08T14:00:00Z",
      "fema_declarations": [
        {
          "disasterNumber": 4798,
          "incidentBeginDate": "2024-07-05T00:00:00.000Z",
          "incidentEndDate": "2024-07-12T00:00:00.000Z",
          "designatedCounty": "Galveston"
        }
      ]
    },
    "expected_output": {
      "claim_id": "CLM-HURR-991",
      "disaster_number": 4798,
      "temporal_alignment": "VALID_WITHIN_INCIDENT_WINDOW",
      "county_eligible": true,
      "claim_preparation_status": "READY_FOR_ADJUSTER"
    }
  },
  {
    "input": {
      "claim_id": "CLM-HURR-992",
      "county": "Harris",
      "state": "TX",
      "loss_date": "2024-08-15T10:00:00Z",
      "fema_declarations": [
        {
          "disasterNumber": 4798,
          "incidentBeginDate": "2024-07-05T00:00:00.000Z",
          "incidentEndDate": "2024-07-12T00:00:00.000Z",
          "designatedCounty": "Harris"
        }
      ]
    },
    "expected_output": {
      "claim_id": "CLM-HURR-992",
      "disaster_number": null,
      "temporal_alignment": "OUTSIDE_DECLARED_INCIDENT_WINDOW",
      "county_eligible": true,
      "claim_preparation_status": "FLAGGED_DATE_MISMATCH"
    }
  }
]
```

## Safety
Does not approve or deny claims; prepares organized evidence packages for certified human adjusters.
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.