Flashcard: what is the self-refine prompting pattern and what loop does it set up?
Self-refine has the same model produce a draft, critique its own draft, and revise based on the critique, looping the author, critic, reviser cycle 1-3 times to improve quality.
Imagine you write an essay, then put on a teacher hat and mark up your own essay with red pen, then put on a student hat again and rewrite it taking the red pen seriously. Then you do it once more. Each pass usually makes the essay a bit better than the last. Self-refine is the language-model version of that habit. The model writes a draft, then a critic prompt asks the same model to find problems with the draft, then a reviser prompt asks the same model to fix those problems. The model is doing all three jobs in turn, with no fine-tuning between them; the critique is the bridge that makes the revision better than just asking the model to try again.
Detailed answer & concept explanation~7 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: define self-refine as author + critic + reviser loop, name the same-model property, contrast where it helps versus where it shares blind spots, and call out the call-count cost.
Real products, models, and research that use this idea.
- Cursor and Copilot Chat use draft, critique, fix loops on code edits, asking the model to review its own diff against the user's intent before committing.
- Anthropic's prompt-engineering cookbooks show self-refine patterns for long-form writing tasks with Claude Opus 4.7, capped at 2 rounds.
- AutoGPT-style agents run self-refine on their plans: generate a plan, critique it against constraints, regenerate before executing.
- Open-source frameworks like DSPy and LangChain ship self-refine primitives so teams can wire author + critic + reviser prompts without rewriting the loop.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does self-refine help even when the critic and author are the same model?
QWhen would you use a different model for the critic step?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Believing self-refine is a generic quality boost on every task. The pattern helps on outputs that benefit from critique (writing, code, arguments) and adds cost without quality on tasks where the first draft is already correct.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.