1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[97086],{63318:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/agents/context-engineering.en",function(){return i(64502)}])},87708:function(e,n){"use strict";n.Z={src:"/_next/static/media/simple-dr-agent.46d70e98.png",height:633,width:1132,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAACVBMVEU1NjktLS5BQUMs/XrvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAHElEQVR4nGNgYmBkYmJkZGRgZGSAACQGSJyBEQAB0wAVHzoguwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:4}},64502:function(e,n,i){"use strict";i.r(n),i.d(n,{__toc:function(){return d}});var t=i(52676),a=i(45118),s=i(23742),o=i(40241);i(21729),i(29814);var r=i(41619),l=i(87708),c=i(70754);let d=[{depth:2,value:"What is Context Engineering?",id:"what-is-context-engineering"},{depth:2,value:"Building a Deep Research Agent: A Case Study",id:"building-a-deep-research-agent-a-case-study"},{depth:3,value:"The Context Engineering Challenge",id:"the-context-engineering-challenge"},{depth:4,value:"Issue 1: Incomplete Task Execution",id:"issue-1-incomplete-task-execution"},{depth:4,value:"Issue 2: Lack of Debugging Visibility",id:"issue-2-lack-of-debugging-visibility"},{depth:3,value:"Context Engineering Best Practices",id:"context-engineering-best-practices"},{depth:4,value:"1. Eliminate Prompt Ambiguity",id:"1-eliminate-prompt-ambiguity"},{depth:4,value:"2. Make Expectations Explicit",id:"2-make-expectations-explicit"},{depth:4,value:"3. Implement Observability",id:"3-implement-observability"},{depth:4,value:"4. Iterate Based on Behavior",id:"4-iterate-based-on-behavior"},{depth:4,value:"5. Balance Flexibility and Constraints",id:"5-balance-flexibility-and-constraints"},{depth:2,value:"Advanced Context Engineering Techniques",id:"advanced-context-engineering-techniques"},{depth:3,value:"Layered Context Architecture",id:"layered-context-architecture"},{depth:3,value:"Dynamic Context Adjustment",id:"dynamic-context-adjustment"},{depth:3,value:"Context Validation",id:"context-validation"},{depth:2,value:"Common Context Engineering Pitfalls",id:"common-context-engineering-pitfalls"},{depth:3,value:"1. Over-Constraint",id:"1-over-constraint"},{depth:3,value:"2. Under-Specification",id:"2-under-specification"},{depth:3,value:"3. Ignoring Error Cases",id:"3-ignoring-error-cases"},{depth:2,value:"Measuring Context Engineering Success",id:"measuring-context-engineering-success"}];function _createMdxContent(e){let n=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",ul:"ul",li:"li",strong:"strong",img:"img",h3:"h3",h4:"h4",ol:"ol",pre:"pre",code:"code",span:"span"},(0,r.a)(),e.components);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{children:"Why Context Engineering?"}),"\n","\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://www.promptingguide.ai/guides/context-engineering-guide",children:"Context engineering"})," is a critical practice for building reliable and effective AI agents. This guide explores the importance of context engineering through a practical example of building a deep research agent."]}),"\n",(0,t.jsx)(n.p,{children:"Context engineering involves carefully crafting and refining the prompts, instructions, and constraints that guide an AI agent's behavior to achieve desired outcomes."}),"\n",(0,t.jsx)(c.UW,{type:"info",emoji:"\uD83D\uDCDA",children:(0,t.jsxs)(n.p,{children:["This content is based on our new course ",(0,t.jsx)(n.a,{href:"https://academy.dair.ai/courses/building-effective-ai-agents",children:'"Building Effective AI Agents with n8n"'}),", which provides comprehensive insights, downloadable templates, prompts, and advanced tips into designing and implementing agentic systems."]})}),"\n",(0,t.jsx)(n.h2,{id:"what-is-context-engineering",children:"What is Context Engineering?"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://www.promptingguide.ai/guides/context-engineering-guide",children:"Context engineering"})," is the process of designing, testing, and iterating on the contextual information provided to AI agents to shape their behavior and improve task performance. Unlike simple prompt engineering for single LLM calls, context engineering for agents involves (but not limited to):"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"System prompts"})," that define agent behavior and capabilities"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Task constraints"})," that guide decision-making"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Tool descriptions"})," that clarify when and how to use available functions/tools"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Memory management"})," for tracking state across multiple steps"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Error handling"})," patterns for robust execution"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"building-a-deep-research-agent-a-case-study",children:"Building a Deep Research Agent: A Case Study"}),"\n",(0,t.jsx)(n.p,{children:"Let's explore context engineering principles through an example: a minimal deep research agent that performs web searches and generates reports."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Agent Workflow",placeholder:"blur",src:l.Z})}),"\n",(0,t.jsx)(n.h3,{id:"the-context-engineering-challenge",children:"The Context Engineering Challenge"}),"\n",(0,t.jsx)(n.p,{children:"When building the first version of this agent system, the initial implementation revealed several behavioral issues that required careful context engineering:"}),"\n",(0,t.jsx)(n.h4,{id:"issue-1-incomplete-task-execution",children:"Issue 1: Incomplete Task Execution"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Problem"}),": When running the agentic workflow, the orchestrator agent often creates three search tasks but only executes searches for two of them, skipping the third task without explicit justification."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Root Cause"}),": The agent's system prompt lacked explicit constraints about task completion requirements. The agent made assumptions about which searches were necessary, leading to inconsistent behavior."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Solution"}),": Two approaches are possible:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Flexible Approach"})," (current): Allow the agent to decide which searches are necessary, but require explicit reasoning for skipped tasks"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Strict Approach"}),": Add explicit constraints requiring search execution for all planned tasks"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Example system prompt enhancement:"}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"You are a deep research agent responsible for executing comprehensive research tasks."})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"}})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"TASK EXECUTION RULES:"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"- For each search task you create, you MUST either:"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" 1. Execute a web search and document findings, OR"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" 2. Explicitly state why the search is unnecessary and mark it as completed with justification"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"}})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"- Do NOT skip tasks silently or make assumptions about task redundancy"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"- If you determine tasks overlap, consolidate them BEFORE execution"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"- Update task status in the spreadsheet after each action"})})]})}),"\n",(0,t.jsx)(n.h4,{id:"issue-2-lack-of-debugging-visibility",children:"Issue 2: Lack of Debugging Visibility"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Problem"}),": Without proper logging and state tracking, it was difficult to understand why the agent made certain decisions."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Solution"}),": For this example, it helps to implement a task management system using a spreadsheet or text file (for simplicity) with the following fields:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Task ID"}),"\n",(0,t.jsx)(n.li,{children:"Search query"}),"\n",(0,t.jsx)(n.li,{children:"Status (todo, in_progress, completed)"}),"\n",(0,t.jsx)(n.li,{children:"Results summary"}),"\n",(0,t.jsx)(n.li,{children:"Timestamp"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"This visibility enables:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Real-time debugging of agent decisions"}),"\n",(0,t.jsx)(n.li,{children:"Understanding of task execution flow"}),"\n",(0,t.jsx)(n.li,{children:"Identification of behavioral patterns"}),"\n",(0,t.jsx)(n.li,{children:"Data for iterative improvements"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"context-engineering-best-practices",children:"Context Engineering Best Practices"}),"\n",(0,t.jsx)(n.p,{children:"Based on this case study, here are key principles for effective context engineering:"}
1),"\n",(0,t.jsx)(n.h4,{id:"1-eliminate-prompt-ambiguity",children:"1. Eliminate Prompt Ambiguity"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Bad Example:"})}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsx)(n.code,{"data-language":"text","data-theme":"default",children:(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Perform research on the given topic."})})})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Good Example:"})}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Perform research on the given topic by:"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"1. Breaking down the query into 3-5 specific search subtasks"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"2. Executing a web search for EACH subtask using the search_tool"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"3. Documenting findings for each search in the task tracker"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"4. Synthesizing all findings into a comprehensive report"})})]})}),"\n",(0,t.jsx)(n.h4,{id:"2-make-expectations-explicit",children:"2. Make Expectations Explicit"}),"\n",(0,t.jsx)(n.p,{children:"Don't assume the agent knows what you want. Be explicit about:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Required vs. optional actions"}),"\n",(0,t.jsx)(n.li,{children:"Quality standards"}),"\n",(0,t.jsx)(n.li,{children:"Output formats"}),"\n",(0,t.jsx)(n.li,{children:"Decision-making criteria"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"3-implement-observability",children:"3. Implement Observability"}),"\n",(0,t.jsx)(n.p,{children:"Build debugging mechanisms into your agentic system:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Log all agent decisions and reasoning"}),"\n",(0,t.jsx)(n.li,{children:"Track state changes in external storage"}),"\n",(0,t.jsx)(n.li,{children:"Record tool calls and their outcomes"}),"\n",(0,t.jsx)(n.li,{children:"Capture errors and edge cases"}),"\n"]}),"\n",(0,t.jsx)(c.UW,{type:"warning",emoji:"â ï¸",children:(0,t.jsx)(n.p,{children:"Pay close attention to every run of your agentic system. Strange behaviors and edge cases are opportunities to improve your context engineering efforts."})}),"\n",(0,t.jsx)(n.h4,{id:"4-iterate-based-on-behavior",children:"4. Iterate Based on Behavior"}),"\n",(0,t.jsx)(n.p,{children:"Context engineering is an iterative process:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Deploy"})," the agent with initial context"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Observe"})," actual behavior in production"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Identify"})," deviations from expected behavior"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Refine"})," system prompts and constraints"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Test"})," and validate improvements"]}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.strong,{children:"Repeat"})}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"5-balance-flexibility-and-constraints",children:"5. Balance Flexibility and Constraints"}),"\n",(0,t.jsx)(n.p,{children:"Consider the tradeoff between:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Strict constraints"}),": More predictable but less adaptable"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Flexible guidelines"}),": More adaptable but potentially inconsistent"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Choose based on your use case requirements."}),"\n",(0,t.jsx)(n.h2,{id:"advanced-context-engineering-techniques",children:"Advanced Context Engineering Techniques"}),"\n",(0,t.jsx)(n.h3,{id:"layered-context-architecture",children:"Layered Context Architecture"}),"\n",(0,t.jsx)(n.p,{children:"Context engineering applies to all stages of the AI agent build process. Depending on the AI Agent, it's sometimes helpful to think of context as a hierarchical structure. For our basic agentic system, we can organize context into hierarchical layers:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"System Layer"}),": Core agent identity and capabilities"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Task Layer"}),": Specific instructions for the current task"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Tool Layer"}),": Descriptions and usage guidelines for each tool"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Memory Layer"}),": Relevant historical context and learnings"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"dynamic-context-adjustment",children:"Dynamic Context Adjustment"}),"\n",(0,t.jsx)(n.p,{children:"Another approach is to dynamically adjust context based on the task complexity, available resources, previous execution history, and error patterns. Based on our example, we can adjust context based on:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Task complexity"}),"\n",(0,t.jsx)(n.li,{children:"Available resources"}),"\n",(0,t.jsx)(n.li,{children:"Previous execution history"}),"\n",(0,t.jsx)(n.li,{children:"Error patterns"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"context-validation",children:"Context Validation"}),"\n",(0,t.jsx)(n.p,{children:"Evaluation is key to ensuring context engineering techniques are working as they should for your AI agents. Before deployment, validate your context design:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Completeness"}),": Does it cover all important scenarios?"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Clarity"}
1),": Is it unambiguous?"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Consistency"}),": Do different parts align?"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Testability"}),": Can you verify the behavior?"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"common-context-engineering-pitfalls",children:"Common Context Engineering Pitfalls"}),"\n",(0,t.jsx)(n.p,{children:"Below are a few common context engineering pitfalls to avoid when building AI agents:"}),"\n",(0,t.jsx)(n.h3,{id:"1-over-constraint",children:"1. Over-Constraint"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Problem"}),": Too many rules make the agent inflexible and unable to handle edge cases."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"NEVER skip a search task."})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"ALWAYS perform exactly 3 searches."})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"NEVER combine similar queries."})})]})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Better Approach"}),":"]}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsx)(n.code,{"data-language":"text","data-theme":"default",children:(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Aim to perform searches for all planned tasks. If you determine that tasks are redundant, consolidate them before execution and document your reasoning."})})})}),"\n",(0,t.jsx)(n.h3,{id:"2-under-specification",children:"2. Under-Specification"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Problem"}),": Vague instructions lead to unpredictable behavior."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsx)(n.code,{"data-language":"text","data-theme":"default",children:(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Do some research and create a report."})})})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Better Approach"}),":"]}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"Execute research by:"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"1. Analyzing the user query to identify key information needs"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"2. Creating 3-5 specific search tasks covering different aspects"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"3. Executing searches using the search_tool for each task"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"4. Synthesizing findings into a structured report with sections for:"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" - Executive summary"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" - Key findings per search task"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:" - Conclusions and insights"})})]})}),"\n",(0,t.jsx)(n.h3,{id:"3-ignoring-error-cases",children:"3. Ignoring Error Cases"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Problem"}),": Context doesn't specify behavior when things go wrong."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Solution"}),": In some cases, it helps to add error handling instructions to your AI Agents:"]}),"\n",(0,t.jsx)(n.pre,{"data-language":"text","data-theme":"default",children:(0,t.jsxs)(n.code,{"data-language":"text","data-theme":"default",children:[(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"ERROR HANDLING:"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"- If a search fails, retry once with a rephrased query"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"- If retry fails, document the failure and continue with remaining tasks"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"- If more than 50% of searches fail, alert the user and request guidance"})}),"\n",(0,t.jsx)(n.span,{className:"line",children:(0,t.jsx)(n.span,{style:{color:"var(--shiki-color-text)"},children:"- Never stop execution completely without user notification"})})]})}),"\n",(0,t.jsx)(n.h2,{id:"measuring-context-engineering-success",children:"Measuring Context Engineering Success"}),"\n",(0,t.jsx)(n.p,{children:"Track these metrics to evaluate context engineering effectiveness:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Task Completion Rate"}),": Percentage of tasks completed successfully"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Behavioral Consistency"}),": Similarity of agent behavior across similar inputs"]}
1),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Error Rate"}),": Frequency of failures and unexpected behaviors"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"User Satisfaction"}),": Quality and usefulness of outputs"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Debugging Time"}),": Time required to identify and fix issues"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"It's important to not treat context engineering as a one-time activity but an ongoing practice that requires:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Systematic observation"})," of agent behavior"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Careful analysis"})," of failures and edge cases"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Iterative refinement"})," of instructions and constraints"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Rigorous testing"})," of changes"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"We will be covering these principles in more detail in upcoming guides. By applying these principles, you can build AI agent systems that are reliable, predictable, and effective at solving complex tasks."}),"\n",(0,t.jsx)(c.UW,{type:"info",emoji:"\uD83C\uDF93",children:(0,t.jsxs)(n.p,{children:["Learn how to build production-ready AI agents in our comprehensive course. ",(0,t.jsx)(n.a,{href:"https://academy.dair.ai/courses/building-effective-ai-agents",children:"Join now!"}),"\nUse code PROMPTING20 to get an extra 20% off."]})})]})}let g={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,r.a)(),e.components);return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/agents/context-engineering.en.mdx",route:"/agents/context-engineering",timestamp:1769980197e3,pageMap:[{kind:"Meta",locale:"en",data:{index:"Prompt Engineering",introduction:"Introduction",techniques:"Prompting Techniques",agents:"AI Agents",guides:"Guides",applications:"Applications",prompts:"Prompt Hub",models:"Models",risks:"Risks & Misuses",research:"LLM Research Findings",papers:"Papers",tools:"Tools",notebooks:"Notebooks",datasets:"Datasets",readings:"Additional Readings",courses:{title:"\uD83C\uDF93 Courses",type:"menu",items:{"intro-prompt-engineering":{title:"Intro to Prompt Engineering",href:"https://academy.dair.ai/courses/introduction-prompt-engineering"},"advanced-prompt-engineering":{title:"Advanced Prompt Engineering",href:"https://academy.dair.ai/courses/advanced-prompt-engineering"},"intro-ai-agents":{title:"Intro to AI Agents",href:"https://academy.dair.ai/courses/introduction-ai-agents"},"agents-with-n8n":{title:"Building Effective AI Agents with n8n",href:"https://academy.dair.ai/courses/building-effective-ai-agents"},"rag-systems":{title:"Build RAG Systems",href:"https://academy.dair.ai/courses/introduction-to-rag"},"advanced-agents":{title:"Building Advanced AI Agents",href:"https://academy.dair.ai/courses/advanced-ai-agents"},"all-courses":{title:"See all â",href:"https://academy.dair.ai/courses"}}},about:{title:"About",type:"page"},services:"Services"}},{kind:"MdxPage",name:"about",route:"/about",locale:"en"},{kind:"Folder",name:"agents",route:"/agents",children:[{kind:"Meta",locale:"en",data:{introduction:"Introduction to Agents",components:"Agent Components","ai-workflows-vs-ai-agents":"AI Workflows vs AI Agents","context-engineering":"Context Engineering for AI Agents","context-engineering-deep-dive":"Context Engineering Deep Dive","function-calling":"Function Calling","deep-agents":"Deep Agents"}},{kind:"MdxPage",name:"ai-workflows-vs-ai-agents",route:"/agents/ai-workflows-vs-ai-agents",locale:"en"},{kind:"MdxPage",name:"components",route:"/agents/components",locale:"en"},{kind:"MdxPage",name:"context-engineering-deep-dive",route:"/agents/context-engineering-deep-dive",locale:"en"},{kind:"MdxPage",name:"context-engineering",route:"/agents/context-engineering",locale:"en"},{kind:"MdxPage",name:"deep-agents",route:"/agents/deep-agents",locale:"en"},{kind:"MdxPage",name:"function-calling",route:"/agents/function-calling",locale:"en"},{kind:"MdxPage",name:"introduction",route:"/agents/introduction",locale:"en"}]},{kind:"MdxPage",name:"agents",route:"/agents",locale:"en"},{kind:"Folder",name:"applications",route:"/applications",children:[{kind:"Meta",locale:"en",data:{"finetuning-gpt4o":"Fine-tuning GPT-4o",function_calling:"Function Calling","context-caching":"Context Caching with LLMs",generating:"Generating Data",synthetic_rag:"Generating Synthetic Dataset for RAG",generating_textbooks:"Tackling Generated Datasets Diversity",coding:"Generating Code",workplace_casestudy:"Graduate Job Classification Case Study",pf:"Prompt Function"}},{kind:"MdxPage",name:"coding",route:"/applications/coding",locale:"en"},{kind:"MdxPage",name:"context-caching",route:"/applications/context-caching",locale:"en"},{kind:"MdxPage",name:"finetuning-gpt4o",route:"/applications/finetuning-gpt4o",locale:"en"},{kind:"MdxPage",name:"function_calling",route:"/applications/function_calling",locale:"en"},{kind:"MdxPage",name:"generating",route:"/applications/generating",locale:"en"},{kind:"MdxPage",name:"generating_textbooks",route:"/applications/generating_textbooks",locale:"en"},{kind:"MdxPage",name:"pf",route:"/applications/pf",locale:"en"},{kind:"MdxPage",name:"synthetic_rag",route:"/applications/synthetic_rag",locale:"en"},{kind:"MdxPage",name:"workplace_casestudy",route:"/applications/workplace_casestudy",locale:"en"}]},{kind:"MdxPage",name:"applications",route:"/applications",locale:"en"},{kind:"MdxPage",name:"courses",route:"/courses",locale:"en"},{kind:"MdxPage",name:"datasets",route:"/datasets",locale:"en"},{kind:"Folder",name:"guides",route:"/guides",children:[{kind:"MdxPage",name:"4o-image-generation",route:"/guides/4o-image-generation",locale:"en"},{kind:"Meta",locale:"en",data:{"optimizing-prompts":"Optimizing Prompts","deep-research":"OpenAI Deep Research","reasoning-llms":"Reasoning LLMs","4o-image-generation":"4o Image Generation","context-engineering-guide":"Context Engineering Guide"}},{kind:"MdxPage",name:"context-engineering-guide",route:"/guides/context-engineering-guide",locale:"en"},{kind:"MdxPage",name:"deep-research",route:"/guides/deep-research",locale:"en"},{kind:"MdxPage",name:"optimizing-prompts",route:"/guides/optimizing-prompts",locale:"en"},{kind:"MdxPage",name:"reasoning-llms",route:"/guides/reasoning-llms",locale:"en"}]},{kind:"MdxPage",name:"index",route:"/",locale:"en"},{kind:"Folder",name:"introduction",route:"/introduction",children:[{kind:"Meta",locale:"en",data:{settings:"LLM
1Settings",basics:"Basics of Prompting",elements:"Prompt Elements",tips:"General Tips for Designing Prompts",examples:"Examples of Prompts"}},{kind:"MdxPage",name:"basics",route:"/introduction/basics",locale:"en"},{kind:"MdxPage",name:"elements",route:"/introduction/elements",locale:"en"},{kind:"MdxPage",name:"examples",route:"/introduction/examples",locale:"en"},{kind:"MdxPage",name:"settings",route:"/introduction/settings",locale:"en"},{kind:"MdxPage",name:"tips",route:"/introduction/tips",locale:"en"}]},{kind:"MdxPage",name:"introduction",route:"/introduction",locale:"en"},{kind:"Folder",name:"models",route:"/models",children:[{kind:"Meta",locale:"en",data:{chatgpt:"ChatGPT","claude-3":"Claude 3","code-llama":"Code Llama",flan:"Flan",gemini:"Gemini","gemini-advanced":"Gemini Advanced","gemini-pro":"Gemini 1.5 Pro",gemma:"Gemma","gpt-4":"GPT-4","grok-1":"Grok-1","kimi-k2.5":"Kimi K2.5",llama:"LLaMA","llama-3":"Llama 3","mistral-7b":"Mistral 7B","mistral-large":"Mistral Large",mixtral:"Mixtral","mixtral-8x22b":"Mixtral 8x22B",olmo:"OLMo","phi-2":"Phi-2",sora:"Sora",collection:"LLM Collection"}},{kind:"MdxPage",name:"chatgpt",route:"/models/chatgpt",locale:"en"},{kind:"MdxPage",name:"claude-3",route:"/models/claude-3",locale:"en"},{kind:"MdxPage",name:"code-llama",route:"/models/code-llama",locale:"en"},{kind:"MdxPage",name:"collection",route:"/models/collection",locale:"en"},{kind:"MdxPage",name:"flan",route:"/models/flan",locale:"en"},{kind:"MdxPage",name:"gemini-advanced",route:"/models/gemini-advanced",locale:"en"},{kind:"MdxPage",name:"gemini-pro",route:"/models/gemini-pro",locale:"en"},{kind:"MdxPage",name:"gemini",route:"/models/gemini",locale:"en"},{kind:"MdxPage",name:"gemma",route:"/models/gemma",locale:"en"},{kind:"MdxPage",name:"gpt-4",route:"/models/gpt-4",locale:"en"},{kind:"MdxPage",name:"grok-1",route:"/models/grok-1",locale:"en"},{kind:"MdxPage",name:"kimi-k2.5",route:"/models/kimi-k2.5",locale:"en"},{kind:"MdxPage",name:"llama-3",route:"/models/llama-3",locale:"en"},{kind:"MdxPage",name:"llama",route:"/models/llama",locale:"en"},{kind:"MdxPage",name:"mistral-7b",route:"/models/mistral-7b",locale:"en"},{kind:"MdxPage",name:"mistral-large",route:"/models/mistral-large",locale:"en"},{kind:"MdxPage",name:"mixtral-8x22b",route:"/models/mixtral-8x22b",locale:"en"},{kind:"MdxPage",name:"mixtral",route:"/models/mixtral",locale:"en"},{kind:"MdxPage",name:"olmo",route:"/models/olmo",locale:"en"},{kind:"MdxPage",name:"phi-2",route:"/models/phi-2",locale:"en"},{kind:"MdxPage",name:"sora",route:"/models/sora",locale:"en"}]},{kind:"MdxPage",name:"models",route:"/models",locale:"en"},{kind:"MdxPage",name:"notebooks",route:"/notebooks",locale:"en"},{kind:"MdxPage",name:"papers",route:"/papers",locale:"en"},{kind:"Folder",name:"prompts",route:"/prompts",children:[{kind:"Meta",locale:"en",data:{classification:"Classification",coding:"Coding",creativity:"Creativity",evaluation:"Evaluation","information-extraction":"Information Extraction","image-generation":"Image Generation",mathematics:"Mathematics","question-answering":"Question Answering",reasoning:"Reasoning","text-summarization":"Text Summarization",truthfulness:"Truthfulness","adversarial-prompting":"Adversarial Prompting"}},{kind:"Folder",name:"adversarial-prompting",route:"/prompts/adversarial-prompting",children:[{kind:"Meta",locale:"en",data:{"prompt-injection":"Prompt Injection","prompt-leaking":"Prompt Leaking","jailbreaking-llms":"Jailbreaking"}},{kind:"MdxPage",name:"jailbreaking-llms",route:"/prompts/adversarial-prompting/jailbreaking-llms",locale:"en"},{kind:"MdxPage",name:"prompt-injection",route:"/prompts/adversarial-prompting/prompt-injection",locale:"en"},{kind:"MdxPage",name:"prompt-leaking",route:"/prompts/adversarial-prompting/prompt-leaking",locale:"en"}]},{kind:"MdxPage",name:"adversarial-prompting",route:"/prompts/adversarial-prompting",locale:"en"},{kind:"Folder",name:"classification",route:"/prompts/classification",children:[{kind:"Meta",locale:"en",data:{sentiment:"Sentiment Classification","sentiment-fewshot":"Few-Shot Sentiment Classification"}}
1,{kind:"MdxPage",name:"sentiment-fewshot",route:"/prompts/classification/sentiment-fewshot",locale:"en"},{kind:"MdxPage",name:"sentiment",route:"/prompts/classification/sentiment",locale:"en"}]},{kind:"MdxPage",name:"classification",route:"/prompts/classification",locale:"en"},{kind:"Folder",name:"coding",route:"/prompts/coding",children:[{kind:"Meta",locale:"en",data:{"code-snippet":"Generate Code Snippet","mysql-query":"Generate MySQL Query",tikz:"Draw TiKZ Diagram"}},{kind:"MdxPage",name:"code-snippet",route:"/prompts/coding/code-snippet",locale:"en"},{kind:"MdxPage",name:"mysql-query",route:"/prompts/coding/mysql-query",locale:"en"},{kind:"MdxPage",name:"tikz",route:"/prompts/coding/tikz",locale:"en"}]},{kind:"MdxPage",name:"coding",route:"/prompts/coding",locale:"en"},{kind:"Folder",name:"creativity",route:"/prompts/creativity",children:[{kind:"Meta",locale:"en",data:{rhymes:"Rhymes","infinite-primes":"Infinite Primes",interdisciplinary:"Interdisciplinary","new-words":"Inventing New Words"}},{kind:"MdxPage",name:"infinite-primes",route:"/prompts/creativity/infinite-primes",locale:"en"},{kind:"MdxPage",name:"interdisciplinary",route:"/prompts/creativity/interdisciplinary",locale:"en"},{kind:"MdxPage",name:"new-words",route:"/prompts/creativity/new-words",locale:"en"},{kind:"MdxPage",name:"rhymes",route:"/prompts/creativity/rhymes",locale:"en"}]},{kind:"MdxPage",name:"creativity",route:"/prompts/creativity",locale:"en"},{kind:"Folder",name:"evaluation",route:"/prompts/evaluation",children:[{kind:"Meta",locale:"en",data:{"plato-dialogue":"Evaluate Plato's Dialogue"}},{kind:"MdxPage",name:"plato-dialogue",route:"/prompts/evaluation/plato-dialogue",locale:"en"}]},{kind:"MdxPage",name:"evaluation",route:"/prompts/evaluation",locale:"en"},{kind:"Folder",name:"image-generation",route:"/prompts/image-generation",children:[{kind:"Meta",locale:"en",data:{"alphabet-person":"Draw a Person Using Alphabet"}},{kind:"MdxPage",name:"alphabet-person",route:"/prompts/image-generation/alphabet-person",locale:"en"}]},{kind:"MdxPage",name:"image-generation",route:"/prompts/image-generation",locale:"en"},{kind:"Folder",name:"information-extraction",route:"/prompts/information-extraction",children:[{kind:"Meta",locale:"en",data:{"extract-models":"Extract Model Names"}},{kind:"MdxPage",name:"extract-models",route:"/prompts/information-extraction/extract-models",locale:"en"}]},{kind:"MdxPage",name:"information-extraction",route:"/prompts/information-extraction",locale:"en"},{kind:"Folder",name:"mathematics",route:"/prompts/mathematics",children:[{kind:"Meta",locale:"en",data:{"composite-functions":"Evaluating Composite Functions","odd-numbers":"Adding Odd Numbers"}},{kind:"MdxPage",name:"composite-functions",route:"/prompts/mathematics/composite-functions",locale:"en"},{kind:"MdxPage",name:"odd-numbers",route:"/prompts/mathematics/odd-numbers",locale:"en"}]},{kind:"MdxPage",name:"mathematics",route:"/prompts/mathematics",locale:"en"},{kind:"Folder",name:"question-answering",route:"/prompts/question-answering",children:[{kind:"Meta",locale:"en",data:{"closed-domain":"Closed Domain Question Answering","open-domain":"Open Domain Question Answering","science-qa":"Science Question Answering"}},{kind:"MdxPage",name:"closed-domain",route:"/prompts/question-answering/closed-domain",locale:"en"},{kind:"MdxPage",name:"open-domain",route:"/prompts/question-answering/open-domain",locale:"en"},{kind:"MdxPage",name:"science-qa",route:"/prompts/question-answering/science-qa",locale:"en"}]},{kind:"MdxPage",name:"question-answering",route:"/prompts/question-answering",locale:"en"},{kind:"Folder",name:"reasoning",route:"/prompts/reasoning",children:[{kind:"Meta",locale:"en",data:{"indirect-reasoning":"Indirect Reasoning","physical-reasoning":"Physical Reasoning"}},{kind:"MdxPage",name:"indirect-reasoning",route:"/prompts/reasoning/indirect-reasoning",locale:"en"},{kind:"MdxPage",name:"physical-reasoning",route:"/prompts/reasoning/physical-reasoning",locale:"en"}]},{kind:"MdxPage",name:"reasoning",route:"/prompts/reasoning",locale:"en"},{kind:"Folder",name:"text-summarization",route:"/prompts/text-summarization",children:[{kind:"Meta",locale:"en",data:{"explain-concept":"Explain A Concept"}},{kind:"MdxPage",name:"explain-concept",route:"/prompts/text-summarization/explain-concept",locale:"en"}]},{kind:"MdxPage",name:"text-summarization",route:"/prompts/text-summarization",locale:"en"},{kind:"Folder",name:"truthfulness",route:"/prompts/truthfulness",children:[{kind:"Meta",locale:"en",data:{"identify-hallucination":"Hallucination Identification"}},{kind:"MdxPage",name:"identify-hallucination",route:"/prompts/truthfulness/identify-hallucination",locale:"en"}]},{kind:"MdxPage",name:"truthfulness",route:"/prompts/truthfulness",locale:"en"}]},{kind:"MdxPage",name:"prompts",route:"/prompts",locale:"en"},{kind:"MdxPage",name:"readings",route:"/readings",locale:"en"},{kind:"Folder",name:"research",route:"/research",children:[{kind:"Meta",locale:"en",data:{"llm-agents":"LLM Agents",rag:"RAG for LLMs","llm-reasoning":"LLM Reasoning","rag-faithfulness":"RAG Faithfulness","llm-recall":"LLM In-Context Recall",rag_hallucinations:"RAG Reduces Hallucination",synthetic_data:"Synthetic Data",thoughtsculpt:"ThoughtSculpt","infini-attention":"Infini-Attention","guided-cot":"LM-Guided CoT","trustworthiness-in-llms":"Trustworthiness in LLMs","llm-tokenization":"LLM Tokenization",groq:"What is Groq?"}},{kind:"MdxPage",name:"groq",route:"/research/groq",locale:"en"},{kind:"MdxPage",name:"guided-cot",route:"/research/guided-cot",locale:"en"},{kind:"MdxPage",name:"infini-attention",route:"/research/infini-attention",locale:"en"},{kind:"MdxPage",name:"llm-agents",route:"/research/llm-agents",locale:"en"},{kind:"MdxPage",name:"llm-reasoning",route:"/research/llm-reasoning",locale:"en"},{kind:"MdxPage",name:"llm-recall",route:"/research/llm-recall",locale:"en"},{kind:"MdxPage",name:"llm-tokenization",route:"/research/llm-tokenization",locale:"en"},{kind:"MdxPage",name:"rag-faithfulness",route:"/research/rag-faithfulness",locale:"en"},{kind:"MdxPage",name:"rag",route:"/research/rag",locale:"en"},{kind:"MdxPage",name:"rag_hallucinations",route:"/research/rag_hallucinations",locale:"en"},{kind:"MdxPage",name:"synthetic_data",route:"/research/synthetic_data",locale:"en"},{kind:"MdxPage",name:"thoughtsculpt",route:"/research/thoughtsculpt",locale:"en"},{kind:"MdxPage",name:"trustworthiness-in-llms",route:"/research/trustworthiness-in-llms",locale:"en"}]},{kind:"MdxPage",name:"research",route:"/research",locale:"en"},{kind:"Folder",name:"risks",route:"/risks",children:[{kind:"Meta",locale:"en",data:{adversarial:"Adversarial Prompting",factuality:"Factuality",biases:"Biases"}},{kind:"MdxPage",name:"adversarial",route:"/risks/adversarial",locale:"en"},{kind:"MdxPage",name:"biases",route:"/risks/biases",locale:"en"},{kind:"MdxPage",name:"factuality",route:"/risks/factuality",locale:"en"}]},{kind:"MdxPage",name:"risks",route:"/risks",locale:"en"},{kind:"MdxPage",name:"services",route:"/services",locale:"en"},{kind:"Folder",name:"techniques",route:"/techniques",children:[{kind:"Meta",locale:"en",data:{zeroshot:"Zero-shot Prompting",fewshot:"Few-shot Prompting",cot:"Chain-of-Thought Prompting","meta-prompting":"Meta Prompting",consistency:"Self-Consistency",knowledge:"Generate Knowledge Prompting",prompt_chaining:"Prompt Chaining",tot:"Tree of Thoughts",rag:"Retrieval Augmented Generation",art:"Automatic Reasoning and Tool-use",ape:"Automatic Prompt Engineer",activeprompt:"Active-Prompt",dsp:"Directional Stimulus Prompting",pal:"Program-Aided Language Models",react:"ReAct",reflexion:"Reflexion",multimodalcot:"Multimodal CoT",graph:"Graph Prompting"}},{kind:"MdxPage",name:"activeprompt",route:"/techniques/activeprompt",locale:"en"},{kind:"MdxPage",name:"ape",route:"/techniques/ape",locale:"en"},{kind:"MdxPage",name:"art",route:"/techniques/art",locale:"en"},{kind:"MdxPage",name:"consistency",route:"/techniques/consistency",locale:"en"},{kind:"MdxPage",name:"cot",route:"/techniques/cot",locale:"en"},{kind:"MdxPage",name:"dsp",route:"/techniques/dsp",locale:"en"},{kind:"MdxPage",name:"fewshot",route:"/techniques/fewshot",locale:"en"},{kind:"MdxPage",name:"graph",route:"/techniques/graph",locale:"en"},{kind:"MdxPage",name:"knowledge",route:"/techniques/knowledge",locale:"en"},{kind:"MdxPage",name:"meta-prompting",route:"/techniques/meta-prompting",locale:"en"},{kind:"MdxPage",name:"multimodalcot",route:"/techniques/multimodalcot",locale:"en"},{kind:"MdxPage",name:"pal",route:"/techniques/pal",locale:"en"},{kind:"MdxPage",name:"prompt_chaining",route:"/techniques/prompt_chaining",locale:"en"},{kind:"MdxPage",name:"rag",route:"/techniques/rag",locale:"en"},{kind:"MdxPage",name:"react",route:"/techniques/react",locale:"en"},{kind:"MdxPage",name:"reflexion",route:"/techniques/reflexion",locale:"en"},{kind:"MdxPage",name:"tot",route:"/techniques/tot",locale:"en"},{kind:"MdxPage",name:"zeroshot",route:"/techniques/zeroshot",locale:"en"}]},{kind:"MdxPage",name:"techniques",route:"/techniques",locale:"en"},{kind:"MdxPage",name:"tools",route:"/tools",locale:"en"}],flexsearch:{codeblocks:!0},title:"Why Context Engineering?",headings:d},pageNextRoute:"/agents/context-engineering.en",nextraLayout:s.ZP,themeConfig:o.Z};n.default=(0,a.j)(g)}},function(e){e.O(0,[57914,26494,49774,92888,40179],function(){return e(e.s=63318)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.