Skip to main content
Back to Prompt Library
testing

Test Code Generation with Performance Constraints

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: PyTorch Optimization Agent

Format
Text-first
Lines
1
Sections
1
Linked challenge
PyTorch Optimization Agent

Prompt source

Original prompt text with formatting preserved for inspection.

1 lines
1 sections
No variables
0 checklist items
Describe a test case where your agent is tasked with generating a custom PyTorch layer (e.g., a specific type of activation function) given high-level requirements and explicit performance constraints (e.g., 'must be low memory footprint'). Detail how the agent will use its RAG capabilities to find relevant examples and then leverage DeepSeek-R1 to generate the code, followed by validation using your Marvin-MCP integrated tools (e.g., a mock memory usage checker).

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Preserve the rubric, target behavior, and pass-fail criteria as the baseline for evaluation.

Tune next

Adjust fixtures, mocks, and thresholds to the system under test instead of weakening the assertions.

Verify after

Make sure the prompt catches regressions instead of just mirroring the happy-path examples.