← Back to Cooldecode
AI Watch · Prompt engineering in practice

From prompt engineering to context engineering

The same skill got a new, more accurate name in 2026 — and the shift in framing changes what actually matters when you write for an LLM or build an agent.

1. What changed

For the past few years, "prompt engineering" was the umbrella term for the entire skill of getting good output from a language model: wording, examples, formatting, everything. Through 2026, the field has been splitting that umbrella into two distinct layers — and Anthropic's own prompting guidance now reflects that split explicitly.

The distinction isn't cosmetic. It changes where you should spend your effort when a prompt isn't working: is the wording actually the problem, or is it that the model never had the right information in front of it in the first place?

2. Prompt engineering vs context engineering

Prompt engineering is now used more narrowly: it's about wording a single request well — phrasing, tone, specifying the desired style, giving direct instructions.

Context engineering is the broader discipline that prompt engineering sits inside of: managing everything the model sees before it generates anything — system prompt, retrieved documents, tool outputs, conversation history, examples, and the instructions themselves.

Why the split matters: a perfectly worded prompt still fails if the model is missing the one document it needed, or if its context window is cluttered with fifteen previous tool calls it doesn't need anymore. As models have gotten better at following instructions, the wording matters less than what surrounds it.

3. The four moves: write, select, compress, isolate

Current guidance on context engineering (echoed across Anthropic's own materials and independent write-ups this year) organizes the discipline into four recurring moves:

MoveWhat it means
WriteAuthoring the instructions and system prompt clearly — the part that overlaps with classic prompt engineering.
SelectChoosing which context is actually relevant to include — not dumping every available document or tool result into the window.
CompressReducing token waste — summarizing long history, trimming redundant tool outputs, keeping only what's load-bearing.
IsolateKeeping unrelated context separate — for example, giving a sub-agent its own clean context instead of inheriting the parent's entire history.

4. What this looks like with Claude specifically

Anthropic's current best-practice guidance for Claude models pairs the context-engineering mindset with a handful of concrete techniques that hold up across Claude 4.x and newer:

A noted behavioral shift since Claude Sonnet 5: newer models tend to take instructions more literally — doing exactly what's asked, without over-extrapolating intent. That raises the cost of an under-specified prompt, and raises the value of the "write" and "select" moves above.

5. Why this matters more for agents

The context-engineering framing matters even more once a model is acting as an agent across multiple steps rather than answering a single question. An agent has to decide when to call a tool, how to react when a tool's output doesn't match what it expected, when to ask for clarification instead of guessing, and when to simply refuse. None of that is solved by wording a single prompt better — it's solved by managing what the agent sees at each step of a multi-turn process, which is exactly what context engineering is about.

Current guidance for agentic prompts leans toward describing the desired outcome and giving testable success criteria, rather than scripting every step — leaving the "how" to the model while keeping the "what does success look like" explicit and checkable.

6. The practical takeaway

If a prompt isn't working: before rewriting the wording for the fifth time, ask whether the model actually has the right information in front of it, in the right order, without unrelated clutter. That question is context engineering — and in 2026 it's usually the higher-leverage fix.
Newsletter

Learn what AI is creating for you. Don't get lost.

Get notified when a new deep dive or lesson goes up. No spam, just new posts.

Sources (accessed August 7, 2026):
  • Claude by Anthropic — "Prompt engineering best practices for 2026" (claude.com/blog)
  • mem0.ai — "Context Engineering AI: How To Build Smarter LLM Agents In 2026"
  • skillscouter.com — "Context Engineering in 2026: A Practical Guide"
  • promptbuilder.cc — "Claude Prompt Engineering Best Practices 2026: Checklist + Templates"
  • aiforanything.io — "Claude Prompt Engineering Best Practices: The Definitive 2026 Guide"
  • the-ai-corner.com — "Claude best practices 2026: the complete power user guide"
IA Watch · Prompt engineering na prática

De prompt engineering pra context engineering

A mesma habilidade ganhou um nome novo e mais preciso em 2026 — e essa mudança de enquadramento muda o que realmente importa quando você escreve pra um LLM ou constrói um agente.

1. O que mudou

Nos últimos anos, "prompt engineering" era o termo guarda-chuva pra habilidade inteira de tirar uma boa resposta de um modelo de linguagem: redação, exemplos, formatação, tudo. Ao longo de 2026, a área tem dividido esse guarda-chuva em duas camadas distintas — e o próprio guia de prompting da Anthropic já reflete essa divisão explicitamente.

A distinção não é só estética. Ela muda onde você deveria colocar esforço quando um prompt não funciona: o problema é realmente a redação, ou é que o modelo nunca teve a informação certa na frente dele, pra começar?

2. Prompt engineering vs context engineering

Prompt engineering agora é usado de forma mais restrita: é sobre redigir bem um pedido único — fraseado, tom, especificar o estilo desejado, dar instruções diretas.

Context engineering é a disciplina mais ampla dentro da qual o prompt engineering se encaixa: gerenciar tudo que o modelo vê antes de gerar qualquer coisa — system prompt, documentos recuperados, resultados de ferramentas, histórico de conversa, exemplos e as próprias instruções.

Por que a divisão importa: um prompt redigido perfeitamente ainda falha se o modelo estiver sem o único documento que precisava, ou se sua janela de contexto estiver cheia de quinze chamadas de ferramenta anteriores que ele não precisa mais. Conforme os modelos ficaram melhores em seguir instruções, o fraseado importa menos do que o que está em volta dele.

3. Os quatro movimentos: escrever, selecionar, comprimir, isolar

O guia atual sobre context engineering (repetido tanto em materiais da própria Anthropic quanto em artigos independentes este ano) organiza a disciplina em quatro movimentos recorrentes:

MovimentoO que significa
Escrever (write)Redigir claramente as instruções e o system prompt — a parte que se sobrepõe ao prompt engineering clássico.
Selecionar (select)Escolher qual contexto é realmente relevante pra incluir — em vez de despejar todo documento ou resultado de ferramenta disponível na janela.
Comprimir (compress)Reduzir desperdício de tokens — resumir histórico longo, cortar resultados de ferramenta redundantes, manter só o que sustenta a tarefa.
Isolar (isolate)Manter contexto não relacionado separado — por exemplo, dar a um sub-agente seu próprio contexto limpo em vez de herdar todo o histórico do agente pai.

4. Como isso funciona com o Claude especificamente

O guia atual de boas práticas da Anthropic pra modelos Claude combina a mentalidade de context engineering com um punhado de técnicas concretas que se sustentam nas versões Claude 4.x e mais novas:

Uma mudança de comportamento notada desde o Claude Sonnet 5: modelos mais novos tendem a seguir instruções de forma mais literal — fazendo exatamente o que foi pedido, sem extrapolar demais a intenção. Isso aumenta o custo de um prompt sub-especificado, e aumenta o valor dos movimentos de "escrever" e "selecionar" acima.

5. Por que isso importa mais pra agentes

O enquadramento de context engineering importa ainda mais quando um modelo age como agente em várias etapas em vez de responder uma pergunta única. Um agente precisa decidir quando chamar uma ferramenta, como reagir quando o resultado de uma ferramenta não corresponde ao esperado, quando pedir esclarecimento em vez de chutar, e quando simplesmente recusar. Nada disso se resolve redigindo melhor um único prompt — se resolve gerenciando o que o agente vê em cada etapa de um processo de várias interações, que é exatamente o que context engineering trata.

O guia atual pra prompts de agentes tende a favorecer descrever o resultado desejado e dar critérios de sucesso testáveis, em vez de roteirizar cada etapa — deixando o "como" a cargo do modelo, mas mantendo explícito e verificável o que "sucesso" significa.

6. O que levar pra prática

Se um prompt não está funcionando: antes de reescrever o fraseado pela quinta vez, pergunte se o modelo realmente tem a informação certa na frente dele, na ordem certa, sem ruído desnecessário. Essa pergunta é context engineering — e em 2026 costuma ser o ajuste de maior impacto.
Newsletter

Saiba o que a IA está criando pra você. Não fique por fora.

Seja avisado quando eu postar uma imersão ou lição nova. Sem spam, só posts novos.

Fontes (acessadas em 7 de agosto de 2026):
  • Claude by Anthropic — "Prompt engineering best practices for 2026" (claude.com/blog)
  • mem0.ai — "Context Engineering AI: How To Build Smarter LLM Agents In 2026"
  • skillscouter.com — "Context Engineering in 2026: A Practical Guide"
  • promptbuilder.cc — "Claude Prompt Engineering Best Practices 2026: Checklist + Templates"
  • aiforanything.io — "Claude Prompt Engineering Best Practices: The Definitive 2026 Guide"
  • the-ai-corner.com — "Claude best practices 2026: the complete power user guide"