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 Multi-Tenant GPU Reservation and Chargeback Reconciler

Format
Code-aware
Lines
74
Sections
11
Linked challenge
Build a Multi-Tenant GPU Reservation and Chargeback Reconciler

Prompt source

Original prompt text with formatting preserved for inspection.

74 lines
11 sections
No variables
1 code block
## Build
Reconcile scheduled multi-team GPU reservation windows against active DCGM telemetry metrics to quantify idle waste. Synthesize chargeback adjustments and capacity release proposals for infrastructure finance teams.

## User
Infrastructure Operations and FinOps Lead

## Workflow
1. Ingest scheduled team GPU reservation windows alongside normalized Prometheus DCGM exporter time-series telemetry records.
2. Calculate active execution ratios, compute memory residency, and unallocated idle hours across individual accelerator slots.
3. Invoke hosted Claude via Anthropic API to analyze underutilization patterns and generate policy-compliant refund chargeback adjustments.
4. Publish structured accounting reconciliation ledgers with itemized reclamation recommendations for engineering team review.

## Interface
Web FinOps console featuring reservation timeline diffs, utilization heatmaps, simulated credit adjustment vouchers, and exportable reconciliation reports.

## Data
Generate 40 normalized synthetic DCGM exporter time-series records covering 8 GPU nodes alongside reservation schedules in JSON format.
Starter examples below are synthetic. They are not downloaded records.

## Source
[NVIDIA DCGM exporter](https://raw.githubusercontent.com/NVIDIA/dcgm-exporter/main/README.md)
Extracts GPU utilization and memory metrics exposed by NVIDIA DCGM exporter in Prometheus text format to determine active vs idle state.

## Tools
mlflow, python-dateutil.
MLflow provides native tracking and experiment artifact logging to audit FinOps reconciliation runs across compute pools.
Hosted Claude API for telemetry reconciliation reasoning and accounting summaries. Local hardware executing open workload accounting logic only.

## 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
- Identifies active vs idle GPU allocation windows with zero missing metric intervals in test datasets.
- Computes team chargeback penalty adjustments matching predefined contract accounting formulas.
- Outputs valid structured JSON reconciliation ledgers including team IDs, idle credits, and recommended quota adjustments.

## Starter Examples
```json
[
  {
    "input": {
      "team_id": "nlp-research",
      "reservation_hours": 24,
      "allocated_gpus": 8,
      "hourly_rate": 3.5,
      "dcgm_active_utilization_pct": [
        12,
        10,
        8,
        15,
        9,
        11
      ]
    },
    "expected_output": {
      "average_utilization_pct": 10.83,
      "underutilized_hours": 24,
      "idle_waste_cost": 599.76,
      "chargeback_adjustment_status": "CREDIT_RECOMMENDED",
      "suggested_quota_reduction_gpus": 6
    }
  },
  {
    "input": {
      "team_id": "speech-prod",
      "reservation_hours": 0,
      "allocated_gpus": 4,
      "hourly_rate": 3.5,
      "dcgm_active_utilization_pct": []
    },
    "expected_output": {
      "average_utilization_pct": 0,
      "underutilized_hours": 0,
      "idle_waste_cost": 0,
      "chargeback_adjustment_status": "SKIPPED_EMPTY_WINDOW",
      "suggested_quota_reduction_gpus": 0
    }
  }
]
```

## Safety
Simulates financial cost adjustments and capacity changes. Requires explicit FinOps administrator sign-off before modifying enterprise cloud billing systems.
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.