WriteMyAIPromptFree, no sign-up

Prompting Claude vs ChatGPT vs Gemini

Published

Claude follows XML-delimited structure most reliably, ChatGPT works best with markdown headings and a separate system message, and Gemini prefers the task stated before the material rather than after. The content of a good prompt is identical across all three — only the packaging changes.

Do different AI models need different prompts?

The content does not change. The six things that make a prompt work — specific task, supplied context, defined format, explicit constraints, an example, stated criteria — are identical whichever model you send it to. A vague prompt is vague everywhere.

What changes is packaging: which delimiters a model follows most reliably, where it expects the instruction relative to the material, and how it handles a system and user split. These differences are real but modest, and they matter most on long prompts where structure has to survive thousands of tokens.

How should you structure a prompt for Claude?

Use XML tags. Claude was trained with XML-delimited structure and follows it more reliably than markdown headings, particularly when a prompt mixes reference material with instructions.

<role>
You are a technical editor.
</role>

<context>
[the document to edit]
</context>

<task>
Tighten this for clarity without changing the argument.
</task>

<constraints>
- Preserve the author's voice
- Do not add new claims
</constraints>

<output_format>
Return the edited text, then list the three most significant changes.
</output_format>

Now tighten the document above.
  • Long context first, task last. Claude handles very long contexts well, and putting the material before the instruction consistently outperforms the reverse.
  • Tag names are arbitrary. <context> and <background> work equally well. Consistency matters; the specific word does not.
  • Use [assistant prefill](/glossary/assistant-prefill/). Starting Claude’s reply with { forces valid JSON and removes the preamble entirely. This is a genuine capability difference — most competitors do not offer it.

How should you structure a prompt for ChatGPT?

Markdown headings, and a real split between the system and user messages when calling the API.

## Role
You are a technical editor.

## Constraints
- Preserve the author's voice
- Do not add new claims

## Output format
Return the edited text, then the three most significant changes.

---

## Context
[the document to edit]

## Task
Tighten this for clarity without changing the argument.
  • Stable behaviour in the system message, the request in the user turn. Pasting everything into one block works in the chat interface but loses a real weighting advantage in the API.
  • Structured outputs are enforceable. Where output must parse, a JSON schema constraint beats asking politely.
  • Reasoning models change the advice. With models that deliberate internally, drop "think step by step" and spend the space on constraints.

How should you structure a prompt for Gemini?

State the task first, then supply the material. This is the main structural difference from Claude, and it is worth respecting when a prompt carries a lot of reference text.

**Task**
Tighten the document below for clarity without changing the argument.

**Constraints**
- Preserve the author's voice
- Do not add new claims

**Output format**
Return the edited text, then the three most significant changes.

**Document**
[the document to edit]

Now produce the edit.

Gemini is also literal about output structure: an explicit schema block gets followed closely, and vague format descriptions get interpreted loosely. If the shape matters, write the shape out.

What are the practical differences in one table?

Prompt packaging by model family
ClaudeChatGPT / GrokGeminiOpen-weight (Llama etc.)
Preferred delimitersXML tagsMarkdown headingsMarkdown with bold labelsPlain uppercase labels
Task positionLast, after contextAfter contextFirst, before materialEither, be explicit
System / user splitYes, distinctYes, distinctYesVaries by serving stack
Response prefillYesNoNoOften, via the API
Best for very long contextStrongStrongStrongVaries
Format enforcementPrefill + instructionSchema-constrained outputExplicit schema blockInstruction only

Treat this as packaging guidance, not a capability ranking. Model quality changes with every release; how each family parses structure has been comparatively stable.

What works the same on every model?

Nearly everything that matters, which is the useful conclusion. If you spend your effort here rather than on per-model tuning, your prompts port well.

  • Specificity beats volume. A precise short prompt beats a vague long one everywhere.
  • One worked example outperforms three paragraphs describing the output.
  • Instructions at the very end get more weight than instructions in the middle.
  • Separating instructions from source material prevents both confusion and injection.
  • Uncheckable adjectives constrain nothing, on any model.
  • A stop condition turns confident invention into an answerable question.

This site’s builder writes the same compiled content into whichever syntax you pick, which is the practical version of that point: the thinking is portable, the packaging is not.

Common questions

Which AI model is best for prompting?
The question is less useful than it sounds, because rankings change with each release and depend heavily on the task. A better framing: Claude for long documents and XML-structured work, ChatGPT where enforceable structured output matters, Gemini where the task is clear and the material is large. All three reward the same fundamentals.
Can I reuse the same prompt across different models?
Usually yes, with reduced reliability. XML tags in a ChatGPT prompt are understood but not weighted the way Claude weights them. For anything running in production it is worth writing the packaging for the model you are actually using.
Do XML tags work in ChatGPT?
They work — the model understands them as delimiters — but markdown headings are followed more reliably. The important thing is having clear separation between sections at all; the specific mechanism is secondary.
Why does Claude respond well to XML tags?
Anthropic trained on XML-delimited structure and documents it as the recommended approach. The practical effect is strongest on long prompts, where markdown headings are more easily lost among the content they are meant to separate.
What is assistant prefill and which models support it?
Prefill places text at the start of the model’s own reply so it continues from there — starting with `{` forces valid JSON and removes any preamble. Anthropic’s API supports it directly, and several open-weight serving stacks do too. It is not available in most chat interfaces.

Terms used in this guide

  • How to write an AI prompt that works

    A step-by-step method for writing AI prompts: the six parts, the order that matters, and the two structural rules that change output before you change a single word.

  • Getting structured output from AI

    How to make a model return JSON that parses every time: schema placement, the null rule, prefill, and why "return only JSON" is not enough on its own.

  • Prompting with long documents and large context

    Large context windows do not mean you should fill them. Where models lose information, why selection beats stuffing, and how to structure a long prompt.

Put this into practice in the prompt builder, or see all guides.