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 Desalination Brine Discharge Environmental Compliance Monitor
Format
Code-aware
Lines
73
Sections
11
Linked challenge
Build a Desalination Brine Discharge Environmental Compliance Monitor
Prompt source
Original prompt text with formatting preserved for inspection.
73 lines
11 sections
No variables
1 code block
## Build
Correlate seawater desalination outfall salinity and temperature telemetry against marine environmental protection guidelines. Produce automated regulatory compliance dossiers and recommend dynamic brine dilution flow setpoints.
## User
Desalination Environmental Compliance Officer
## Workflow
1. Ingest outfall conductivity, temperature, and ambient marine monitoring buoy data in near real-time.
2. Calculate mixing zone thermal plume dissipation and excess salinity using WaterTAP brine property routines.
3. Evaluate regulatory threshold exceedances (+3 degrees C delta-T or +2 ppt salinity at mixing zone boundary).
4. Generate a structured bilingual environmental compliance audit report and cooling water dilution recommendations.
## Interface
Environmental monitoring dashboard displaying mixing zone salinity contours, buoy telemetry graphs, and compliance alert logs.
## Data
Generate synthetic continuous sensor records representing outfall discharge salinity, temperature, and background coastal currents.
Starter examples below are synthetic. They are not downloaded records.
## Source
[WaterTAP treatment modeling](https://raw.githubusercontent.com/watertap-org/watertap/main/README.md)
Leverages WaterTAP seawater and concentrated brine property calculations to model density and salinity mixing behavior.
## Tools
evidently-ai, fastapi, pandas.
Evidently AI monitors telemetry drift and outfall metric distributions over time to identify chronic sensor drift and environmental threshold breaches.
Local Python runtime with hosted Claude API for formatting official bilingual compliance filings.
## 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 salinity anomalies exceeding +2.0 ppt above background seawater salinity at edge of mixing zone.
- Calculates recommended auxiliary cooling water dilution rates to restore compliance within 2 hours.
- Produces dual-language compliance summaries suitable for municipal environmental protection agencies.
## Starter Examples
```json
[
{
"input": {
"outfall_id": "OUTFALL-SWRO-03",
"discharge_flow_m3h": 12000,
"discharge_salinity_ppt": 65,
"ambient_seawater_salinity_ppt": 41,
"boundary_buoy_salinity_ppt": 43.6,
"ambient_temp_c": 32,
"discharge_temp_c": 34.2
},
"expected_output": {
"salinity_delta_ppt": 2.6,
"compliant": false,
"required_dilution_flow_m3h": 3600,
"notification_status": "MANDATORY_REGULATORY_DISPATCH",
"regulatory_summary_ar": "تجاوز في نسبة الملوحة المسموح بها عند حدود منطقة الخلط بمقدار 0.6 جزء بالألف",
"regulatory_summary_en": "Permissible salinity threshold exceeded at mixing zone boundary by 0.6 ppt"
}
},
{
"input": {
"outfall_id": "OUTFALL-SWRO-04",
"discharge_flow_m3h": 10000,
"discharge_salinity_ppt": 62,
"ambient_seawater_salinity_ppt": 40.5,
"boundary_buoy_salinity_ppt": 41.8,
"ambient_temp_c": 31,
"discharge_temp_c": 32.5
},
"expected_output": {
"salinity_delta_ppt": 1.3,
"compliant": true,
"required_dilution_flow_m3h": 0,
"notification_status": "NORMAL_OPERATION",
"regulatory_summary_ar": "العمليات ضمن الحدود البيئية المسموح بها",
"regulatory_summary_en": "Discharge parameters within permissible environmental limits"
}
}
]
```
## Safety
Environmental compliance calculations are advisory; outfall pump adjustments and discharge throttling require chief plant chemist authorization.
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.