Back to prompt library
Build a GPU Reservation and Team Cost Reconciliation Engine — implementation
Linked challenge: Build a GPU Reservation and Team Cost Reconciliation Engine
Prompt source
implementation67 lines11 sectionsNo variables1 code block
## Build
Cross-reference multi-tenant GPU reservation allocations against DCGM active telemetry to pinpoint unused reserved capacity. Formulate team chargeback adjustments and idle reclamation actions for infrastructure finance teams.
## User
Infrastructure Financial Operations Lead
## Workflow
1. Ingest scheduled GPU instance reservations and hourly team lease cost agreements.
2. Parse normalized DCGM GPU utilization telemetry records to compute actual hardware occupancy.
3. Calculate unallocated idle waste and formulate reconciled departmental cost attribution line items.
4. Invoke hosted Claude via Anthropic Python SDK to synthesize a finance reconciliation memo.
## Interface
FastAPI service with a Streamlit cost reconciliation audit table and markdown report export.
## Data
Generate 20 normalized synthetic hourly GPU reservation records and matched DCGM average utilization export logs.
Starter examples below are synthetic. They are not downloaded records.
## Source
[NVIDIA DCGM exporter](https://raw.githubusercontent.com/NVIDIA/dcgm-exporter/main/README.md)
Extract DCGM exporter metric concepts like GPU utilization and active tenant profiling from the DCGM exporter overview.
## Tools
anthropic, pydantic, fastapi.
anthropic-claude structures departmental variance explanations into audit-ready reconciliation memos for infrastructure leadership.
Hosted Claude API accessed via Anthropic Python SDK with structured JSON parsing capabilities.
## 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 identifies reserved GPU hours where DCGM compute utilization fell below 5 percent.
- Applies chargeback recalculations strictly within agreed hourly rate parameters.
- Exports structured JSON reconciliation entries accompanied by a Claude-drafted audit memo.
## Starter Examples
```json
[
{
"input": {
"team_id": "search-ranking",
"reserved_gpus": 8,
"reserved_hours": 24,
"hourly_rate": 3.5,
"avg_dcgm_utilization_pct": 2.1
},
"expected_output": {
"allocated_cost": 672,
"effective_used_cost": 14.11,
"idle_waste_reclaimable": 657.89,
"status": "underutilized_reclaim_recommended",
"action_code": "DOWNSIZE_RESERVATION"
}
},
{
"input": {
"team_id": "core-nlp",
"reserved_gpus": 4,
"reserved_hours": 12,
"hourly_rate": 3.5,
"avg_dcgm_utilization_pct": 0
},
"expected_output": {
"allocated_cost": 168,
"effective_used_cost": 0,
"idle_waste_reclaimable": 168,
"status": "dormant_lease",
"action_code": "CANCEL_RESERVATION"
}
}
]
```
## Safety
Simulates financial cost chargebacks and resource adjustments without modifying actual cloud billing accounts or instance states.
Use mock external writes. Require human review before any real deployment.