# Generate → self-critique → revise in one call — Claude XML example

> Three-stage prompt where Claude drafts, scores its own draft against a rubric, then revises.
>
> Source: https://claudexml.com/examples/self-critique-revise/ · Last updated 2026-05-25

Home / Examples / Generate → self-critique → revise in one call
    Complex · advanced

# Generate → self-critique → revise in one call

    Three-stage prompt where Claude drafts, scores its own draft against a rubric, then revises.

    When first-pass output is decent but not great, a self-critique loop tightens quality without a second model call. Useful for writing, code, and structured arguments.


## The prompt

    Copy this verbatim. Replace the `{{ … }}` placeholders with your values.


```xml
<instructions>
You will produce a piece of work in three stages. Output each stage in its own tag.

1. <draft> — produce a first attempt at the task described in <task>.
2. <critique> — score your draft against the rubric in <rubric>. For each criterion give:
   - score: 1–5
   - one sentence saying why
   - one specific fix you would make
3. <final> — produce a revised version that addresses every fix from <critique>.

Output <draft>, then <critique>, then <final> — in that order, in one response.
Do not skip <critique> or <draft>; the revision quality depends on it.
</instructions>

<rubric>
- clarity: easy for a non-expert to follow
- specificity: concrete examples / numbers, not generalities
- length: tight; no filler
- accuracy: every claim defensible from the brief
- tone: matches the audience in <task>
</rubric>

<task>{{ task_description }}</task>
```


## Sample input


```xml
Task: Write a 150-word internal memo announcing the deprecation of our legacy webhook v1 by July 1. Audience: engineering team. Tone: firm but not alarmist.
```


## Expected output


```xml
<draft>
Heads up team — we're sunsetting webhook v1 on July 1. Please migrate to v2...
[140 words of generic prose]
</draft>

<critique>
- clarity: 4/5 — clear but assumes reader knows what v2 is; add a one-line reminder.
- specificity: 2/5 — no migration link, no example payload diff. Fix: add link to /docs/webhooks-v2 and one-line payload diff.
- length: 4/5 — slightly long. Fix: trim the rationale paragraph.
- accuracy: 5/5 — all claims defensible.
- tone: 3/5 — "please migrate" is soft for a hard deadline. Fix: "must migrate by July 1".
</critique>

<final>
Heads up team — webhook v1 is being sunset on July 1. All consumers must migrate to v2 before that date or webhooks will stop firing.

What's different in v2 (full reference: /docs/webhooks-v2):
- Payloads now nest event metadata under `meta`.
- Signature header renamed from `X-Signature` to `X-Hub-Signature-256`.
- Retries follow exponential backoff (was fixed 30s).

Migration takes most consumers under an hour. The compatibility checker at /tools/webhook-check
will flag remaining v1 callers in your code.

After July 1, v1 endpoints return 410 Gone. Please don't wait for the last week — the deprecation
shim is best-effort.
</final>
```


## Notes & tuning tips


- The rubric is what makes the critique non-vacuous. Without it, the critique stage produces "looks good" tautologies.
- Make the order explicit in instructions ("draft, then critique, then final") — Claude sometimes skips the critique otherwise.
- For higher-stakes work, run two iterations: critique the , revise again. Marginal gains drop after iteration 2.
- Costs ~2.5× a single-pass prompt in tokens, but typically beats a fresh call from scratch on quality.


## What this example uses

    Tags: <instructions>




## More like this


      complex
### Map-reduce summarization over many chunks
Summarize each chunk independently, then synthesize a single coherent summary — two prompts, structured handoff.

      complex
### Plan-then-act with explicit sub-task scaffolding
Two-turn pattern: first turn produces a numbered plan; second turn executes each sub-task and returns structured results.

      complex
### Tree-of-thought reasoning with branch scoring
Explore three reasoning paths, score each against criteria, pick the winner — all in one prompt.

      complex
### Extract → validate → transform pipeline in one call
Four-stage data pipeline: extract raw fields, validate against rules, transform to target shape, emit errors.




Cite this page

`Generate → self-critique → revise in one call. claudexml.com. https://claudexml.com/examples/self-critique-revise/`
