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 Multi-Zone Metrology Route Optimizer
Format
Code-aware
Lines
94
Sections
11
Linked challenge
Build a Multi-Zone Metrology Route Optimizer
Prompt source
Original prompt text with formatting preserved for inspection.
94 lines
11 sections
No variables
1 code block
## Build
Analyze normalized open62541 OPC UA analog measurement drift against calibration thresholds. Generate an optimized routing sequence for metrology technicians across large plant zones to efficiently address out-of-tolerance instrumentation.
## User
Plant Metrology Engineer
## Workflow
1. Ingest open62541 OPC UA analog measurement nodes and historical calibration drift records.
2. Evaluate drift severity and classify sensors requiring immediate calibration checks.
3. Group flagged sensors by physical plant coordinates or layout zones.
4. Calculate an optimized transit path for the metrology technician between the identified zones.
## Interface
Plant layout map displaying prioritized calibration points and the computed shortest-path technician route.
## Data
Construct 300 normalized records reflecting open62541 OPC UA instrumentation nodes with drift metrics, calibration thresholds, and physical plant zone coordinates.
Starter examples below are synthetic. They are not downloaded records.
## Source
[open62541 OPC UA](https://raw.githubusercontent.com/open62541/open62541/master/README.md)
Extracts OPC UA variable arrays and engineering units metadata structures to track analog instrumentation values based on open62541.
## Tools
langgraph, pydantic, fastapi.
LangGraph orchestrates multi-step decision graphs to process drift metrics, group by zones, and determine the optimal technician routing path.
Requires logical pathfinding and structured schema adherence via local 7B+ or hosted lightweight models.
## 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
- Correctly calculates and flags sensors exceeding their specific calibration drift thresholds.
- Successfully groups flagged sensors by their designated plant zones.
- Outputs a valid JSON technician route sequence that minimizes zone-to-zone transit steps.
## Starter Examples
```json
[
{
"input": {
"sensors": [
{
"node_id": "ns=2;s=Mixer.Temp1",
"zone": "A1",
"drift_percent": 4.5,
"limit": 3
},
{
"node_id": "ns=2;s=Reactor.Press",
"zone": "C4",
"drift_percent": 5.2,
"limit": 2.5
},
{
"node_id": "ns=2;s=Mixer.Temp2",
"zone": "A1",
"drift_percent": 1.1,
"limit": 3
}
],
"start_zone": "A0",
"note": "Simplified synthetic app records."
},
"expected_output": {
"flagged_sensors": [
"ns=2;s=Mixer.Temp1",
"ns=2;s=Reactor.Press"
],
"optimized_route_zones": [
"A0",
"A1",
"C4"
],
"route_rationale": "Proceed from start A0 to nearest zone A1, then traverse to C4."
}
},
{
"input": {
"sensors": [
{
"node_id": "ns=2;s=Packager.Weight",
"zone": "D2",
"drift_percent": 0.5,
"limit": 1
}
],
"start_zone": "A0",
"note": "Simplified synthetic app records."
},
"expected_output": {
"flagged_sensors": [],
"optimized_route_zones": [
"A0"
],
"route_rationale": "No sensors exceed calibration thresholds; remain at start zone."
}
}
]
```
## Safety
Read-only analytics routing personnel safely without modifying live calibration offsets or PLC logic.
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.