Self-Refine Prompting: Complete Guide with Examples (2026)

Last updated 2026-06-29 · Works with ChatGPT, Claude, Gemini
Quick Answer

Self-Refine prompting asks the AI to produce a draft, critique it against your defined quality criteria, and then deliver a refined final version — all in a single prompt. This built-in quality loop catches errors and gaps the AI would otherwise miss when asked to produce a final output directly.

What Is the Self-Refine Framework?

Self-Refine is a prompting technique where the model acts as both author and critic. Introduced in a 2023 paper, it has since become a foundational pattern in agentic AI systems. In a single-prompt version, you define the quality criteria upfront and instruct the model to evaluate its own draft against them before delivering a final version. This is significantly more effective than asking for quality output directly, because the model's critique often identifies gaps it did not notice while writing.

Fields

R
Role
The expert persona — sets the quality bar for both the draft and the critique. Example: You are a senior technical writer.
T
Task
What the AI should produce. Be specific about scope and constraints.
C
Criteria
What makes the output good. The AI will critique its own draft against these criteria. List 3–5 concrete, checkable criteria.
+R
Rules
Process constraints: Always show Draft, then Critique, then Final. Final must address every critique point.

When to Use Self-Refine

Use Self-Refine when output quality matters more than speed, when the task has clear quality criteria you can specify, and when getting it right the first time would otherwise require multiple back-and-forth prompts. It is especially effective for documentation, API references, professional writing, and code with correctness requirements. For fast, simple tasks use RTF.

Examples

API documentation
Role: You are a senior technical writer who specialises in developer documentation.
Task: Write an API reference entry for the GET /api/v1/prompts/:id endpoint of a prompt management tool.
Criteria: Good output must: 1) show the full request with headers, 2) explain every parameter, 3) show a 200 response and at least one error response with JSON examples, 4) include a working curl example, 5) be under 400 words.
Rules: Show Draft, then Critique against each criterion with a pass/fail, then Final. The final must fix every failed criterion.
Professional email
Role: You are an executive communications specialist.
Task: Write an email to a potential enterprise customer who went silent after a demo, following up without being pushy.
Criteria: Good email must: 1) be under 100 words, 2) reference something specific from the demo, 3) include a clear single CTA, 4) not use the word 'just', 5) not sound like a template.
Rules: Show Draft, then Critique, then Final. Final must be ready to send.
Code review output
Role: You are a senior engineer reviewing a pull request.
Task: Review the following Python function for correctness, edge cases, and readability.
Criteria: A good review: 1) identifies all edge cases the function doesn't handle, 2) checks for off-by-one errors, 3) suggests specific variable name improvements, 4) rates overall readability 1–10.
Rules: Show Initial review, then Self-critique (what did I miss?), then Final review with any additions.

Compared to Other Frameworks

Self-Refine vs Chain-of-Thought: CoT shows reasoning steps; Self-Refine adds a dedicated critique-and-revision phase targeting specific quality criteria. Self-Refine vs RACE: RACE asks for a direct high-quality output; Self-Refine builds quality in through an explicit self-critique loop. Self-Refine vs Tree-of-Thought: ToT explores multiple options from the start; Self-Refine improves a single output through iteration.

Save Self-Refine prompts in Promptary — free

Save your first prompt in the structured editor and get a permanent REST API endpoint. Personal plan is free forever, no credit card required.

Start free

Frequently Asked Questions

What is Self-Refine prompting?

Self-Refine prompting asks the AI to produce an initial draft, critique it against defined quality criteria, and then deliver a refined final version — all in one prompt. The self-critique loop catches errors and gaps the model would otherwise miss when producing output directly.

How do I define good criteria for Self-Refine?

Good criteria are concrete and checkable: word count limits, required sections, forbidden words, format requirements. Avoid vague criteria like 'be clear' — instead use 'every sentence must be under 20 words'. The more specific your criteria, the more useful the self-critique.

Is Self-Refine the same as asking the AI to 'review and improve' its answer?

Similar, but Self-Refine adds structure: you define the quality criteria upfront so the critique is evaluated against specific checkpoints rather than the AI's general sense of quality. This produces more consistent and targeted improvements.

Does Self-Refine work in a single prompt?

Yes. While multi-turn implementations exist, the single-prompt version — where you instruct the AI to show Draft, Critique, and Final in one response — captures most of the quality benefit and is practical for everyday use in Promptary.