Back to Prompt Library
implementation
Initialize AI SDK Hardware Profiler
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Model Hardware Profiler: AI SDK & OpenAI o3 Accelerator Selection Engine
Format
Code-aware
Lines
14
Sections
3
Linked challenge
Model Hardware Profiler: AI SDK & OpenAI o3 Accelerator Selection Engine
Prompt source
Original prompt text with formatting preserved for inspection.
14 lines
3 sections
No variables
0 checklist items
import { generateObject } from 'ai';
import { openai } from '@ai-sdk/openai';
import { z } from 'zod';
// Initialize OpenAI o3 provider with AI SDK to evaluate hardware profiles
const hardwareSpecSchema = z.object({
recommended_hardware: z.string(),
estimated_ttft_ms: z.number(),
estimated_tpot_ms: z.number(),
cost_per_1k_requests: z.number(),
bottleneck_factor: z.enum(['memory_bandwidth', 'compute_flops', 'interconnect_speed', 'kv_cache_capacity'])
});
export async function evaluateWorkload(workloadSpec) {
// Implement AI SDK o3 call here
}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.