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 Solar Soiling Loss and Cleaning Route Dispatcher

Format
Code-aware
Lines
71
Sections
11
Linked challenge
Build a Solar Soiling Loss and Cleaning Route Dispatcher

Prompt source

Original prompt text with formatting preserved for inspection.

71 lines
11 sections
No variables
1 code block
## Build
Calculate dust accumulation and thermal degradation across utility-scale solar arrays using plant pyranometer telemetry. Optimize automated cleaning vehicle routing schedules to maximize net energy yield.

## User
Solar Farm Asset Manager

## Workflow
1. Ingest module temperature, plane-of-array irradiance, and daily string inverter power outputs.
2. Calculate baseline expected DC power output under clean conditions using pvlib performance models.
3. Quantify soiling loss percentages across individual tracker blocks and inverter zones.
4. Formulate robotic dry-brush cleaning vehicle route assignments prioritized by financial recovery rate.

## Interface
Interactive plant block heatmap indicating soiling severity, economic break-even lines, and cleaning robot dispatch buttons.

## Data
Create synthetic string telemetry files including irradiance, module temperature, and measured power output across 20 inverter blocks.
Starter examples below are synthetic. They are not downloaded records.

## Source
[PVLib solar modeling](https://raw.githubusercontent.com/pvlib/pvlib-python/main/README.md)
Utilizes pvlib PVWatts or single-diode model functions to calculate clean reference power outputs under measured irradiance.

## Tools
mastra-ai, pvlib, pandas.
Mastra AI orchestrates deterministic step execution connecting analytical soiling models with cleaning robot task dispatchers.
Local Python runtime with API-accessible LLM for generating shift handover notices.

## 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
- Calculates soiling loss ratio for each inverter block relative to pvlib clean reference.
- Suppresses cleaning dispatch when estimated energy recovery value is less than cleaning operational cost.
- Outputs a sequenced cleaning schedule for field operations teams.

## Starter Examples
```json
[
  {
    "input": {
      "block_id": "BLK-07",
      "irradiance_wm2": 850,
      "cell_temp_c": 52,
      "measured_power_kw": 620,
      "clean_reference_power_kw": 740,
      "cleaning_cost_usd": 45,
      "power_price_usd_kwh": 0.04
    },
    "expected_output": {
      "soiling_ratio": 0.838,
      "soiling_loss_pct": 16.2,
      "daily_revenue_loss_usd": 57.6,
      "dispatch_cleaning": true,
      "priority": "HIGH"
    }
  },
  {
    "input": {
      "block_id": "BLK-12",
      "irradiance_wm2": 850,
      "cell_temp_c": 50,
      "measured_power_kw": 715,
      "clean_reference_power_kw": 735,
      "cleaning_cost_usd": 45,
      "power_price_usd_kwh": 0.04
    },
    "expected_output": {
      "soiling_ratio": 0.973,
      "soiling_loss_pct": 2.7,
      "daily_revenue_loss_usd": 9.6,
      "dispatch_cleaning": false,
      "priority": "DEFERRED"
    }
  }
]
```

## Safety
Automated cleaning dispatches are mock orders; field robot operations require physical zone clearances and supervisor confirmation.
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.