Iterative Refinement Techniques
Proven techniques for iteratively improving Claude's output: concrete input/output examples, test-driven iteration, the interview pattern, and strategies for batching feedback. How to converge on the right solution efficiently.
Quick Reference
- →Concrete input/output examples are the most effective way to communicate transformations to Claude
- →Test-driven iteration: write the test first, share failures with Claude, iterate until tests pass
- →The interview pattern: instruct Claude to ask clarifying questions before implementing
- →Batch interrelated issues in a single message; address independent issues sequentially
- →Share the actual error message or test failure output -- do not paraphrase
- →Use 'keep everything else the same' to prevent Claude from making unwanted secondary changes
- →Provide 2-3 examples minimum for any non-trivial transformation task
- →Test-driven iteration naturally converges because the test defines the acceptance criteria
- →The interview pattern is most valuable for ambiguous requirements or underspecified tasks
- →Each refinement message should focus on one clear issue to avoid confusion
Why Iterative Refinement Matters
Getting perfect output from Claude on the first try is rare for complex tasks. The best Claude Code practitioners treat the first output as a draft and use systematic techniques to refine it toward the correct solution. Iterative refinement is not a sign of failure -- it is the standard workflow for non-trivial tasks.
The key insight is that how you provide feedback determines how quickly Claude converges on the right solution. Vague feedback like 'that is not quite right' forces Claude to guess what is wrong. Specific feedback with concrete examples, test failures, or exact corrections tells Claude precisely what to fix. This article covers four proven techniques for efficient iteration.