Back to Prompt Library
planning
DSPy Program Design for Code Generation
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: DeepCode Architect: Multi-Model Code Generation & Optimization
Format
Text-first
Lines
1
Sections
1
Linked challenge
DeepCode Architect: Multi-Model Code Generation & Optimization
Prompt source
Original prompt text with formatting preserved for inspection.
1 lines
1 sections
No variables
0 checklist items
Design a DSPy program that orchestrates multiple LLM calls for the 'Code Generation' task. Define the signature for generating an initial code draft, then another signature for refining the code based on static analysis feedback (e.g., linting errors, security warnings). Specify how different LLMs (OpenAI o3, Hugging Face Hub models) would be integrated into different stages of this DSPy program.
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 role framing, objective, and reporting structure so comparison runs stay coherent.
Tune next
Swap in your own domain constraints, anomaly thresholds, and examples before you branch variants.
Verify after
Check whether the prompt asks for the right evidence, confidence signal, and escalation path.