What is context engineering? A guide for marketing teams
A clear prompt tells an AI agent what you want. Context engineering covers what the agent knows as it works: which brand facts, evidence and examples each job needs, where they live, and who keeps them current.
28 min readWritten by Ampere
Short answer
What is context engineering?
Context engineering is the practice of deciding what information an AI model or agent sees for each task, such as instructions, brand facts, product details, evidence and examples, and keeping that information current and organized. It includes the prompt but goes beyond it. For marketing teams, it means supplying the right version of each fact, leaving out outdated or irrelevant material, and naming who maintains it.
Summary
Good marketing work from an AI agent depends on what the agent has in front of it, and context engineering is the practice of choosing and maintaining that material. A model knows only its training and what is supplied for the task, so a missing or outdated fact cannot be fixed by rewording the request. The prompt matters as one part of that context.
More context is not automatically better. Research on long inputs found that models use information in the middle of a long input less reliably, and in one test from a 2025 vendor report, every model did significantly better with a focused, roughly 300-token version of the material than with a full version of about 113,000 tokens, most of it irrelevant. Near-miss material, such as last year's pricing page, acts as a distractor.
The guide's marketing context stack sorts what an agent needs into five layers: brand, offer, audience, evidence and task. The layers run from slow-changing brand context, which may hold for a year or more, through offer and audience to evidence, which goes stale in days or months, and the task, which is new for every job. Each layer has its own source of truth and owner.
Choosing context for a job starts from the deliverable: take only what a capable newcomer would need, prefer annotated examples to adjectives, remove superseded versions and say which source wins in a conflict. A worked example of a fictional launch email shows what to include, such as the email section of the voice guide and dated beta data, and what to leave out, such as the full brand book.
Saved context stays useful when each layer lives in one place that the team and the agent both read, with a named owner and a date, because copies in personal chats drift apart after the first edit. A 2025 paper on AI systems that maintain their own context found that repeatedly condensing it can strip out useful detail, so add small, dated entries and have a person approve changes to brand facts and claims.
The guide's copyable context brief records the brand, offer, audience and evidence details a job needs, which examples to follow, what to leave out, which source wins, what is still unknown and who reviews the work. A six-question audit checks the setup behind it, from sources of truth and owners to dated evidence and shared context, and any failed answer points to context that needs fixing before anyone writes a longer prompt.

Contents
- What context engineering means
- Context engineering vs prompt engineering
- What a context window is, and why more context is not better
- The marketing context stack: brand, offer, audience, evidence and task
- How to choose the right context for a marketing task
- Where context should live and who keeps it current
- What agentic context engineering means
- How Ampere handles context for marketing work
- A context brief template for marketing tasks
- Sources and further reading
- Frequently Asked Questions
If you use AI for marketing work every week, you have probably learned to write a decent prompt. You name the audience, the format and the goal, and you attach an example of what good looks like. The drafts can still miss in ways no rewording fixes: a price that changed in the spring, a feature described the way it worked two releases ago, a tone that sounds like the category instead of the company. Two teammates can send the same request and get different claims back, because each works from different notes and files.
Misses like these start before the model reads the request. A model knows what it learned in training plus whatever is put in front of it for the task, and your current pricing, last month's positioning change and the claims your legal team approved can only reach it the second way. Context engineering is the practice of deciding what information an AI model or agent has in front of it for each task, and of keeping that information current, relevant and well organized. The prompt is part of that information. So are the brand guidelines, product notes, customer research, examples and tool results the agent works from.
For a marketing team, the work is less technical than the name suggests. It means deciding which version of the positioning an agent follows, which customer evidence it may cite and which examples show good work, then knowing where each of those lives and who keeps it accurate. A clear request still matters, and context engineering covers everything the request depends on. This guide explains how context engineering differs from prompt engineering and why more material can make results worse, sets out a five-layer model of marketing context, and ends with a context brief you can copy to check your own setup.
What context engineering means
Context engineering means treating everything a model sees during a task, not just the instruction you type, as material to choose, arrange and maintain. The term caught on in June 2025, when Shopify's chief executive, Tobi Lütke, wrote that he preferred it to "prompt engineering" because it better described the core skill: providing all the context a task needs to be "plausibly solvable by the LLM." About a week later, AI researcher Andrej Karpathy agreed, calling it the art and science of "filling the context window with just the right information for the next step."
Anthropic's Applied AI team set out a fuller definition in a September 2025 engineering post. It calls context engineering "the natural progression of prompt engineering." Prompt engineering is about writing and organizing instructions, while context engineering manages the whole set of information the model receives, which the post lists as system instructions, tools, outside data and message history. The post also points out a difference that affects agents. Writing a prompt is a single task, but choosing context happens again each time something is passed to the model, so an agent that reads a web page or gets a tool result has new material to keep, shorten or drop before its next step.
In an AI marketing agent, context usually includes:
- standing instructions from the product, often called the system prompt
- your request or brief
- saved knowledge about the brand, products and audience
- files and attachments for this job
- examples of earlier work
- results from research and tools during the job
- the conversation so far
Products manage that material with techniques such as retrieval, which finds the relevant passages in a document collection and passes them to the model when a task needs them (often called retrieval-augmented generation, or RAG), and compaction, which summarizes a long session so the work can continue. How AI agents work explains both. Marketers rarely touch that machinery. Their part of context engineering is the content the machinery passes along: the facts, examples and rules, and whether they are right.
Context engineering vs prompt engineering
Prompt engineering is the craft of writing the instruction; context engineering is the larger job of deciding everything the model sees alongside it, including what to leave out. Neither works well without the other. A precise request that points to last year's pricing produces a precise, wrong draft, and complete, current context paired with a vague request produces careful work aimed at the wrong goal. Two neighboring ideas, memory and fine-tuning, are easy to confuse with both, so the table includes them.
| Approach | What it changes | The question it answers | How often it changes | Marketing example |
|---|---|---|---|---|
| Prompt engineering | The wording and structure of the request | What exactly should the model do now? | Every request | "Write a 120-word launch email for current customers and end with the setup link." |
| Context engineering | Everything the model sees for the task, including what is left out | What does the model need to know, and in what form, to do this job well? | Every task, and every step of an agent's work | Supplying the current release notes, the email voice guide and two approved launch emails, and leaving out the old pricing page |
| Memory | What a product saves outside the model and brings back in later tasks | What should carry over from one session to the next? | When saved knowledge is added, corrected or expires | A saved positioning brief that later sessions consult |
| Fine-tuning | The model itself, through further training on examples | How should the model behave by default, before any context? | With each new training run | Training a model on hundreds of past emails so its default style moves toward the house style |
Anthropic's post treats clear instructions and well-chosen examples as part of good context, so prompt engineering remains part of the job. How to brief an AI marketing agent explains what a strong marketing request contains. The two disciplines also give you a quick way to diagnose a weak draft. LangChain's Harrison Chase suggests asking whether the model lacked the information and tools it needed or had everything and still got it wrong, because the two failures need different fixes. A missing fact calls for material, and no rewording will supply it. A mistake made with everything in hand points to the request, the method or the model.

View the flowchart for diagnosing a weak draft at full size (opens in a new tab).
Memory feeds context engineering: saved knowledge helps only when the right part of it reaches the task, and choosing that part is a context decision. Fine-tuning works on the model instead. It can shift a model's default style or format, but it is a poor fit for facts that change, because every price change would need another training run, while a context update takes effect on the next task.
What a context window is, and why more context is not better
A context window is the limit on how much information a model can consider at once. Filling it does not guarantee better work, because models handle long, cluttered inputs less reliably than short, relevant ones. The window is measured in tokens, the small chunks of text that models read and write, each often a word or part of a word. Everything inside the window is available to the model for the current step. Anything outside it, such as a file the agent has not opened, is not.
In a June 2025 talk at Y Combinator's AI Startup School, Karpathy compared a language model to a new kind of computer, with the model doing the processing like a CPU and the context window acting as its working memory. Later write-ups, such as Lance Martin's June 2025 post on context engineering for agents, retell the comparison with the window as the computer's RAM. Like RAM, the window has a fixed capacity and holds only what is in use.
Many current models accept inputs far longer than any marketing brief, so it is tempting to attach every document and let the model sort it out. The research points the other way. In "Lost in the Middle," published in 2024 in Transactions of the Association for Computational Linguistics, Nelson F. Liu and colleagues gave models long inputs with one relevant document among many. Performance was often highest when the relevant information came at the beginning or end of the input, and it dropped significantly when that information sat in the middle, even for models built for long inputs.
A July 2025 technical report from Chroma, a company that makes retrieval software, tested 18 models and found that performance changed significantly as input length grew, even on simple tasks. In one test built on long chat histories, every model did significantly better with a focused version of about 300 tokens holding only the relevant parts than with the full history of about 113,000 tokens, most of it unrelated to the question. The authors note that their tests do not cover every real-world use and that they expect more complex tasks to degrade further.
The same report tested distractors, passages on the right topic that do not quite answer the question. A single distractor lowered accuracy, and four lowered it further. Marketing context is full of them. Last year's pricing page, the positioning statement from before a pivot and a claim legal never approved all look relevant to a request about pricing or positioning, and that resemblance is what makes them distractors.
Anthropic's post draws the practical conclusion: treat context as a finite resource and aim for the "smallest possible set of high-signal tokens" that makes the result you want likely. It also expects windows of every size to stay subject to clutter and relevance problems for the foreseeable future, so waiting for bigger ones is unlikely to solve it. Smallest does not mean shortest, though. The post adds that minimal "does not necessarily mean short," and research on agentic context engineering, described below, found that squeezing context into brief summaries can strip out the details that made it useful. A voice guide reduced to "friendly, confident, clear" is short and gives a writer almost nothing to work with; three annotated examples of your best emails are longer and more useful.

View the three ways more context can make work worse at full size (opens in a new tab).
The marketing context stack: brand, offer, audience, evidence and task
The marketing context stack sorts what an AI marketing agent needs into five layers: brand, offer, audience, evidence and task. The layers run from the slowest-changing to the fastest. Brand context may hold for a year or more, while the task changes with every request. Sorting context this way shows what to save, what to date and what to write fresh, and it gives each layer a home and an owner.
| Layer | What it holds | Source of truth | How fast it goes stale | Usual owner |
|---|---|---|---|---|
| Brand | Positioning, messaging, voice, visual identity and rules for claims | Brand guidelines, positioning statement, messaging framework | Slowly, until a repositioning, rebrand or move into a new market | Head of marketing or brand lead |
| Offer | Products, features, plans, pricing, integrations and known limits | Release notes, pricing page, product marketing documents | With every launch, price change or packaging change | Product marketing |
| Audience | Who buys and uses the product, their situation, problems, objections and words | Audience and persona documents, customer research, sales call notes | Gradually, as research and sales conversations add evidence | Whoever owns customer research |
| Evidence | Data, customer results, quotes, competitor facts and market news, each with a date | Research files, analytics, review sites, competitor pages | Fastest of the saved layers: news in days, competitor prices and market data in weeks or months | The person who gathered it, with a date to recheck |
| Task | Goal, deliverable, channel, deadline, examples of good work and approval route | The brief for this job | Every job | The person requesting the work |

View the marketing context stack diagram at full size (opens in a new tab).
Brand: how you present yourself
Brand context tells an agent how the company presents itself: the position it holds, the messages it repeats, the voice it writes in and how it looks. Include the rules for claims, such as comparisons the company avoids or words legal has ruled out, because they rarely appear in finished copy where an agent could infer them. The sources are usually brand guidelines, a positioning statement, a voice guide and a messaging framework. Brand context is easy to reduce to adjectives. An instruction like "sound like us" is the kind of vague guidance that, in the words of Anthropic's post, "falsely assumes shared context," so supply examples and the reasoning behind them.
Offer: what you sell today
Offer context covers what the company sells as of today: products, features, plans, prices, integrations and known limits. Mistakes here reach customers as promises, such as a wrong price, a retired plan or a feature that works differently since the last release. Nothing in a model's training reflects last week's release, and older pages about your product stay on the web, so the current source has to be supplied and named. Your value proposition belongs in this layer too, because it connects each feature to an outcome a buyer cares about.
Audience: who the work must persuade
Audience context describes the people the work must persuade: their role and situation, the problem that brings them to you, their objections and the words they use. Evidence-based audience context, such as quotes from sales calls, reviews and interviews, gives an agent language it could not invent, while made-up persona details give it confident guesses. Guides on target audiences, ICPs and buyer personas and voice-of-customer research explain how to build it.
Evidence: what is true right now
Evidence context is the material a piece of work will cite or rely on: performance data, customer results, survey figures, competitor pages and market news. Every item is true as of a date, so store it with its date and source; an undated competitor price is an error waiting for a reader. Distractors build up fastest in this layer, so remove superseded versions when you add current ones. Competitor analysis and market research are its usual sources.
Task: what this job needs
Task context is the brief for this job: the goal, deliverable, channel, deadline, constraints, examples of good work and who approves the result. It is the only layer written fresh each time, and it decides which parts of the other four the job needs. It also carries method, meaning how this kind of work is done well. Some agents receive method as skills, which package instructions, examples and checks for a type of job, so the brief does not have to teach it every time. For the version written for people, see the guides to content briefs and creative briefs.
How to choose the right context for a marketing task
Choose context by starting from the deliverable: ask what a capable newcomer would need to do this job well, take only those pieces from each layer, say which source wins when two disagree, and leave the rest out. The newcomer test works because a skilled freelancer on day one is in roughly a model's position: plenty of general marketing ability and none of your company's facts.
- Start from the job, not the library. The deliverable decides what is relevant. Why AI-generated marketing so often looks good and still feels off-brand makes the same point: a social graphic, a white paper and a competitor comparison each need different parts of the brand.
- Prefer examples to adjectives. Anthropic recommends a small set of "diverse, canonical examples" over a long list of rules. Two annotated examples of approved work can show voice and structure more clearly than a page of tone descriptors.
- Remove what has been superseded. Delete or clearly label old pricing, previous positioning and retired product names, since each one is a distractor.
- Say which source wins. When the website and the release notes disagree, the request should say which one governs. How to brief an AI marketing agent shows how to set that order.
- Put what governs where it will be noticed. Label sections and state the brief and the governing facts first. Anthropic's post recommends clearly labeled sections, though it expects exact formatting to matter less as models improve. The Lost in the Middle results are the reason not to leave a critical fact in the middle of a long attachment.
As an illustration, suppose a fictional scheduling-software company asks an agent for a launch email telling existing customers about a new calendar integration. Its context selection might look like this:
| Layer | Include | Leave out |
|---|---|---|
| Brand | The email section of the voice guide, plus two past launch emails the team liked, with a note on what to copy from each | The full brand book and the visual identity rules, because this email has no design brief |
| Offer | The release notes for the integration and the plans that include it | The full pricing page and the roadmap |
| Audience | Current customers who book meetings with prospects, plus three support tickets that asked for the integration | Persona documents written for prospects |
| Evidence | The adoption figure from the beta, with its date and source | Last quarter's competitor research |
| Task | The goal (customers switch the integration on), length, call to action, send date and approver | Briefs from earlier launches |
The whole selection fits on a page. A competitor comparison page for the same company would draw on the same five layers but select differently: the competitor research comes in, and the support tickets probably stay out.

View the launch email context selection at full size (opens in a new tab).
Where context should live and who keeps it current
Each layer of context should live in one place that both the team and the agent read from, with a named owner who keeps it accurate and a date that shows when someone last checked it. Context drifts when it is copied. A positioning statement pasted into five people's AI chats becomes five versions after the first edit, and nothing tells an agent which one is current. When those chats run in personal accounts, the copies are also shadow AI, out of view of the person who owns the positioning.
The stack also tells you what to save. Brand, offer and audience context change slowly enough to save once and reuse, and saving them is what lets later requests stay short. Evidence can be saved too, as long as each item keeps its date and a point at which to recheck it. Task context is written for each job and kept with the finished work, so the next similar job can start from it.
Ownership follows the table above, though in a small team one person may own several layers. Each layer needs someone who notices when it is wrong and knows which events should trigger an update: a launch, a price change, a repositioning, a new competitor, or a draft that repeats an outdated fact. How saved knowledge persists, expires and gets refreshed is the subject of agent memory; context engineering decides which of it reaches each job.
What agentic context engineering means
Agentic context engineering, or ACE, is a framework from a 2025 research paper in which an AI system maintains its own context as an evolving playbook, adding specific lessons from its work instead of retraining the model. The paper, by Qizheng Zhang and colleagues at Stanford University, SambaNova Systems and UC Berkeley, was first posted in October 2025 and accepted to ICLR 2026, the International Conference on Learning Representations.
ACE splits the work among three roles. A generator attempts tasks, a reflector reviews the attempts to work out what helped and what failed, and a curator turns those lessons into small, itemized updates that are merged into the existing context. The authors report gains of 10.6% on agent benchmarks and 8.6% on finance benchmarks over strong baselines.
The paper names two failure modes that also affect marketing context. Brevity bias is the tendency of optimization to drift toward short, generic instructions that drop the domain detail that mattered. Context collapse happens when a model repeatedly rewrites its accumulated context in full. In a case study of an earlier method, a context of 18,282 tokens was rewritten into 122 tokens in a single step, and accuracy fell from 66.7 to 57.1, below the 63.7 the model scored with no adapted context at all. A brief that is summarized again each time it changes hands can lose detail in the same way.
Marketing teams can borrow the lessons without the machinery. In ACE, the system edits its own playbook from feedback. For brand facts and claims, keep a person in that curation step, with an agent proposing changes and the layer's owner approving them. Add to saved context in small, specific, dated entries instead of rewriting it wholesale, and be wary of any process, human or automated, that keeps condensing a brief into something shorter. The details it drops are often the ones that made the work specific to you.

View the diagram of how saved context stays useful at full size (opens in a new tab).
How Ampere handles context for marketing work
Ampere is an AI marketing agent that gathers the slower layers of the stack once, saves them in reviewable form and consults them on later work, so each new request can concentrate on the task.
Brand memory holds the brand, offer and audience layers and much of the evidence layer. Ampere's 22 deep-dive brand skills study your voice, colors, positioning, audience, competitors, products, visual identity and more, and save each result as an editable brief with its sources visible. You review and correct what Ampere found, and the approved version is what future work follows.
Projects hold the material for a body of work: a brief, source files, saved assets and the sessions for that project. Ampere uses project briefs, uploaded project files, chat attachments, saved brand assets, saved AI avatars and saved custom voices as context, and project files can be summarized for use in later sessions. Before repeating brand or project research, Ampere can look up a saved report to reuse, and it is designed to refresh a stale report before presenting it as ready.
The method for each job comes from Ampere-maintained marketing skills, evaluated against defined task, tool and output expectations, so a request for a LinkedIn carousel does not have to explain how a good carousel is built. When context is incomplete, Ampere asks for a missing fact only when the work cannot continue without it, asks for direction when a matter of taste would materially change the result, and does not re-ask facts you have already supplied.
Projects and saved assets belong to the Organization, so Brand memory and Project context give teammates the same starting point. Ampere does not directly use private customer prompts, files, chat history, project context, agent memory, integration data, or outputs to train Ampere models by default.
A context brief template for marketing tasks
A context brief is a short checklist you complete before handing a job to an agent: what the job needs from each layer, what to leave out, which source wins and what is still unknown. Use it alongside the request. The brief in How to brief an AI marketing agent says what you want; the context brief says what the agent should know.
| Job | The deliverable, channel and goal in one sentence, so every other entry can be tested against it |
|---|---|
| Brand | The parts of your brand guidance this job needs, such as the email section of the voice guide, plus any rules for claims |
| Offer | The product facts the job relies on, taken from the current source, with the date of the last change |
| Audience | The segment, their situation and main objection, and two or three phrases they use, taken from research |
| Evidence | Each figure, quote or competitor fact the work may cite, with its source and date |
| Examples | One to three examples of good work, and what to copy from each: structure, tone or level of detail |
| Leave out | Material the agent might find but should ignore, such as old pricing pages, retired product names or rejected claims |
| Which source wins | The order of authority when two sources disagree, and what to do with a fact that appears in only one |
| Known gaps | Facts you do not have yet, and whether the agent may assume, should flag or must ask |
| Review | Who checks the context and the finished work before anything is used |
Then check the setup behind the brief. Run this audit after any launch, price change or repositioning, and at least once a quarter:
- Does each layer have one current source of truth that the agent can read?
- Does each layer have a named owner?
- Does every item of evidence carry a date and a source?
- Have superseded versions, such as old pricing, previous positioning and retired names, been removed or clearly labeled?
- Can you see which context the agent used for a given piece of work?
- Do teammates' requests draw on the same saved context?
If an answer is no, fix that layer before writing a longer prompt. Better wording cannot repair a missing or outdated fact.

View the context brief and setup audit at full size (opens in a new tab).
Sources and further reading
- Tobi Lütke, post preferring "context engineering" to "prompt engineering", June 2025.
- Andrej Karpathy, post endorsing "context engineering", June 25, 2025.
- Andrej Karpathy, Software Is Changing (Again), keynote at Y Combinator's AI Startup School, June 17, 2025.
- Lance Martin, Context Engineering for Agents, June 23, 2025.
- Anthropic Applied AI team, Effective context engineering for AI agents, September 29, 2025.
- Harrison Chase, The rise of "context engineering", LangChain, June 23, 2025.
- Nelson F. Liu and colleagues, Lost in the Middle: How Language Models Use Long Contexts, Transactions of the Association for Computational Linguistics, 2024.
- Kelly Hong, Anton Troynikov and Jeff Huber, Context Rot: How Increasing Input Tokens Impacts LLM Performance, Chroma technical report, July 14, 2025.
- Qizheng Zhang and colleagues, Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models, ICLR 2026.
Frequently Asked Questions
What is the difference between context engineering and prompt engineering?
Prompt engineering is writing and structuring the instruction a model receives, while context engineering is deciding everything the model sees for a task: the instruction, saved brand knowledge, documents, examples and tool results, plus what to leave out. Prompt engineering happens once per request. Context engineering happens for every task and, inside an agent, at every step. A strong prompt cannot fix wrong or missing context, and good context cannot rescue a vague request.
What is a context window in AI?
A context window is the limit on how much information an AI model can consider at once, measured in tokens, the small chunks of text that models read and write. Everything inside the window is available to the model for the current step, and anything outside it is not. A larger window gives more room but does not guarantee that the model uses every detail well, especially material buried in the middle of a long input.
What is an example of context engineering in marketing?
An example of context engineering in marketing is assembling what an agent needs for a launch email: the email section of the voice guide, two approved past emails, the release notes for the feature, the customer segment with a few real support requests, and one dated adoption figure. Just as important, the selection leaves out the full brand book, the pricing page, the roadmap and old competitor research, none of which the email needs.
In the CPU and RAM analogy used in context engineering, what does the RAM represent?
In the CPU and RAM analogy used in context engineering, the RAM represents the context window, the model's working memory. Andrej Karpathy compared a language model to a new kind of computer in which the model does the processing, like a CPU, and the context window holds what it is working with. Like RAM, the window has a fixed capacity and holds only what is in use, so choosing what goes into it matters.
Does a larger context window always improve AI responses?
A larger context window does not always improve AI responses. It lets a model take in more material, but research has found that models use information in the middle of long inputs less reliably, and in one test from a 2025 vendor report, every model answered significantly better from a short, focused version of the material than from a long one full of irrelevant text. Relevant, current context matters more than size.
What is the difference between context engineering and RAG?
Retrieval-augmented generation, or RAG, is one technique within context engineering. RAG searches a document collection and passes the most relevant passages to the model when a task needs them. Context engineering is the broader practice of deciding everything the model sees, including instructions, saved knowledge, examples and tool results, and of keeping that material current. A well-built RAG system still depends on accurate, dated sources to retrieve from.
What is the difference between context engineering and fine-tuning?
Fine-tuning changes the AI model itself through further training on examples, while context engineering changes what the model sees for each task and leaves the model as it is. Fine-tuning can shift a model's default style or format, but it is a poor fit for facts that change, because every update needs another training run. A context update, such as a corrected price, takes effect on the next task.
What is the role of a context engineer?
The role of a context engineer is to decide what information an AI system sees for each task and to keep that information accurate, relevant and well organized. In software products, that includes how documents are retrieved and how long sessions are summarized. In a marketing team, the work can be shared: each layer of context, such as brand, offer, audience and evidence, needs a named owner who keeps it current.
Is context engineering still relevant as context windows grow?
Context engineering is still relevant as context windows grow, because a model can use only what it is given for a task, and the facts a marketing team depends on keep changing. Larger windows hold more material but have not removed the need to choose it. Anthropic's engineering team expects windows of every size to face clutter and relevance problems for the foreseeable future, so current, relevant context remains part of getting good work from any model.


