Section 3 of 5 · 10 min read
The Sandwich Method
A well-structured prompt is wrapped on both ends. Context above — who you are, what you're doing, what the output is for. Constraints below — format, length, what to avoid, how to handle uncertainty. In between: the actual request. This is the Sandwich Method, and it changes how useful AI becomes for real work.

Why context is the real unlock
Prompting is about asking clearly. Context engineering is about giving the AI enough information to actually help with your specific situation. The distinction matters: a perfect prompt without context is like asking a brilliant stranger for advice. They can only guess what you need, who you are, and what constraints apply. With context, the same question produces something genuinely tailored.
Context engineering moved from buzzword to core skill in 2025 because the models got good enough that the limiting factor shifted from the model's capability to the quality of information you give it. A mediocre prompt with excellent context often outperforms an excellent prompt with no context. The AI is a probabilistic machine — more relevant information shifts the probability toward the output you need.
The practical challenge is that context takes effort to provide. The Sandwich Method is a systematic way to build that context efficiently — and to make it persistent so you don't rebuild it from scratch every session.
A perfect prompt without context is like asking a brilliant stranger for advice. Context is what turns the stranger into someone who knows your work.
The three-layer structure
The Sandwich Method structures any complex prompt into three layers. The metaphor is intentional — the context is the bread that holds the request together and makes it substantive.
Top slice — Context
Who you are, what organization you work for, what project this is for, who the audience is, what has already been tried, what constraints apply. Anything the AI would need to understand your situation rather than a generic version of your situation.
Filling — The request
The RACE-structured ask: Role + Action + any context specific to this task that isn't covered above. The filling is the part most people write first — the Sandwich Method just ensures it's not doing all the work alone.
Bottom slice — Constraints
Format requirements, length limits, what to avoid, how to handle uncertainty, verification instructions. Constraints belong at the end because they tend to be overridden if they come too early in a long prompt. The last thing the model sees before generating output has disproportionate influence.
Before and after: a real climate example
Here's what the same climate analysis request looks like with and without the Sandwich Method.
Without the Sandwich
“Analyze the EU Carbon Border Adjustment Mechanism for my presentation.”
The AI will produce a competent but generic policy summary. It will explain what CBAM is, how it works, maybe some criticism. Nothing wrong with it. Nothing particularly useful either — no connection to your specific work, your audience, or what you actually need to say.
With the Sandwich
Context (top)
I'm a sustainability manager at a mid-sized European manufacturing company. We export steel components to the EU. My CEO has asked me to explain CBAM's financial implications for our business at next month's board meeting. The board has no policy background — they understand revenue and cost, not carbon accounting.
Request (filling)
As a climate policy expert who advises corporate boards, analyze the EU Carbon Border Adjustment Mechanism. Focus specifically on how it will affect our cost structure and what we need to do before 2026 to be compliant.
Constraints (bottom)
Keep it under 400 words. Use plain language — no EU regulatory jargon without explanation. Lead with the financial number if you can estimate it. Flag explicitly if any figures are uncertain or estimated.
Now the AI can produce something boardroom-ready, financially framed, and appropriately caveated — rather than a policy summary you'd need to rewrite entirely.
The real compounding: persistent context
The Sandwich Method applied once in a conversation is a marginal improvement. Applied systematically — and made persistent — it compounds. The full payoff comes when you don't have to rebuild the context layer every time you start a new conversation.
This is where system instructions come in. You write the context layer once — who you are, your organization, your constraints, your preferred communication style — and it loads automatically in every conversation. The Sandwich Method then applies just to the per-request context: what's specific to this task that the AI doesn't already know from your standing instructions.
Over time, a well-configured context setup means every AI interaction starts from a baseline of genuine familiarity with your work, rather than from zero. The effort moves from per-conversation setup to ongoing refinement. The next section explains exactly how to build that persistent layer.
The Sandwich Method applied once saves minutes. Made persistent through system instructions, it saves hours — and produces output that's genuinely tailored rather than repeatedly generic.
Practical notes on context management
Context has costs. Every piece of information you include takes up space in the model's context window — the finite amount of text it can hold in active attention at once. Long context windows (100k+ tokens in current models) mean this is rarely a hard constraint, but it does affect quality: models exhibit something like “context rot” in very long conversations, where earlier content receives less attention.
The practical implication: be relevant, not exhaustive. Include context that actually changes how the AI should respond, not everything you could say about your situation. When a conversation runs long, consider starting fresh with a compact summary of the key context rather than continuing in a degraded session.
For long documents, tell the AI where to focus attention. If you share a 50-page report, specify which sections matter for this task. Directing attention within the context is more effective than hoping the model will weight everything appropriately on its own.