Back to Prompt Library
planning
DSPy Pipeline Design for Code Review
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Agentic Code Optimization & Review
Format
Text-first
Lines
1
Sections
1
Linked challenge
Agentic Code Optimization & Review
Prompt source
Original prompt text with formatting preserved for inspection.
1 lines
1 sections
No variables
0 checklist items
Design a DSPy pipeline for your code optimization agent. Define the signature(s) (input/output schemas) for tasks like 'IdentifyIssues', 'SuggestOptimization', and 'ExplainChanges'. Outline how you'll use DSPy's modules (e.g., `ChainOfThought`, `Program` or `Retrieve`) to compose a robust workflow for analyzing code snippets and generating improvements using DeepSeek-R1. Consider how to incorporate RAG over a codebase for context.
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.