jixiaxue 知识库
evidence · 2026-04-15

T0-2-anthropic-prompting-tools

/Users/shanfang/Documents/pe/jixiaxuegong/research/提示工程教程/evidence/T0-anthropic/T0-2-anthropic-prompting-tools.md

来源:https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/prompting-tools 爬取日期:2026-03-22

Console prompting tools


The Claude Console offers a suite of tools to help you build and refine prompts. This page walks through them in the order you’ll typically use them: generating a first draft, adding templates and variables, then improving an existing prompt.


Prompt generator

The prompt generator is compatible with all Claude models, including those with extended thinking capabilities. For prompting tips specific to extended thinking models, see the [extended thinking prompting tips](/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#leverage-thinking-and-interleaved-thinking-capabilities).

Sometimes, the hardest part of using an AI model is figuring out how to prompt it effectively. The prompt generator guides Claude to create high-quality prompt templates tailored to your specific tasks, following many of our prompt engineering best practices.

The prompt generator is particularly useful for solving the “blank page problem”—it gives you a jumping-off point for further testing and iteration.

Try the prompt generator now directly on the Console.

If you’re interested in analyzing the underlying prompt and architecture, check out our prompt generator Google Colab notebook. To run the Colab notebook, you’ll need an API key.


Prompt templates and variables

When deploying an LLM-based application with Claude, your API calls will typically consist of two types of content:

A prompt template combines these fixed and variable parts, using placeholders for the dynamic content. In the Claude Console, these placeholders are denoted with {{double brackets}}, making them easily identifiable and allowing for quick testing of different values.

You should use prompt templates and variables when you expect any part of your prompt to be repeated in another call to Claude (via the API or the Claude Console. claude.ai currently does not support prompt templates or variables).

Prompt templates offer several benefits:

The Console uses prompt templates and variables to power its tooling:

Example prompt template

Consider a simple application that translates English text to Spanish. The translated text would be variable since it changes between users or calls to Claude. You might use this prompt template:

Translate this text from English to Spanish: {{text}}

To level up your prompt variables, wrap them in XML tags for clearer structure.


Prompt improver

The prompt improver is compatible with all Claude models, including those with extended thinking capabilities. For prompting tips specific to extended thinking models, see the [extended thinking prompting tips](/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#leverage-thinking-and-interleaved-thinking-capabilities).

The prompt improver helps you quickly iterate and improve your prompts through automated analysis and enhancement. It excels at making prompts more robust for complex tasks that require high accuracy.

Before you begin

You’ll need:

How the prompt improver works

The prompt improver enhances your prompts in 4 steps:

  1. Example identification: Locates and extracts examples from your prompt template
  2. Initial draft: Creates a structured template with clear sections and XML tags
  3. Chain of thought refinement: Adds and refines detailed reasoning instructions
  4. Example enhancement: Updates examples to demonstrate the new reasoning process

You can watch these steps happen in real-time in the improvement modal.

What you get

The prompt improver generates templates with:

While examples appear separately in the Workbench UI, they're included at the start of the first user message in the actual API call. View the raw format by clicking "**\<\/\> Get Code**" or insert examples as raw text via the Examples box.

How to use the prompt improver

  1. Submit your prompt template
  2. Add any feedback about issues with Claude’s current outputs (e.g., “summaries are too basic for expert audiences”)
  3. Include example inputs and ideal outputs
  4. Review the improved prompt

Generate test examples

Don’t have examples yet? Use the Test Case Generator to:

  1. Generate sample inputs
  2. Get Claude’s responses
  3. Edit the responses to match your ideal outputs
  4. Add the polished examples to your prompt

When to use the prompt improver

The prompt improver works best for:

For latency or cost-sensitive applications, consider using simpler prompts. The prompt improver creates templates that produce longer, more thorough, but slower responses.

Example improvement

Here’s how the prompt improver enhances a basic classification prompt:

From the following list of Wikipedia article titles, identify which article this sentence came from.
Respond with just the article title and nothing else.

Article titles:
{{titles}}

Sentence to classify:
{{sentence}}
You are an intelligent text classification system specialized in matching sentences to Wikipedia article titles. Your task is to identify which Wikipedia article a given sentence most likely belongs to, based on a provided list of article titles.

First, review the following list of Wikipedia article titles:
<article_titles>
{{titles}}
</article_titles>

Now, consider this sentence that needs to be classified:
<sentence_to_classify>
{{sentence}}
</sentence_to_classify>

Your goal is to determine which article title from the provided list best matches the given sentence. Follow these steps:

1. List the key concepts from the sentence
2. Compare each key concept with the article titles
3. Rank the top 3 most relevant titles and explain why they are relevant
4. Select the most appropriate article title that best encompasses or relates to the sentence's content

Wrap your analysis in <analysis> tags. Include the following:
- List of key concepts from the sentence
- Comparison of each key concept with the article titles
- Ranking of top 3 most relevant titles with explanations
- Your final choice and reasoning

After your analysis, provide your final answer: the single most appropriate Wikipedia article title from the list.

Output only the chosen article title, without any additional text or explanation.

Notice how the improved prompt:

Troubleshooting

Common issues and solutions:


Next steps