Prompting

How do you use a prompt improver?

· By Robert Scales · 4 min read

Short answer

A prompt improver is a tool that takes a prompt you already have and asks a model to rewrite it with better structure, examples and reasoning steps. You use it well by testing the old and new versions on the same set of inputs and keeping the new one only if the results are better for your task.

Writing a strong prompt takes practice, and the habits that work well with one model don't always carry over to another. A prompt improver hands part of that job to the model itself. You paste in the prompt you use today, the tool rewrites it following prompting best practices, and you get a longer, more structured version back.

Anthropic added one to its Console, the web workspace where developers write and test prompts for Claude, on November 14. It sits next to tools the Console gained in July: a prompt generator that drafts a prompt from a one-line task description, and an Evaluate tab that runs a prompt against many test inputs at once. Together they form a loop: improve, test, compare, decide.

What the improver changes

Anthropic lists five things the improver does to a prompt:

ChangeWhat it means
Step-by-step reasoningAdds a section where Claude thinks the problem through before giving its answer
Example standardizationPuts any examples you included into a consistent format using XML tags, labels like <example> that mark where each part begins and ends
Example enrichmentAdds reasoning to those examples so they match the new structure
RewritingReorganizes the instructions and fixes small spelling or grammar mistakes
PrefillWrites the first words of Claude's reply in advance, which steers the format of the answer

After the rewrite, you can type feedback, such as "the summaries are still too long," and ask for another pass. Anthropic reports that in its own tests the improved prompt raised accuracy by 30% on a classification task and brought a summarization task to 100% compliance with a word limit. Those are the company's results on its own tests; yours will depend on your task.

A worked before and after

Suppose you run a small online shop and use Claude to sort incoming customer emails into one of four categories: shipping, returns, product question or other. Your current prompt is short:

Prompt
Classify this customer email as shipping, returns, product question, or other. Reply with the category only.

{{EMAIL}}

The double braces mark a variable: the Console fills in a different email for each test. Here is how to improve and test it, step by step.

  1. Build a test set first. In the Console's Evaluate tab, add 20 real emails (with personal details removed), and write the correct category for each. You can also ask Claude to generate test cases, but include real ones: they contain the messy wording your customers actually use.
  2. Run the original prompt on all 20 and note how many it gets right.
  3. Open the prompt improver, paste the prompt and describe what's going wrong, for example: "It labels 'Where is my refund?' as shipping instead of returns."
  4. Read the new version before testing it. A typical result, shown here as an illustrative excerpt, looks like this:
Prompt
You will classify a customer email into exactly one category.

<categories>
shipping: delivery times, tracking, lost or late parcels
returns: sending items back, refunds, exchanges
product question: sizes, materials, how to use an item
other: anything else
</categories>

<email>
{{EMAIL}}
</email>

First, in <thinking> tags, note the customer's main request and which category it fits.
Then give your answer in <category> tags.
  1. Run the improved prompt on the same 20 emails and compare the two columns side by side. The Console can show outputs of two or more prompt versions next to each other, and you can grade each reply on a 5-point scale or against an "ideal output" you write in.
  2. Update your code if you adopt the new version. The improved prompt puts the answer inside <category> tags after a block of reasoning, so the program that reads Claude's reply has to pull out just the tag's contents.

Illustrative result: the original prompt gets 15 of 20 right and the improved one 18, with the refund emails now in the right place. On that evidence you would switch.

Try it: Take one prompt you use every week, collect ten inputs you know the right answer for, and run the original and an improved version on all ten. Count the correct answers before you decide which one to keep.

When is the improved prompt actually worse?

When it solves a problem you didn't have. The improver adds structure and reasoning by default, and that has costs. A reasoning section makes every reply longer, which means more tokens (the small units of text you pay for) and slower answers. For a task that already worked, such as a simple yes-or-no check that runs thousands of times a day, a longer prompt can raise your bill and response time with no gain in accuracy.

It can also break the code around it. If your program expects a single word and the new prompt returns reasoning followed by a tagged answer, your app will fail until you change how it reads the reply. And a rewrite can quietly drop or soften a rule that mattered to you, such as "never mention prices," because it reorganized the instructions. Read the new prompt line by line against the old one before you test it.

Finally, the improved prompt is worse whenever your test says so. A prompt can look more professional and still score lower on your own examples, especially if the improver's added examples nudge the model toward cases that are rare in your real data. That is why the test set comes first. Keep both versions, run them on the same inputs, and let the count decide. If the scores are tied, keep the shorter prompt: it is cheaper to run and easier to maintain.

Sources

  1. Improve your prompts in the developer console — Anthropic, November 14, 2024
  2. Evaluate prompts in the developer console — Anthropic, July 9, 2024

Get the free Guide to Artificial Intelligence

Sign up for the weekly newsletter and receive the free guide: what changed in AI this week, one lesson, one prompt to try. Unsubscribe in one click.

How we handle your address

Back to top

Display

Your choices are saved in this browser only. No data is sent.

Text size
100%
Colours
Reading
More settings
Accessibility statement