Before you start
What comes back from a generator is usually a prompt template. It is a prompt with named gaps, called variables, that you or your code fill in later with a customer's email or a company name. The general name for the instructions behind a generator is a meta-prompt.
This lesson covers two routes. Anthropic's route is a notebook in its cookbook that needs an Anthropic API key and a place to run notebooks, such as Colab. OpenAI's route is the Generate button in its Playground, and its guide also prints the meta-prompt behind it. Anthropic's notebook says the prompt it writes is not guaranteed to be optimal, so plan to change it. The prompt templates lesson covers variables in more depth.
Run Anthropic's metaprompt on one task
The notebook calls itself a tool for the "blank page problem". You enter a task and, if you like, the names of the variables you want, and it gives you a starting point to iterate on. It is built for single-turn question and answer prompts, not multi-turn ones. The metaprompt notebook holds a long prompt of example prompts for different tasks. The notebook's own words say half a dozen, and the text it prints has five. Your task goes in at the end, followed by three instructions: list the inputs, plan the structure, then write the instructions. It tells the model that long variable values should come before the directions that use them.
The cell you edit is short. These are its lines as the notebook prints them, with its default task and two variables:
TASK = "Draft an email responding to a customer complaint" # Replace with your task!
# Optional: specify the input variables you want Claude to use. If you want
# Claude to choose them for you, leave VARIABLES as an empty list.
VARIABLES = ["CUSTOMER_EMAIL", "COMPANY_NAME"]
# TASK = "Choose an item from a menu for me given my preferences"
# VARIABLES = ["MENU", "PREFERENCES"]- Open the notebook in Colab or any place you run notebooks, and run the first code cell. It installs the
anthropicpackage. - Put your API key where the notebook says to, or leave it blank and set the
ANTHROPIC_API_KEYenvironment variable. - Replace the TASK line with your own task. Write what a model should do and for whom, not just a topic.
- List variable names in capitals if you want specific ones. The notebook writes them as
{$NAME}. Leave the list empty and Claude picks the names. - If you changed the task, put example values for your variables in
VARIABLE_VALUESin the testing section near the bottom. - Run all the cells. The notebook warns that the long metaprompt takes 20 to 30 seconds. Your template appears in section 1.
Generate a prompt with OpenAI's meta-prompt
OpenAI's prompt generation guide says the Generate button in the Playground makes prompts, functions and schemas from a description of your task. For prompts it uses meta-prompts built on OpenAI's prompt engineering best practices, with a different one for each kind of output, such as audio. The guide prints the text meta-prompt below. Its code sends it as the system message, and the user message is "Task, Goal, or Current Prompt:" followed by your task.
Because it is plain text, you can also paste it at the top of a chat window and put your task underneath. That shortcut is this lesson's suggestion, and the guide does not describe it.
Given a task description or existing prompt, produce a detailed system prompt to guide a language model in completing the task effectively.
# Guidelines
- Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions**: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
- Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from placeholders.
- Clarity and Conciseness: Use clear, specific language. Avoid unnecessary instructions or bland statements.
- Formatting: Use markdown features for readability. DO NOT USE ``` CODE BLOCKS UNLESS SPECIFICALLY REQUESTED.
- Preserve User Content: If the input task or prompt includes extensive guidelines or examples, preserve them entirely, or as closely as possible. If they are vague, consider breaking down into sub-steps. Keep any details, guidelines, examples, variables, or placeholders provided by the user.
- Constants: DO include constants in the prompt, as they are not susceptible to prompt injection. Such as guides, rubrics, and examples.
- Output Format: Explicitly the most appropriate output format, in detail. This should include length and syntax (e.g. short sentence, paragraph, JSON, etc.)
- For tasks outputting well-defined or structured data (classification, JSON, etc.) bias toward outputting a JSON.
- JSON should never be wrapped in code blocks (```) unless explicitly requested.
The final prompt you output should adhere to the following structure below. Do not include any additional commentary, only output the completed system prompt. SPECIFICALLY, do not include any additional messages at the start or end of the prompt. (e.g. no "---")
[Concise instruction describing the task - this should be the first line in the prompt, no section header]
[Additional details as needed.]
[Optional sections with headings or bullet points for detailed steps.]
# Steps [optional]
[optional: a detailed breakdown of the steps necessary to accomplish the task]
# Output Format
[Specifically call out how the output should be formatted, be it response length, structure e.g. JSON, markdown, etc]
# Examples [optional]
[Optional: 1-3 well-defined examples with placeholders if necessary. Clearly mark where examples start and end, and what the input and output are. User placeholders as necessary.]
[If the examples are shorter than what a realistic example is expected to be, make a reference with () explaining how real examples should be longer / shorter / different. AND USE PLACEHOLDERS! ]
# Notes [optional]
[optional: edge cases, details, and an area to call or repeat out specific important considerations]- Reasoning Before Conclusions tells the generator to put reasoning ahead of any verdict, and to reverse examples that give the verdict first.
- Preserve User Content keeps your rules, examples, variables and placeholders. Paste what you already have into the task.
- Constants says to put guides, rubrics and examples inside the prompt, because they are not open to prompt injection.
- Output Format asks for the format in detail, with length and syntax, and leans toward JSON for classification.
- The guide adds that OpenAI may bring in more advanced techniques later, such as DSPy, which lesson 4 covers.
How the two generators differ
Both tell the model to put reasoning or a justification ahead of the verdict. They differ in how you run them and what they hand back. They also differ on output format. OpenAI's meta-prompt has an Output Format rule, while the notebook only says to name the tags when you want output inside tags.
| Anthropic metaprompt | OpenAI Generate | |
|---|---|---|
| Where it runs | A notebook with an API key | A Playground button, or the meta-prompt through the API |
| Made for | Single-turn question and answer prompts | A system prompt for the task |
| Starts from | A task and optional variable names | A task description or an existing prompt |
| Variables | {$NAME} placeholders | Keeps yours, with [brackets] in examples |
| Reasoning before the verdict | Yes | Yes |
| Fixed output sections | Inputs, Instructions Structure, Instructions | Steps, Output Format, Examples, Notes |
| Also generates functions and schemas | No | Yes |
Sources: Anthropic on GitHub: claude-cookbooks, metaprompt notebook (read November 6, 2026), OpenAI Docs: Prompt generation (read November 6, 2026)
What Anthropic says its Console generator does
Anthropic also builds a prompt generator into its Console. Its account on X announced it on 10 May 2024: describe what you want to achieve, and Claude writes the prompt using techniques like chain-of-thought reasoning. The post names the technique and not the steps, so the Console's own wording is not something you can read here. The cookbook's metaprompt is the one whose full text is public.
Describe what you want to achieve, and Claude will use prompt engineering techniques like chain-of-thought reasoning to create more effective, precise and reliable prompts.
A screenshot of X's own embed of the post, taken on 6 November 2026, with the time in UTC. Select it to open the post on X.
Check what the generator wrote
A generated prompt looks finished even when it is not, because it arrives in tidy sections with headings and a firm tone. These five checks come from what the two generators themselves ask for, and the table is this lesson's own list.
| Look for | What to do if it is missing | Where a generator asks for it |
|---|---|---|
| Each variable sits in its own tags, and long values come before the instructions | Wrap the variable in XML tags and move it up | Anthropic's metaprompt |
| Reasoning or a justification comes before the verdict | Ask for the reasoning first and the score last | Both generators |
| The output format is stated, with its length and syntax | Write the format in, and show one sample | OpenAI's meta-prompt, Output Format |
| Your own rules and examples are still there | Paste them back in from your original | OpenAI's meta-prompt, Preserve User Content |
| No leftover placeholders such as [Your Name] | Fill them by hand, since the notebook only fills {$NAME} variables | Anthropic's notebook |
Common mistakes
- Describing the job in three words. "Write emails" gives the generator nothing to shape. Say who the email goes to, what the input is and what a good result looks like.
- Handing a long prompt that already works to a generator and expecting a fresh rewrite. For a complex prompt, OpenAI's meta-prompt only adds clarity and missing parts and keeps the original structure.
- Using the metaprompt for a chatbot with many turns. Anthropic built it for single-turn prompts.
- Changing the task and forgetting
VARIABLE_VALUES. The notebook then asks for each value withinput(), or uses a placeholder when it cannot ask. - Saving the first draft. Anthropic says outright not to be afraid to change it.
Try it yourself
- Pick one task you repeat at work, such as replying to a complaint or tagging support tickets.
- Write it as a task line plus the names of the inputs that change.
- Get one draft from the notebook and one from OpenAI's meta-prompt, then put both through the check table.
- Run the better draft on three real inputs and write down where it slips. Those slips are what the next lessons help you fix.
Next: improve a prompt you already have
A generated prompt is a first version. Lesson 2 starts from a prompt that already exists, shows how OpenAI's optimizer and edit meta-prompt rework it, and reports what Anthropic says its prompt improver does.
Check yourself
Anthropic's metaprompt notebook is designed for which kind of prompt?
Show answer
A. Single-turn question and answer prompts The notebook says it is designed for single-turn question and answer prompts, not multi-turn ones.
What does OpenAI's meta-prompt say about reasoning and conclusions in a generated prompt?
Show answer
C. Put reasoning steps before any conclusion Its Reasoning Before Conclusions guideline asks for reasoning first and says conclusions, classifications and results should always appear last.
In the notebook, what does VARIABLES = ["CUSTOMER_EMAIL", "COMPANY_NAME"] do?
Show answer
B. Names the inputs the generated template must use The notebook tells the model to use exactly those input variables and no others, written as {$NAME}.
You have a long prompt that already works. What does OpenAI's meta-prompt do with a complex prompt?
Show answer
D. Adds clarity and missing parts without changing its structure Its Minimal Changes guideline says to improve an existing prompt only if it is simple. For a complex one it adds clarity and missing elements without altering the original structure.
Frequently asked questions
What is an AI prompt generator?
A tool or a prompt that turns a short description of a job into a first draft of a prompt. Anthropic and OpenAI each publish one. You supply what it cannot know, such as your product, your tone and what a good answer looks like.
What is a metaprompt?
It is a prompt whose output is another prompt. Anthropic's notebook uses the name metaprompt, and OpenAI's guide writes meta-prompt for the instructions behind its Generate button.
Can I use ChatGPT or Claude to write prompts for me?
Yes. Asking a chat app to write a prompt for your task works, and a meta-prompt adds a fixed set of rules so every draft follows the same structure. To reuse one, paste its text first and your task second.
Is a generated prompt better than one I write myself?
Neither vendor says so. OpenAI frames generation as a way to get started quickly. Run the generated prompt and yours on the same inputs and keep the one whose replies you prefer, as lesson 3 shows.
Does the Anthropic metaprompt work for chatbots with many turns?
It was written for one question and one answer, so a chatbot's back-and-forth is outside what its notebook claims to handle. For a chat product, adapt a generated draft by hand and test it over several turns.
How do I write a good task description for a prompt generator?
Say who the prompt is for, what goes in, what should come out and any rule that must hold. The notebook's own examples run from "Rate a resume according to a rubric" to "Explain a complex scientific concept in simple terms".
Sources
- Anthropic on GitHub: claude-cookbooks, metaprompt notebook https://github.com/anthropics/claude-cookbooks/blob/main/misc/metaprompt.ipynb
- OpenAI Docs: Prompt generation https://developers.openai.com/api/docs/guides/prompt-generation
- X: Anthropic (@AnthropicAI) on generating prompts in the Anthropic Console https://x.com/AnthropicAI/status/1788958483565732213

