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 Freight Emissions Modeler and Shipper Benchmark Tool
Format
Code-aware
Lines
62
Sections
11
Linked challenge
Build a Freight Emissions Modeler and Shipper Benchmark Tool
Prompt source
Original prompt text with formatting preserved for inspection.
62 lines
11 sections
No variables
1 code block
## Build
Calculate Scope 3 freight greenhouse gas emissions for Singapore port drayage and feeder voyages. Benchmark carrier operational sustainability to generate shipper comparative reports.
## User
Supply Chain Sustainability Manager
## Workflow
1. Retrieve real-time weather and rainfall observations from Singapore data.gov.sg.
2. Combine cargo tonnage and corridor distance to calculate baseline emissions.
3. Apply weather friction penalties to haulage fuel consumption models.
4. Compile comparative shipper emissions reports and highlight low-carbon routing options.
## Interface
Interactive reporting workspace displaying modality carbon intensity graphs and shipper performance matrices.
## Data
Fetch live rainfall measurements from data.gov.sg real-time weather APIs; mock feeder vessel bunker logs.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Singapore open data API](https://guide.data.gov.sg/developer-guide/api-overview)
Consumes Singapore data.gov.sg real-time weather APIs to model heavy rain impedance on urban freight fuel consumption.
## Tools
langgraph, pydantic, httpx.
LangGraph orchestrates multi-step simulation cycles linking weather telemetry, drayage models, and comparative report drafting.
API-hosted model for drafting multimodal green freight optimization recommendations.
## 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
- Calculate voyage and drayage CO2e emissions using standardized activity-based emission factor models.
- Incorporate Singapore real-time rainfall data to adjust fuel consumption curves for road haulage.
- Produce comparative shipper emissions scorecards across multiple transport modalities.
- Generate downloadable sustainability reporting packages compliant with corporate Scope 3 frameworks.
## Starter Examples
```json
[
{
"input": {
"cargo_weight_teu": 4,
"drayage_km": 32,
"rainfall_mm": 18.5,
"transport_mode": "heavy_truck_diesel"
},
"expected_output": {
"adjusted_co2e_kg": 118.45,
"baseline_co2e_kg": 105.6,
"carrier_grade": "B",
"weather_penalty_percent": 12.17
}
},
{
"input": {
"cargo_weight_teu": 0,
"drayage_km": 32,
"rainfall_mm": 0,
"transport_mode": "heavy_truck_diesel"
},
"expected_output": {
"error": "INVALID_CARGO_WEIGHT",
"status": "CALCULATION_ABORTED"
}
}
]
```
## Safety
Calculations serve as internal analytical comparisons; no binding carbon offsets or tax filings are executed.
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.