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 Cold-Store Equipment Breakdown and Liability Analyzer

Format
Code-aware
Lines
110
Sections
11
Linked challenge
Build a Cold-Store Equipment Breakdown and Liability Analyzer

Prompt source

Original prompt text with formatting preserved for inspection.

110 lines
11 sections
No variables
1 code block
## Build
Analyze temperature telemetry logs and maintenance records for port cold-store facilities. Identify mechanical equipment breakdowns, evaluate thermal excursions, and generate verified liability dossiers using OpenAttestation wrappers for facility loss attribution.

## User
Cold-chain claims surveyor and cargo assurance officer

## Workflow
1. Ingest facility cold-store temperature telemetry and scheduled maintenance logs.
2. Identify thermal excursion events corresponding to mechanical equipment failures lasting beyond safe thresholds.
3. Wrap equipment failure records and impact assessments into OpenAttestation schemas.
4. Synthesize itemized liability dossiers attributing loss to specific facility segments or contractors.

## Interface
Dashboard mapping facility sensor zones with thermal trends, a maintenance schedule overlay, and a drawer for generating OpenAttestation liability claims.

## Data
Generate synthetic cold-store facility telemetry time-series and maintenance logs, paired with OpenAttestation v2 wrapper templates from source 2.
Starter examples below are synthetic. They are not downloaded records.

## Source
[OpenAttestation](https://raw.githubusercontent.com/Open-Attestation/open-attestation/master/README.md)
Implements OpenAttestation v2 wrapDocument logic for verifiable facility equipment breakdown and liability declarations.

## Tools
langgraph, @govtechsg/open-attestation, pydantic, fastapi.
LangGraph orchestrates the stateful evaluation cycle connecting anomaly detection, maintenance cross-referencing, and OpenAttestation claim wrapping.
Reasoning model capable of cross-referencing sensor logs with maintenance schedules and formatting structured liability schemas.

## 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
- Detects thermal excursions exceeding target temperatures lasting more than three continuous hours.
- Attributes breakdown liability to 'maintenance_contractor' if maintenance is missed, otherwise 'manufacturer'.
- Calculates spoilage risk amount at 10% of inventory value for every full hour of excursion beyond the initial 3 hours.
- Generates valid OpenAttestation v2 wrapped document objects for confirmed equipment failures.

## Starter Examples
```json
[
  {
    "input": {
      "sensor_id": "ZONE-A-01",
      "target_temp_celsius": 0,
      "inventory_value_sgd": 100000,
      "maintenance_status": "missed_scheduled",
      "telemetry_samples": [
        {
          "timestamp": "2025-05-10T10:00:00Z",
          "temp": 5
        },
        {
          "timestamp": "2025-05-10T11:00:00Z",
          "temp": 5
        },
        {
          "timestamp": "2025-05-10T12:00:00Z",
          "temp": 5
        },
        {
          "timestamp": "2025-05-10T13:00:00Z",
          "temp": 5
        },
        {
          "timestamp": "2025-05-10T14:00:00Z",
          "temp": 5
        },
        {
          "timestamp": "2025-05-10T15:00:00Z",
          "temp": 5
        }
      ]
    },
    "expected_output": {
      "breakdown_detected": true,
      "excursion_duration_hours": 5,
      "liable_party": "maintenance_contractor",
      "spoilage_risk_amount_sgd": 20000,
      "oa_claim_wrapped": true,
      "status": "liability_dossier_ready",
      "note": "Simplified synthetic app record"
    }
  },
  {
    "input": {
      "sensor_id": "ZONE-B-02",
      "target_temp_celsius": 0,
      "inventory_value_sgd": 50000,
      "maintenance_status": "up_to_date",
      "telemetry_samples": [
        {
          "timestamp": "2025-05-10T10:00:00Z",
          "temp": 4
        },
        {
          "timestamp": "2025-05-10T11:00:00Z",
          "temp": 4
        },
        {
          "timestamp": "2025-05-10T12:00:00Z",
          "temp": 4
        }
      ]
    },
    "expected_output": {
      "breakdown_detected": false,
      "excursion_duration_hours": 2,
      "liable_party": null,
      "spoilage_risk_amount_sgd": 0,
      "oa_claim_wrapped": false,
      "status": "no_claim_required",
      "note": "Simplified synthetic app record"
    }
  }
]
```

## Safety
Simulates liability assessments for facility equipment; does not execute binding financial penalties or legal claims.
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.