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 an AWS Neuron Spot Preemption Profiler

Format
Code-aware
Lines
63
Sections
11
Linked challenge
Build an AWS Neuron Spot Preemption Profiler

Prompt source

Original prompt text with formatting preserved for inspection.

63 lines
11 sections
No variables
1 code block
## Build
Simulate EC2 Inf2 and Trn1 accelerator spot preemption risks against open-source transformer batch workloads. Quantify interruption buffers and synthesize preemption tolerance reports.

## User
Cloud Operations Procurement Specialist

## Workflow
1. Ingest workload batch concurrency requirements and historical spot availability SLA metrics.
2. Evaluate AWS Neuron EC2 instance types including inf2.xlarge and trn1.32xlarge spot interruption profiles.
3. Simulate batch failure rates and interruption risk buffers during peak serving hours.
4. Use hosted Claude via Anthropic API to synthesize an executive spot viability proposal.

## Interface
Web scenario workbench with interactive slider controls for spot tolerance and reservation terms.

## Data
Construct a synthetic tabular catalog of AWS EC2 Neuron instance rates and monthly batch inference traffic profiles.
Starter examples below are synthetic. They are not downloaded records.

## Source
[AWS Neuron documentation](https://raw.githubusercontent.com/aws-neuron/aws-neuron-sdk/master/README.md)
Reference AWS Neuron accelerator families including Inferentia and Trainium instances (Inf2, Trn1).

## Tools
anthropic, pydantic, pandas.
anthropic-claude compiles scenario modeling metrics into executive business justifications and trade-off tables.
Hosted Claude API for summarizing financial scenario models and drafting procurement recommendations.

## 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 batch failure rates based on historical spot availability SLAs.
- Models interruption risk buffers for spot instances during peak batch serving hours.
- Outputs a structured viability recommendation matrix with interruption tolerance thresholds.

## Starter Examples
```json
[
  {
    "input": {
      "monthly_hours_needed": 720,
      "instance_family": "trn1.32xlarge",
      "spot_availability_sla": 0.85,
      "batch_tolerance_sla": 0.95
    },
    "expected_output": {
      "simulated_failure_rate": 0.15,
      "buffer_needed": 1.18,
      "recommended_strategy": "unsuitable_due_to_preemption_risk",
      "spot_viability": "FAIL"
    }
  },
  {
    "input": {
      "monthly_hours_needed": 200,
      "instance_family": "inf2.8xlarge",
      "spot_availability_sla": 0.95,
      "batch_tolerance_sla": 0.9
    },
    "expected_output": {
      "simulated_failure_rate": 0.05,
      "buffer_needed": 1.05,
      "recommended_strategy": "spot_with_fallback",
      "spot_viability": "PASS"
    }
  }
]
```

## Safety
Performs financial simulation only; does not execute binding EC2 reservation purchases or cloud API purchases.
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.