In June 2025, Shopify CEO Tobi Lütke posted a single thought that rippled through the AI community. He said context engineering beats prompt engineering. Andrej Karpathy, former OpenAI researcher, agreed. He called it "the delicate art and science of filling the context window with just the right information for the next step."

The shift had already started. IEEE Spectrum declared "AI Prompt Engineering Is Dead" in early 2024. But Lütke and Karpathy gave it a name practitioners could rally around. Six months later, a peer-reviewed paper with 9,649 experiments proved they were right.

This article breaks down what changed. Why the field moved from tweaking prompts to designing full information systems. What the research actually shows. And what it means for anyone building with AI.

The Old Way: Prompt Engineering

Prompt engineering was the dominant skill from 2023 to 2025. The idea was simple. Craft the perfect instruction and the model delivers.

Practitioners learned chain-of-thought prompting. They refined few-shot examples. They tuned temperature parameters and adjusted output formats. A well-crafted prompt could coax remarkable results from even modest models.

But prompt engineering has sharp limits.

Prompts are fragile. Change "Output strictly valid JSON" to "Always respond using clean, parseable JSON" and structured output error rates spike. One engineering postmortem found three words added for conversational flow broke downstream parsers within hours.

Prompts are hard to version. Difficult to test. Nearly impossible to standardize across teams. Silent failures happen when outputs look coherent but drift factually or lean biased.

Most importantly, prompts only control a tiny slice of what the model sees. Modern AI agents navigate codebases, query databases, read documentation, and execute multi-step workflows. The instruction is a fraction of the input. The surrounding context does the heavy lifting.

The New Way: Context Engineering

Context engineering designs the complete information environment around the model. It decides what data enters the context window, in what format, and in what sequence.

This includes:

  • RAG pipelines that fetch relevant documents
  • Tool wiring that defines available functions and their schemas
  • Agent skill composition that determines which capabilities to load
  • Memory management that persists state across turns
  • Context window discipline that prunes noise before it drowns signal

Karpathy described it as filling the window with "just the right information." Too little and the model lacks what it needs. Too much or too irrelevant and costs rise while performance drops. Getting it right is "highly non-trivial."

The Research: 9,649 Experiments

In February 2026, Damon McMillan published "Structured Context Engineering for File-Native Agentic Systems." The study tested 11 models across frontier and open-source tiers. It ran 9,649 experiments measuring how context structure affects performance.

The findings reshape how teams should think about AI architecture.

Model choice dwarfs everything else. Frontier models outperformed open-source models by 21 percentage points. That gap is larger than any format choice or retrieval architecture. Picking the right model matters more than perfecting your prompt.

File-based context helps frontier models, hurts open source. Frontier models gained 2.7% accuracy when navigating filesystem structures to find relevant files. Open-source models lost 7.7% with the same approach. The same architecture produces opposite results depending on model capability.

Format barely matters. YAML, Markdown, JSON, and TOON showed no statistically significant difference in aggregate accuracy. Individual models had format preferences, but there is no universal best format.

Compact formats have a "grep tax." TOON uses fewer tokens than JSON by combining YAML indentation with CSV-style layouts. But models unfamiliar with TOON burned extra reasoning tokens trying to parse it. Familiarity beats compression.

File-native agents scale to 10,000 tables. Domain-partitioned schemas let agents navigate massive datasets that exceed any single context window. Related tables group into logical directories. Agents traverse hierarchically rather than loading everything at once.

The LangChain Data: Production Reality

LangChain surveyed over 1,300 professionals for their 2026 State of Agent Engineering report. The numbers tell a stark story.

Fifty-seven percent of organizations have AI agents in production. Adoption is real and widespread.

But thirty-two percent cite quality and reliability as their top barrier. Agents fail in production in ways demos never predict. The gap between prototype and production is where context engineering lives.

The report reveals what separates working agents from broken ones. Teams that treat context as an afterthought struggle. Teams that engineer it deliberately ship.

Harness Engineering: The Full Stack

Context engineering is not the final layer. It sits inside something larger: harness engineering.

Harness engineering emerged when teams realized model capability alone does not guarantee reliable systems. It builds the infrastructure surrounding an agent: constraints, feedback loops, orchestration layers, and control mechanisms.

Birgitta Boeckeler at Thoughtworks defines three pillars:

  • Context engineering maintains enhanced knowledge bases and dynamic observability data
  • Architectural constraints use deterministic linters and structural tests to enforce boundaries
  • Garbage collection deploys periodic agents that scan for documentation drift and constraint violations

Research from Princeton shows harness configuration can improve solve rates by 64% compared to basic setups. The same model scored 2% in one harness versus 12% in another. A 6x performance gap from environment design alone.

Harness engineering handles what happens before and after the model call. Pre-processing filters and validates inputs. Post-processing checks outputs against quality gates. Failure recovery catches errors and retries with adjusted context.

Stripe generates 1,300 AI-written pull requests weekly. They use harness-enforced task scoping, sandboxed runtimes, and review gates. The model writes the code. The harness ensures it meets standards.

What This Means in Practice

The terminology shift reflects a real change in the work.

Prompt engineering asks: How should I phrase this?

Context engineering asks: What does the model need to know?

Harness engineering asks: How do agents operate reliably over thousands of inferences?

Each layer addresses different failure modes. Prompt failures stem from ambiguous wording. Context failures come from wrong documents or stale information. Harness failures happen when agents drift from constraints or miss recovery paths.

For practitioners, the implications are concrete.

Invest in model selection first. The 21-point accuracy gap between frontier and open-source models is the single largest effect in the research. Before optimizing context format, use the best model your budget allows.

Match architecture to model capability. File-based retrieval works for Claude, GPT, and Gemini. Open-source models need more context upfront. One size does not fit all.

Do not obsess over format. Use whatever your team knows and your tooling supports. JSON, YAML, and Markdown all perform similarly. Exotic formats rarely justify the learning curve.

Design for scale early. Domain-partitioned file structures let agents handle 10,000-table schemas. But only with frontier models. Plan your architecture around your model's actual capabilities.

Build the harness before production. Safety guardrails, monitoring, and failure recovery separate demos from reliable systems. The harness is not overhead. It is the product.

The Bigger Picture

Context engineering is not a rebrand. It is a response to how AI work changed.

Models got better at following instructions. GPT-4, Claude, and Gemini handle complex system prompts without extensive scaffolding. The bottleneck shifted from "how do I phrase this" to "what do I give the model to work with."

AI agents went mainstream. Single-turn prompts are a shrinking slice of production AI. Agents plan multi-step workflows, call tools, and maintain state across extended interactions. Each step needs different context. Designing that dynamic assembly is engineering work, not copywriting.

Enterprise adoption demands governance. Reproducibility, audit trails, and version control matter when AI touches customer records and financial data. Context engineering provides the framework. System instructions become auditable configuration. Retrieved knowledge becomes managed data pipelines. Tool definitions become documented API contracts.

Prompt engineering is not dead. It evolved. Writing clear instructions remains a fundamental skill. But it is now one component of a larger discipline. The center of gravity moved. In 2023, the prompt was 80% of the craft. In 2026, it is maybe 20%. The other 80% is retrieval logic, context assembly, state management, and evaluation.

What Comes Next

McMillan's paper is a starting point, not the final word. Context engineering will evolve in several directions.

Dynamic context assembly will let agents automatically determine what they need and retrieve it on the fly. Context-aware fine-tuning will train models to parse specific structures more efficiently. Standardized protocols like Anthropic's Model Context Protocol will emerge for how agents consume structured information. Better context compression will fit more information into fewer tokens without the grep tax.

The key insight from the research: architectural decisions should be tailored to model capability. What works for Claude Opus 4.5 may hurt DeepSeek V3.2. Context engineering requires understanding your specific model, your specific data, and the interaction between them.

The practitioners who will thrive are not the ones who wrote the cleverest prompts. They are the ones who learned to design systems that give models exactly what they need, exactly when they need it.

That is context engineering.


Citations

Suggested Title

Context Engineering Is Replacing Prompt Engineering

Word Count

1,487

Fact-Check Notes

  • Verify the 9,649 experiments number from McMillan's paper abstract
  • Confirm LangChain survey size (1,300+) and specific percentages (57% production, 32% quality barrier)
  • Verify Karpathy's exact quote on context engineering
  • Check that IEEE Spectrum article date is early 2024 (month not specified in sources)
  • Verify Princeton research on 64% solve rate improvement from harness configuration