# Prompt engineering techniques

> Which prompt engineering techniques still work, and which Anthropic, OpenAI and Google now advise against on reasoning models, with a table matching each to a problem.

Source: https://www.honeyhive.ai/learn/prompt-engineering-techniques (updated 2026-11-11)

The prompt engineering techniques that hold up across models are clear instructions, labeled sections, a few good examples, long inputs placed before the question, a stated output format and splitting big tasks into steps. Techniques built for older models, such as "think step by step" and prefilled replies, now do little or cause errors on current reasoning models. Which technique to use depends on the problem and on whether the model reasons internally.

This page covers techniques. For the definition and the test-and-iterate loop, see [prompt engineering](/learn/what-is-prompt-engineering).

## Techniques that hold up across providers

**Give each kind of content its own label.** Anthropic says XML tags [help Claude parse prompts unambiguously](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) when a prompt mixes instructions, context, examples and variable input, and advises consistent tag names. OpenAI's reasoning guide [recommends delimiters](https://developers.openai.com/api/docs/guides/reasoning-best-practices) such as markdown, XML tags and section titles.

**Put long input first and the question last.** Anthropic [advises](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) placing long documents near the top, above the query, instructions and examples. Google [says](https://ai.google.dev/gemini-api/docs/prompting-strategies) to supply large context first and put the specific question "at the very end of the prompt." Google adds that [reordering content can sometimes change the response](https://ai.google.dev/gemini-api/docs/prompting-strategies).

**Show examples, and keep them few.** Anthropic [says](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) a few well-crafted examples improve accuracy and consistency, and that they should be relevant, diverse and wrapped in `<example>` tags, with 3 to 5 working best. Google [recommends](https://ai.google.dev/gemini-api/docs/prompting-strategies) always including few-shot examples, and warns that too many can make the model overfit. It also says to keep structure and whitespace consistent across them. More in [few-shot prompting](/learn/few-shot-prompting).

**Say what you want, not what to avoid.** Anthropic's [formatting advice](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) is to replace "Do not use markdown" with a description of the output you do want, such as flowing prose paragraphs. Google [says](https://ai.google.dev/gemini-api/docs/prompting-strategies) you can specify the response format, such as a table or list, directly in the instructions. When you need a machine-readable shape, see [structured output](/learn/structured-output-llm).

**Set a role or standing rules once.** Anthropic [says](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) a role in the system prompt focuses behavior and tone, and that even one sentence helps. See [system prompt](/learn/system-prompt) for where each provider puts it.

**Split big tasks.** Google [describes](https://ai.google.dev/gemini-api/docs/prompting-strategies) three ways: one prompt per instruction, chaining steps so each output feeds the next, or running parts in parallel and aggregating. Anthropic says explicit chaining [is still useful](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) when you need to inspect intermediate outputs or enforce a fixed pipeline.

## Techniques that changed on reasoning models

Reasoning and thinking models produce their own chain of thought before answering, so three older techniques now differ by model type.

| Technique | Older, non-reasoning models | Reasoning or thinking models |
|---|---|---|
| Step-by-step prompting | Asking for steps was the standard way to get reasoning. | OpenAI's reasoning guide says ["think step by step" is unnecessary](https://developers.openai.com/api/docs/guides/reasoning-best-practices) and may not help, and can sometimes hinder. Google says asking for visible reasoning is [generally not necessary](https://ai.google.dev/gemini-api/docs/prompting-strategies) on Gemini 2.5 and 3. |
| Few-shot examples | Recommended by all three providers. | OpenAI says these models [often do not need them](https://developers.openai.com/api/docs/guides/reasoning-best-practices) and to try without first. Anthropic says [examples still work with thinking](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) and shape how Claude approaches similar problems. |
| Detailed procedure in the prompt | OpenAI says GPT models [benefit from explicit instructions](https://developers.openai.com/api/docs/guides/prompt-engineering) on how to do the task. | OpenAI says reasoning models do better with [high-level guidance](https://developers.openai.com/api/docs/guides/prompt-engineering) and ["straightforward prompts"](https://developers.openai.com/api/docs/guides/reasoning-best-practices). |
| Prefilled reply | Start the answer yourself to force a format. Google still [describes prefixes](https://ai.google.dev/gemini-api/docs/prompting-strategies). | Anthropic [no longer supports](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) prefill on the last turn starting with Claude 4.6 models, and requests that use it return a 400 error. |

Anthropic keeps manual chain-of-thought as a fallback for when thinking is off. On its newest models it says a prompt that asks the model to write out its reasoning in tags [might be declined](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices), so it advises relying on thinking at a lower effort level when cost or latency matters. For the research behind chain of thought and when it still helps, see [chain-of-thought prompting](/learn/chain-of-thought-prompting).

Emphasis has a similar problem. Anthropic [notes](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) that Claude Opus 4.5 and 4.6 respond more strongly to the system prompt than earlier models, so a line like "CRITICAL: You MUST use this tool when..." can now cause overuse. It suggests plain wording such as "Use this tool when...".

## Which technique for which problem

| Problem | Try | Source |
|---|---|---|
| Output format or tone is inconsistent | A few diverse examples, a stated format | [Anthropic](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) |
| The model mixes up instructions and data | Labeled sections or delimiters | [OpenAI](https://developers.openai.com/api/docs/guides/reasoning-best-practices) |
| Long document, vague answer | Document first, question last | [Google](https://ai.google.dev/gemini-api/docs/prompting-strategies) |
| Multistep task fails partway | Split into chained prompts you can inspect | [Anthropic](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) |
| Math or code answers contain errors | Ask the model to check its answer against your criteria | [Anthropic](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) |
| Missing facts the model cannot know | Add retrieved context to the prompt | [OpenAI](https://developers.openai.com/api/docs/guides/prompt-engineering) |
| Same prompt costs too much per call | Put reusable content at the start of the prompt for caching | [OpenAI](https://developers.openai.com/api/docs/guides/prompt-engineering) |
| Wording changes keep failing | Rephrase or reorder, then search systematically with [prompt optimization](/learn/prompt-optimization) | [Google](https://ai.google.dev/gemini-api/docs/prompting-strategies) |

Anthropic [says](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) that appending a request to verify the answer against test criteria catches errors reliably, especially in coding and math. It makes an exception for Claude Opus 5, which verifies its own work well, so carried-over instructions can cause over-verification and extra latency. A prompt tuned for one model can therefore be wrong for the next, which is why OpenAI advises [pinning production applications to specific model snapshots](https://developers.openai.com/api/docs/guides/prompt-engineering).

When a prompt grows past instructions into tools, retrieved data and history, the work is [context engineering](/learn/context-engineering).

## Testing a technique before you keep it

Every technique above is a hypothesis about one model. The provider guides disagree on examples and step-by-step prompting partly because the models differ. Run each change on the same set of inputs and compare scores before adopting it, and run it again when you switch models. See [LLM evaluation](/learn/llm-evaluation) and [prompt versioning](/learn/prompt-versioning).

In HoneyHive, the Playground [lets you create, test and version prompts](https://docs.honeyhive.ai/v2/prompts/overview.md) and compare models. Offline [experiments on a dataset](https://docs.honeyhive.ai/v2/evaluation/introduction.md) compare prompt versions and catch regressions before deploy.

## FAQ

### What are the most useful prompt engineering techniques?

Clear instructions, labeled sections, a few representative examples, long inputs placed before the question, an explicit output format and splitting big tasks into steps. The Anthropic, OpenAI and Google guides each recommend several of them. See [prompt engineering](/learn/what-is-prompt-engineering) for the definition.

### Should I still tell the model to think step by step?

Not on reasoning models. OpenAI's reasoning guide says to [avoid chain-of-thought prompts](https://developers.openai.com/api/docs/guides/reasoning-best-practices) because these models reason internally, and that they can sometimes hinder performance. See [chain-of-thought prompting](/learn/chain-of-thought-prompting).

### How many examples should a prompt include?

Anthropic suggests [3 to 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices). Google warns that [too many examples can lead to overfitting](https://ai.google.dev/gemini-api/docs/prompting-strategies). OpenAI says reasoning models [often do not need examples](https://developers.openai.com/api/docs/guides/reasoning-best-practices). See [few-shot prompting](/learn/few-shot-prompting).

### How do I know a technique helped?

Run the old and new prompt on the same set of test inputs and compare scores. OpenAI recommends [building tests and evaluation suites](https://developers.openai.com/api/docs/guides/prompt-engineering) that measure prompt behavior. See [LLM evaluation](/learn/llm-evaluation).
