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 Dangerous Goods Intake and Yard Segregation Planner
Format
Code-aware
Lines
68
Sections
11
Linked challenge
Build a Dangerous Goods Intake and Yard Segregation Planner
Prompt source
Original prompt text with formatting preserved for inspection.
68 lines
11 sections
No variables
1 code block
## Build
Review chemical dangerous goods declarations submitted via FormSG webhooks. Validate segregation constraints and synthesize compliant warehouse yard staging plans before vessel berthing.
## User
Dangerous Goods Safety Officer
## Workflow
1. Process incoming dangerous goods declarations from FormSG intake webhooks.
2. Cross-reference UN classification codes against dangerous goods compatibility tables.
3. Scan designated yard blocks to detect hazardous co-location violations.
4. Synthesize a verified container yard placement plan and output handling instructions.
## Interface
Interactive 2D container yard grid visualizer flagging segregation breaches and proposing safe staging slots.
## Data
Construct sample dangerous goods declarations following the FormSG attachment and field payload format.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Singapore government FormSG](https://raw.githubusercontent.com/opengovsg/FormSG/develop/README.md)
Parses multi-field FormSG form submissions and attachment metadata representing commercial hazmat filings.
## Tools
pydantic-ai, fastapi, open-attestation.
Pydantic AI ensures rigid type validation and guardrails over hazardous goods classification data.
Local or hosted LLM to interpret SDS handling guidelines and explain hazardous segregation rules.
## 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
- Ingest FormSG hazardous chemical declarations and SDS submittals.
- Validate chemical classes against Singapore port dangerous goods yard compatibility matrices.
- Generate compliant container yard stacking coordinates preventing incompatible co-location.
- Export verified staging manifests with TradeTrust-compatible OpenAttestation digital signatures.
## Starter Examples
```json
[
{
"input": {
"un_class": "Class 3 Flammable Liquids",
"un_number": "UN1203",
"volume_liters": 5000,
"yard_adjacent_containers": [
"UN3101 Class 5.2 Organic Peroxide"
]
},
"expected_output": {
"action": "RELOCATE_CONTAINER",
"buffer_distance_required_meters": 12,
"segregation_violation": true,
"staging_permitted": false
}
},
{
"input": {
"un_class": "Class 3 Flammable Liquids",
"un_number": "UN1203",
"volume_liters": 5000,
"yard_adjacent_containers": [
"UN1263 Class 3 Paint"
]
},
"expected_output": {
"action": "ASSIGN_SLOT",
"buffer_distance_required_meters": 0,
"segregation_violation": false,
"staging_permitted": true
}
}
]
```
## Safety
Staging plans are synthetic simulations; strictly non-operational for actual physical hazardous material handling.
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.