<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Krutika Shah</title>
    <description>The latest articles on DEV Community by Krutika Shah (@krutika_shah).</description>
    <link>https://dev.to/krutika_shah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4053020%2Fd1d797c7-1f24-48ef-ad92-7ec3a492c12c.png</url>
      <title>DEV Community: Krutika Shah</title>
      <link>https://dev.to/krutika_shah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/krutika_shah"/>
    <language>en</language>
    <item>
      <title>Context Engineering: Why It’s Replacing Prompt Engineering in Modern AI Systems</title>
      <dc:creator>Krutika Shah</dc:creator>
      <pubDate>Tue, 11 Aug 2026 05:48:02 +0000</pubDate>
      <link>https://dev.to/krutika_shah/context-engineering-why-its-replacing-prompt-engineering-in-modern-ai-systems-47mk</link>
      <guid>https://dev.to/krutika_shah/context-engineering-why-its-replacing-prompt-engineering-in-modern-ai-systems-47mk</guid>
      <description>&lt;p&gt;For the last few years, building with large language models often started with one question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“What prompt should I give the model?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developers experimented with system prompts, role instructions, few-shot examples, XML tags, Markdown formatting, and increasingly elaborate instructions.&lt;/p&gt;

&lt;p&gt;And it worked.&lt;/p&gt;

&lt;p&gt;A better prompt could turn an unreliable output into a surprisingly useful one.&lt;/p&gt;

&lt;p&gt;But modern AI applications are becoming more complex.&lt;/p&gt;

&lt;p&gt;We are no longer only asking an LLM to summarize a paragraph or generate an email. We are building AI agents that search databases, call APIs, remember previous conversations, read documents, use tools, execute code, and work across multiple steps.&lt;/p&gt;

&lt;p&gt;In these systems, writing a good prompt is only one part of the problem.&lt;/p&gt;

&lt;p&gt;The bigger question becomes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What information should the model have access to at this exact moment?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is the problem &lt;strong&gt;context engineering&lt;/strong&gt; tries to solve.&lt;/p&gt;

&lt;p&gt;Anthropic describes context engineering as a natural progression from prompt engineering: instead of focusing only on the instructions written inside a prompt, developers manage the entire set of information available to the model during inference.&lt;/p&gt;

&lt;p&gt;And that shift changes how we think about building AI applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  First, What Is Prompt Engineering?
&lt;/h2&gt;

&lt;p&gt;Prompt engineering is the practice of designing instructions that help an LLM produce the behavior or output we want.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a senior Python developer.

Review the following code for:
- security issues
- performance problems
- readability

Return your answer as:
1. Issue
2. Why it matters
3. Suggested fix

Code:
{code}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is nothing wrong with this.&lt;/p&gt;

&lt;p&gt;In fact, good prompts remain extremely important.&lt;/p&gt;

&lt;p&gt;The developer has clearly defined:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the model's role,&lt;/li&gt;
&lt;li&gt;the task,&lt;/li&gt;
&lt;li&gt;what to look for,&lt;/li&gt;
&lt;li&gt;and the expected output format.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For relatively isolated tasks, that might be enough.&lt;/p&gt;

&lt;p&gt;But imagine turning this into an AI coding assistant.&lt;/p&gt;

&lt;p&gt;Now the model may also need to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the contents of several project files,&lt;/li&gt;
&lt;li&gt;which framework the project uses,&lt;/li&gt;
&lt;li&gt;previous decisions made by the developer,&lt;/li&gt;
&lt;li&gt;available development tools,&lt;/li&gt;
&lt;li&gt;errors from the last terminal command,&lt;/li&gt;
&lt;li&gt;coding conventions used by the team,&lt;/li&gt;
&lt;li&gt;dependency versions,&lt;/li&gt;
&lt;li&gt;and which files have already been modified.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You could technically throw everything into one gigantic prompt.&lt;/p&gt;

&lt;p&gt;But that creates another problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More context does not automatically mean better context.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  So, What Is Context Engineering?
&lt;/h2&gt;

&lt;p&gt;Context engineering is the process of deciding &lt;strong&gt;what information an AI model receives, when it receives it, and how that information is structured.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;LangChain describes the idea as providing the right information and tools in the right format so that an LLM can successfully complete its task.&lt;/p&gt;

&lt;p&gt;Think of the difference this way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt engineering asks:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How should I phrase the instruction?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Context engineering asks:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What does the model need to know before it can correctly follow that instruction?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That context might include much more than the user's prompt.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Context
│
├── System instructions
├── User message
├── Conversation history
├── Retrieved documents
├── Long-term memory
├── Few-shot examples
├── Available tools
├── Tool descriptions
├── Tool results
├── Application state
├── User preferences
└── Output requirements
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prompt is still there.&lt;/p&gt;

&lt;p&gt;It simply becomes &lt;strong&gt;one component of a much larger context architecture&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Simple Example
&lt;/h2&gt;

&lt;p&gt;Imagine we are building an AI support assistant for an e-commerce store.&lt;/p&gt;

&lt;p&gt;A prompt-engineering approach might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
You are a helpful customer support agent.

Answer the customer&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s question politely.

Customer:
&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose the customer asks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Where is my order?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prompt is perfectly reasonable.&lt;/p&gt;

&lt;p&gt;But the model cannot give a useful answer.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because it has no idea:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who the customer is,&lt;/li&gt;
&lt;li&gt;which order they mean,&lt;/li&gt;
&lt;li&gt;whether the order has shipped,&lt;/li&gt;
&lt;li&gt;which courier is handling it,&lt;/li&gt;
&lt;li&gt;or whether a delivery problem exists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No amount of rewriting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Be extremely helpful.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Think carefully before answering.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;can magically give the model information it does not have.&lt;/p&gt;

&lt;p&gt;Instead, the application needs to assemble relevant context.&lt;/p&gt;

&lt;p&gt;Conceptually, the system might do something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;customer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_customer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_latest_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;shipment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_shipment_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;customer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;shipment&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;shipment&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;SUPPORT_INSTRUCTIONS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;user_message&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the model might receive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Customer:
Alex

Order:
#81452

Status:
Shipped

Courier:
FedEx

Estimated delivery:
August 12

Latest tracking event:
Package arrived at regional facility
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suddenly, answering &lt;em&gt;“Where is my order?”&lt;/em&gt; becomes straightforward.&lt;/p&gt;

&lt;p&gt;The important improvement was not a cleverer sentence inside the prompt.&lt;/p&gt;

&lt;p&gt;It was &lt;strong&gt;better context&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Is Context Engineering Becoming So Important?
&lt;/h2&gt;

&lt;p&gt;The change is closely tied to how AI applications themselves are evolving.&lt;/p&gt;

&lt;p&gt;Early LLM applications were often simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input → LLM → Output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modern agentic applications can look more like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User
 ↓
Agent
 ↓
Search documentation
 ↓
Read database
 ↓
Call API
 ↓
Evaluate result
 ↓
Call another tool
 ↓
Update state
 ↓
Generate response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An agent may repeatedly call the model and use tools until it completes the task. LangChain's current agent documentation describes this basic loop as alternating between model calls and tool execution.&lt;/p&gt;

&lt;p&gt;Every step generates more information.&lt;/p&gt;

&lt;p&gt;Tool responses accumulate.&lt;/p&gt;

&lt;p&gt;Conversation history grows.&lt;/p&gt;

&lt;p&gt;Documents get retrieved.&lt;/p&gt;

&lt;p&gt;Intermediate reasoning creates new state.&lt;/p&gt;

&lt;p&gt;Eventually, the problem is no longer merely:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“How do I instruct the model?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It becomes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Which pieces of all this information should be present for the next model call?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is a context-engineering problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Context Window Is Not Unlimited Working Memory
&lt;/h2&gt;

&lt;p&gt;Modern models can process very large context windows, but developers should not treat them as databases where everything should simply be dumped.&lt;/p&gt;

&lt;p&gt;Anthropic notes that model performance can degrade as context grows and describes context as a finite resource with diminishing returns. Relevant information therefore needs to be carefully selected rather than indiscriminately accumulated.&lt;/p&gt;

&lt;p&gt;This creates an important rule for AI developers:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The goal is not maximum context. The goal is useful context.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imagine asking a developer to fix one function in a large repository.&lt;/p&gt;

&lt;p&gt;Giving them the relevant function, its tests, related interfaces, and the current error would probably help.&lt;/p&gt;

&lt;p&gt;Printing the entire company codebase, every Slack message ever sent, six years of Git history, and all internal documentation onto their desk probably would not.&lt;/p&gt;

&lt;p&gt;LLMs face a similar information-management problem.&lt;/p&gt;

&lt;p&gt;Extra information can create:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;higher token costs,&lt;/li&gt;
&lt;li&gt;greater latency,&lt;/li&gt;
&lt;li&gt;conflicting instructions,&lt;/li&gt;
&lt;li&gt;irrelevant distractions,&lt;/li&gt;
&lt;li&gt;and difficulty identifying the information that actually matters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Recent OpenAI engineering guidance similarly discusses avoiding context bloat in agent systems because unnecessary tools, history, and integrations can increase cost and distract the model.&lt;/p&gt;

&lt;p&gt;Context engineering therefore involves both &lt;strong&gt;adding information and removing information&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Does a Context Engineer Actually Control?
&lt;/h2&gt;

&lt;p&gt;You do not necessarily need a new job title called &lt;em&gt;Context Engineer&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Context engineering is better understood as a skill developers building AI systems increasingly need.&lt;/p&gt;

&lt;p&gt;Here are some of the major things you may control.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Instructions
&lt;/h3&gt;

&lt;p&gt;These are your traditional prompts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a financial document analyzer.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Prompt engineering still matters here.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Retrieved Knowledge
&lt;/h3&gt;

&lt;p&gt;Instead of putting an entire knowledge base into the prompt, your application can retrieve relevant information when needed.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User question
      ↓
Search knowledge base
      ↓
Retrieve relevant documents
      ↓
Add documents to context
      ↓
LLM generates answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is one reason retrieval-augmented generation, or RAG, became such an important LLM architecture.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Conversation History
&lt;/h3&gt;

&lt;p&gt;A chatbot might have hundreds of previous messages.&lt;/p&gt;

&lt;p&gt;The model may not need all of them.&lt;/p&gt;

&lt;p&gt;Your application could keep:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Last 10 messages
+
Summary of older conversation
+
Important saved facts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;instead of repeatedly passing the entire conversation.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Tools
&lt;/h3&gt;

&lt;p&gt;For agents, tools themselves are context.&lt;/p&gt;

&lt;p&gt;The model needs to understand what capabilities are available.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="n"&gt;search_web&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;query_database&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;send_email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;create_calendar_event&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The names, descriptions, parameters, and results of those tools influence what the model decides to do next.&lt;/p&gt;

&lt;p&gt;LangChain therefore treats tool availability and tool context as part of the broader context-engineering problem.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Memory
&lt;/h3&gt;

&lt;p&gt;Some information should survive beyond a single conversation.&lt;/p&gt;

&lt;p&gt;An AI assistant might remember:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Preferred programming language: TypeScript
Project framework: Next.js
Database: PostgreSQL
Deployment: AWS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of keeping every previous conversation in the context window, the application can store useful information externally and retrieve it when relevant.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. Tool Results
&lt;/h3&gt;

&lt;p&gt;Tool outputs can become surprisingly large.&lt;/p&gt;

&lt;p&gt;Imagine an agent runs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and receives 15,000 lines of output.&lt;/p&gt;

&lt;p&gt;Does the next model call really need all 15,000 lines?&lt;/p&gt;

&lt;p&gt;Probably not.&lt;/p&gt;

&lt;p&gt;A better system may extract:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tests failed: 3

Failures:
- auth.test.ts: token expiration mismatch
- cart.test.ts: incorrect subtotal
- checkout.test.ts: missing address validation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is context engineering.&lt;/p&gt;

&lt;p&gt;The model receives the &lt;strong&gt;signal&lt;/strong&gt;, not all the noise.&lt;/p&gt;




&lt;h2&gt;
  
  
  Four Useful Context Engineering Strategies
&lt;/h2&gt;

&lt;p&gt;A useful mental model presented by LangChain groups common context-engineering techniques into four categories: &lt;strong&gt;write, select, compress, and isolate&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Write
&lt;/h3&gt;

&lt;p&gt;Store information outside the immediate context so it can be used later.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;memory,&lt;/li&gt;
&lt;li&gt;scratchpads,&lt;/li&gt;
&lt;li&gt;databases,&lt;/li&gt;
&lt;li&gt;state stores.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Select
&lt;/h3&gt;

&lt;p&gt;Retrieve only information relevant to the current task.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;documents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;user_question&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;instead of loading 5,000 documents.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compress
&lt;/h3&gt;

&lt;p&gt;Reduce large amounts of information while preserving what matters.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;120-message conversation
        ↓
Structured summary
        ↓
Current context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anthropic and OpenAI both describe compaction techniques for long-running agents where accumulated history is reduced into smaller representations that preserve important state.&lt;/p&gt;

&lt;h3&gt;
  
  
  Isolate
&lt;/h3&gt;

&lt;p&gt;Keep unrelated work in separate contexts.&lt;/p&gt;

&lt;p&gt;Instead of making one agent carry everything, specialized agents might handle different tasks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Main Agent
   │
   ├── Research Agent
   ├── Coding Agent
   └── Testing Agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each agent gets the context needed for its specific job and can return a concise result to the coordinator.&lt;/p&gt;

&lt;p&gt;Anthropic discusses this approach for complex agent workflows as a way of preventing detailed subtask information from consuming the primary agent's context.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prompt Engineering vs. Context Engineering
&lt;/h2&gt;

&lt;p&gt;The easiest way to understand the transition is to compare them directly.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prompt Engineering&lt;/th&gt;
&lt;th&gt;Context Engineering&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Optimizes instructions&lt;/td&gt;
&lt;td&gt;Optimizes the model's information environment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Focuses mainly on prompts&lt;/td&gt;
&lt;td&gt;Manages prompts, memory, tools, retrieval and state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Often static&lt;/td&gt;
&lt;td&gt;Usually dynamic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Common in single LLM calls&lt;/td&gt;
&lt;td&gt;Critical in multi-step agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Asks “How should I say this?”&lt;/td&gt;
&lt;td&gt;Asks “What should the model know?”&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Still useful&lt;/td&gt;
&lt;td&gt;Includes prompt engineering as one component&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So saying context engineering is &lt;em&gt;replacing&lt;/em&gt; prompt engineering requires a little nuance.&lt;/p&gt;

&lt;p&gt;Prompt engineering is not disappearing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Its role is becoming smaller relative to the rest of the system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Anthropic explicitly describes context engineering as the natural progression of prompt engineering rather than its complete replacement.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Bigger Shift: From Prompts to Systems
&lt;/h2&gt;

&lt;p&gt;This may be the most important takeaway.&lt;/p&gt;

&lt;p&gt;Building reliable AI applications increasingly looks less like discovering magical prompt phrases and more like traditional software engineering.&lt;/p&gt;

&lt;p&gt;Developers need to think about:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Data
↓
Retrieval
↓
State
↓
Memory
↓
Permissions
↓
Tools
↓
Context
↓
Model
↓
Validation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The LLM sits inside a system.&lt;/p&gt;

&lt;p&gt;Its output depends heavily on what that system makes visible to it.&lt;/p&gt;

&lt;p&gt;Consider two identical models.&lt;/p&gt;

&lt;h3&gt;
  
  
  System A
&lt;/h3&gt;

&lt;p&gt;Receives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Help the user debug their application.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  System B
&lt;/h3&gt;

&lt;p&gt;Receives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Relevant source files
Current stack trace
Dependency versions
Project architecture
Recent code changes
Available terminal tools
Team coding standards
User's actual question
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even if both models are equally intelligent, System B has a massive practical advantage.&lt;/p&gt;

&lt;p&gt;Not because its prompt contains better adjectives.&lt;/p&gt;

&lt;p&gt;Because its &lt;strong&gt;information environment is better engineered&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Does This Mean Developers Can Stop Learning Prompt Engineering?
&lt;/h2&gt;

&lt;p&gt;Definitely not.&lt;/p&gt;

&lt;p&gt;A poorly written instruction can still produce poor results.&lt;/p&gt;

&lt;p&gt;Developers still need to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;clear instructions,&lt;/li&gt;
&lt;li&gt;few-shot examples,&lt;/li&gt;
&lt;li&gt;structured outputs,&lt;/li&gt;
&lt;li&gt;constraints,&lt;/li&gt;
&lt;li&gt;tool descriptions,&lt;/li&gt;
&lt;li&gt;and system prompts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But those skills now belong inside a bigger discipline.&lt;/p&gt;

&lt;p&gt;The progression looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt Engineering
        ↓
Prompt + Retrieval
        ↓
Prompt + Retrieval + Memory
        ↓
Prompt + Tools + State + Memory
        ↓
Context Engineering
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As AI applications move from single-turn generators toward agents capable of working across tools and longer-running tasks, managing that context becomes increasingly central to system reliability.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Good Rule for Developers
&lt;/h2&gt;

&lt;p&gt;When your AI system produces a bad answer, resist immediately changing the prompt.&lt;/p&gt;

&lt;p&gt;Instead, ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Did the model receive the information
required to make the correct decision?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then investigate:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Was relevant information missing?&lt;/li&gt;
&lt;li&gt;Was irrelevant information included?&lt;/li&gt;
&lt;li&gt;Was important information buried in too much text?&lt;/li&gt;
&lt;li&gt;Did two pieces of context contradict each other?&lt;/li&gt;
&lt;li&gt;Did the model have the correct tools available?&lt;/li&gt;
&lt;li&gt;Was previous state preserved correctly?&lt;/li&gt;
&lt;li&gt;Should some information have been retrieved only when needed?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sometimes the solution will still be a better prompt.&lt;/p&gt;

&lt;p&gt;But increasingly, the solution will be &lt;strong&gt;better context architecture&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Prompt engineering taught developers how to communicate with language models.&lt;/p&gt;

&lt;p&gt;Context engineering asks us to go one level deeper and design the &lt;strong&gt;environment in which those models operate&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For simple LLM applications, a carefully designed prompt may still be most of what you need.&lt;/p&gt;

&lt;p&gt;For modern AI agents, however, the model may depend on retrieved documents, tools, memory, application state, conversation history, intermediate results, and runtime information.&lt;/p&gt;

&lt;p&gt;Someone has to decide what gets included.&lt;/p&gt;

&lt;p&gt;Someone has to decide what gets removed.&lt;/p&gt;

&lt;p&gt;Someone has to decide what the model should know at each step.&lt;/p&gt;

&lt;p&gt;That is context engineering.&lt;/p&gt;

&lt;p&gt;And as AI development moves from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt → Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;toward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Context → Model → Tool → State → Context → Model → Action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the developers who understand how to engineer that context will have a much better mental model for building reliable AI systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The future of AI development isn't about finding the perfect prompt.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's about giving the model the right information, at the right moment, in the right form.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
