Prompt Engineering in 2026: The Playbook That Works Across Claude and GPT
Prompt engineering in 2026 has two layers: cross-model fundamentals (clear direct instructions, motivated rules, 3-5 structured examples, XML boundaries, long documents before the question) and model-specific overrides that matter more than ever, because the newest models need instructions deleted as often as added. Start here, then apply the guide for your model.
Prompt engineering in 2026 is two skills, not one. The first is the stable cross-model craft: clear instructions, good examples, unambiguous structure. The second is newer: knowing what your specific model no longer needs, because on the latest frontier models the most common prompting mistake is instructions left over from weaker predecessors. This guide covers the fundamentals both Anthropic and OpenAI publish, then hands off to the model-specific layer.
The model-specific guides: prompting Claude Opus 5.5 (effort, deleting "think carefully", finish lines), prompting Claude Sonnet 5.5 (effort and breaking changes), prompting GPT-6 Astra and GPT-6.1 Sol (effort, migration), prompting Claude Fable 5 (effort, long runs, memory, safeguards), prompting Claude Opus 5 (verbosity, deleting verification, subagent caps), and prompting GPT-5.6 (roles, structure, effort, agentic patterns). Read the fundamentals here once; read the model guide for whatever you run in production.
Key Takeaways
- Be clear, direct, and specific. Both vendors' first rule. Anthropic's golden test: if a colleague with minimal context would be confused by your prompt, the model will be too.
- Explain the why. A rule with its motivation ("never use ellipses, because a text-to-speech engine reads this") outperforms the bare rule; models generalize from the reason.
- Use 3-5 diverse examples wrapped in XML-style tags to steer format, tone, and structure. Tool use is the exception on Claude 5 models: Anthropic found tool-use examples constrain how they explore, so design expressive tool parameters instead (context engineering for Claude 5).
- Structure with XML and Markdown. Separate instructions, context, examples, and input with tags; order developer messages identity, instructions, examples, context.
- Long documents go first, query last: up to 30% better responses on multidocument tasks per Anthropic, and cache-friendly ordering saves money on both platforms.
- Control cost with effort, not thinking bans. Adaptive thinking plus effort settings replaced manual budgets; low effort with thinking on usually beats thinking off.
- For agents, prompt for state: structured test files, progress notes, git checkpoints, and grounded progress claims carry long tasks across context windows.
The Fundamentals: Clarity, Motivation, Examples
Modern models follow instructions well enough that the old bag of tricks ("act as an expert," "you are the world's best programmer") matters far less than the quality of information you provide. What replaced it:
Be explicit about the output you want. "Create an analytics dashboard. Include as many relevant features and interactions as possible. Go beyond the basics" reliably outperforms "create an analytics dashboard." If you want above-and-beyond behavior, ask for it; if you want minimal scope, say that instead.
Attach the reason to the rule. Anthropic's canonical example: "never use ellipses" is weaker than "your response will be read aloud by a text-to-speech engine, so never use ellipses, since the engine cannot pronounce them." The model generalizes from the explanation to cases your rule never anticipated. This is also why context about who the work is for and what it enables improves agent output.
Show, don't describe. Include 3-5 examples that mirror your real use case, vary enough to avoid teaching unintended patterns, and sit inside example tags so the model can tell demonstration from instruction. Both vendors rank this among the most reliable techniques they have. The exception is tool use on Claude 5 models: the Claude Code team found that tool-use examples constrain the newest models to a narrow exploration space, so it now designs expressive tool parameters (an enum of allowed states, for example) instead. Our context engineering guide for Claude 5 covers that shift.
Structure: Roles, Tags, and Document Placement
Give every prompt an unambiguous skeleton. On OpenAI's Responses API that means the instructions parameter or a developer message for rules (prioritized ahead of user input), with the developer message ordered identity, then instructions, then examples, then context. On Claude, a one-line role in the system prompt focuses tone and behavior, and XML tags (<instructions>, <context>, <input>) keep mixed content unambiguous on both platforms.
For long-context work (20k+ tokens), placement matters more than wording. Put documents at the top, wrapped in per-document tags with source metadata, and your question at the end; Anthropic reports up to 30% better response quality from this ordering on complex multidocument inputs. For extraction-heavy tasks, ask the model to quote the relevant passages first, then answer from the quotes. And keep reusable content at the beginning of the prompt: both platforms' prompt caching rewards stable prefixes with real cost and latency savings.
Thinking, Effort, and the New Cost Controls
The cost dial moved. Anthropic's current models use adaptive thinking, where the model decides when and how much to think, calibrated by an effort parameter; manual thinking budgets are deprecated, and on the newest models setting one returns an error. OpenAI exposes reasoning.effort from none through max on GPT-5.6; GPT-6 Astra and GPT-6.1 Sol reject none and start at low, per OpenAI's GPT-6 guide. The shared guidance: prefer lowering effort over disabling reasoning, because low effort with thinking enabled usually outperforms no thinking at similar cost.
Two prompting consequences follow. First, general instructions beat prescriptive steps: "think thoroughly" often produces better reasoning than a hand-written plan the model must follow. On Claude Opus 5.5, Anthropic goes further and advises removing think-carefully lines from chat system prompts, because the model decides how much to think and effort is the main control; in its testing, replies started sooner with no clear quality loss (Anthropic, Prompting Claude Opus 5.5). Second, tune anti-laziness prompting down when migrating: instructions written to fight undertriggering on older models ("CRITICAL: you MUST use this tool") cause overtriggering on current ones. Normal language ("use this tool when...") is enough.
One deprecation worth calendaring on each side: Anthropic no longer supports prefilled assistant responses on current models (migrate to structured outputs or direct instructions), and OpenAI shuts down reusable prompt objects (v1/prompts) on November 30, 2026 in favor of prompts versioned in code.
Agentic Prompts: State, Scope, and Honesty
Long-running agent work has its own fundamentals, consistent across vendors:
| Problem | The prompt-level fix |
|---|---|
| Losing track across context windows | Structured state files (a tests.json, a progress notes file), git checkpoints, and a first-window prompt that sets up tests and setup scripts |
| Scope creep and over-engineering | "Only make changes directly requested or clearly necessary"; no abstractions for one-time operations, no defensive code for impossible scenarios |
| Gaming the tests | "Tests verify correctness, not define the solution"; require general implementations and have the model flag incorrect tests rather than working around them |
| Hallucinated claims about code | "Never speculate about code you have not opened"; require reading referenced files before answering |
| Fabricated progress reports | Require every status claim to trace to a tool result from the session, with unverified work flagged as such |
| Parallel tool usage | Explicitly ask for independent tool calls in parallel; both platforms' current models sustain it near 100% when prompted |
Constraints remain the guardrails they always were: output format ("return only the function body"), scope ("only modify handleSubmit"), pattern ("use the error handling from lib/errors.ts"), and negative constraints ("do not add new dependencies"). Layer them, and keep persistent, project-level context in instruction files like CLAUDE.md so every session starts oriented; see our Claude Code context management guide for that discipline.
Iterate, Then Delete
Iterative refinement still beats one-shot prompting: structure first, complexity in layers, targeted corrections, and a restart with better initial context once you have made three corrections without converging. But 2026 adds a final step the old loop lacked: after your prompt works, delete lines from it and re-test. On the newest models, instructions the model no longer needs are not merely dead weight; verification instructions cause over-verification on Claude Opus 5, prescriptive skills degrade Claude Fable 5 output, and aggressive tool-triggering language causes overtriggering everywhere. The best prompt is the shortest one that still passes your evals.
Corrections and Updates
- October 9, 2026: This page described reasoning effort as running from none to max and recommended "think thoroughly" prompts without exceptions; GPT-6 Astra and GPT-6.1 Sol now reject
none, and Anthropic advises removing think-carefully lines on Claude Opus 5.5.
Sources
- Anthropic, "Prompting best practices": https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
- OpenAI, "Prompt engineering": https://developers.openai.com/api/docs/guides/prompt-engineering
- OpenAI, "Using GPT-6": https://developers.openai.com/api/docs/guides/latest-model
- Anthropic, "Prompting Claude Fable 5": https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5
- Anthropic, "Prompting Claude Opus 5": https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5
- Anthropic, "Prompting Claude Opus 5.5": https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5
- Anthropic, "The new rules of context engineering for Claude 5 generation models" (July 24, 2026): https://claude.dev/blog/the-new-rules-of-context-engineering-for-claude-5-generation-models/
Read next
More practices and workflows- Claude
Prompting Claude Fable 5: What to Change and What to Delete
Prompt Claude Fable 5 with less, not more: brief instructions now beat enumerated rule lists, and old skills written for prior models can degrade output. Use effort as your main cost control, expect longer turns, ground progress claims in tool results, and configure fallback to Opus 4.8 for safeguard refusals.
- Claude
Prompting Claude Opus 5: Trim the Verbosity, Delete the Verification
Claude Opus 5 needs opposite prompting from its predecessors: you prompt for conciseness because effort no longer controls visible length, and you delete verification and double-check instructions because the model already does both. Constrain scope on narrow tasks, cap subagent spawning for cost, and keep thinking enabled at low effort rather than disabling it.
- OpenAI
Prompting GPT-5.6: Message Roles, Effort, and Agentic Prompts That Work
GPT-5.6 rewards precise, explicit prompts: structure developer messages as identity, instructions, examples, then context, keep stable content first for prompt caching, and pick reasoning effort deliberately (xhigh for complex multi-step work). Move saved prompt objects into code before OpenAI shuts down v1/prompts on November 30, 2026.
- Claude Code
Master Claude Code's 1M Context Window: Rewind, Compact, Clear, and Subagents
Claude Code's 1M token context window opens longer autonomous sessions but introduces 'context rot' -- degraded performance as the window fills. Master four turn-end tools: /rewind to drop bad branches, /compact to summarize and continue, /clear to start fresh with a distilled brief, and subagents to wall off noisy work in their own context.
- Claude
Prompting Claude Opus 5.5: Delete 'Think Carefully', Name the Finish Line, Start at Medium
Prompt Claude Opus 5.5 by handing over the whole task with a clear finish line, deleting “think carefully” lines, and starting at medium effort. Thinking is always on, so effort is your depth control. Add a CLAUDE.md rule that names when to stop, and set effort explicitly instead of carrying Opus 5 settings over.
- OpenAI
Prompting GPT-6 Astra and GPT-6.1 Sol: Effort, Migration, and Prompts That Keep It Working
GPT-6 Astra follows instructions more closely than earlier OpenAI models and asks more questions, so prompting it is mostly removing old scaffolding: grant permission to finish, trim skills and AGENTS.md, and stop ordering tests. In the API, replace none effort with low, move tool calls to Responses, and switch caching to prompt_cache_options.ttl.
- Claude
Context Engineering for Claude 5: The New Rules for CLAUDE.md, Skills, and Tools
Context engineering for Claude 5 models means deleting more than you add. Anthropic says it removed over 80% of Claude Code's system prompt for models like Opus 5 and Fable 5 with no measurable loss on its coding evaluations. Replace rules with judgement, examples with well-designed tools, and always-loaded instructions with skills, references, and auto memory.
Frequently Asked Questions
Is prompt engineering still relevant with 2026 frontier models?
Yes, but it inverted in places. The fundamentals (clarity, examples, structure) still lift quality on every model, while over-prompting now actively hurts: Anthropic warns that verification instructions cause over-verification on Opus 5 and that prescriptive skills degrade Fable 5 output. Knowing what to delete is the new skill.
What is the single highest-leverage prompting technique?
Structured examples. Both vendors put well-crafted few-shot examples near the top: Anthropic recommends 3-5 diverse examples wrapped in example tags, and OpenAI recommends diverse input/output pairs in the developer message. Examples steer format and tone more reliably than any written description of them.
Where should long documents go in a prompt?
At the top, above the query and instructions. Anthropic reports that placing queries at the end after longform inputs can improve response quality by up to 30% in tests, and recommends wrapping each document in XML tags and asking the model to quote relevant passages before answering.
How do I control cost on reasoning models now?
Through effort settings rather than thinking budgets. Anthropic deprecated manual thinking budgets in favor of adaptive thinking plus an effort parameter, and OpenAI exposes reasoning effort from none to max on GPT-5.6, while GPT-6 Astra and GPT-6.1 Sol start at low. Lower effort with thinking enabled usually beats disabling reasoning outright.