Why AI Projects Fail: The Truth About Context Engineering
Most AI projects fail before a model is ever selected.
Not because of a bad model. Not because the prompts were off. Because nobody built the information architecture that determines whether any model can perform reliably in production.
I keep watching the same pattern unfold. Demo looks great. Stakeholders are in. Budget gets approved. Six months later the project is quietly shelved or limping along at a fraction of what was promised. The post-mortem calls it a technology problem. It was never a technology problem.
| What is a context failure? A context failure is a production AI failure caused not by model capability or prompt quality, but by missing or incorrectly structured information in the context layer. Most AI projects that fail before reaching production are context failures. The model performed exactly as designed. The design gave it nothing reliable to work with. |
The research on this is consistent across every major institution that has looked at it.
McKinsey’s 2025 State of AI survey found that over 80% of organizations report no meaningful financial impact from AI despite widespread adoption. (McKinsey, 2025)
BCG research tracking more than 1,000 C-level executives found 74% of companies have failed to generate tangible value from AI. BCG’s own data on the companies that do succeed is telling: they allocate 10% of effort to algorithms, 20% to technology and data, and 70% to people and processes. (BCG, 2024)
RAND Corporation put the AI project failure rate at 80.3% in 2025, roughly twice the failure rate of traditional IT projects. (RAND, 2025)
None of those reports agree on the root cause. Data quality. Change management. Leadership alignment. Tool selection. Unclear success criteria. Every explanation is pointing at a symptom. That 70% BCG number is the closest anyone gets to naming the actual problem. People and processes is just another way of saying: what the AI knows about the organization, how decisions get made, what happened before this session started.
That is context architecture. Nobody in those reports calls it that. But that is what is missing.
Five failure modes trace back to that one gap. I built the diagnosis around the Context Stack framework introduced in the pillar article for this cluster. New to the Context Stack? Start there first. This piece applies it as a diagnostic tool for the question I keep getting from operators: why does the AI nail it in the demo and fall apart in production?
What Gets Blamed Instead of What Actually Broke
Model selection gets blamed first. Teams spend weeks on benchmarks, run comparisons, agonize over which API to call. Then they hand the winner a task with no structural context, no project memory, no organizational knowledge, no history of prior decisions. The model does what it can with what it has. What it has is almost nothing.
Prompts get blamed next. Better prompts tell the model what to do. They do not tell it what it needs to know to do that reliably. A well-written prompt dropped into a context vacuum still produces inconsistent output at any real volume. I have rewritten prompts for hours trying to fix output inconsistency that turned out to be a schema enforcement problem in Layer 1. The prompt was fine. The architecture around it was missing.
Neither of those is the actual failure. The failure happens before the first API call. That is why it shows up in production and stays invisible in the demo.
AI Failure Stack: Where the Architecture Breaks

The AI Failure Stack reveals where execution breaks down.
Why Upgrading the Model Will Not Help
A more capable model with missing context still produces unreliable output. A weaker model with complete, well-structured context routinely outperforms it. The model is not the variable that determines reliability. The information architecture is.
Early in building out an agent workflow for content operations, I ran into this directly. First session outputs looked solid. Second session, same exact prompt, noticeably worse. Nothing had changed in the prompt. Nothing had changed in the model. What had changed was that the model was starting each session with no memory of what the project was. It was re-inferring context from scratch on every call and getting it slightly wrong in different ways each time.
My first instinct was to fix the prompt. Spent an hour on it. Did not help. The problem was Layer 2. Project context was not being injected as a blocking input at session start. Once I structured that layer and made it persistent, the inconsistency stopped. Same model. Same prompt. Different architecture.
Every AI budget conversation I see circles model tier and compute spend. Very few ask whether the information architecture is built before adding more processing power to it.
The Five Context Failures That Kill AI Projects

The Context Stack has five layers: Instructions, Project Context, Organizational Knowledge, Historical State, and Environmental State. Every common AI project failure I have seen traces back to one or more of these layers being absent or broken. Each presents differently in production. Each points to a specific missing layer.
Failure Mode 1: Output Inconsistency (Layer 1 Missing)
Good output Tuesday. Inconsistent output on Thursday. Same task. Same prompt. Different results.
Layer 1 is almost always the problem. Instructions are missing, vague, or contradictory. The model infers what it should produce rather than executing against a defined standard. Every call becomes a small guessing exercise with a different answer.
Schema enforcement fixes most of this. When output format is specified structurally rather than described in prose, consistency improves fast. In production testing across structured content workflows, output consistency moved from 61% to 89% after schema enforcement was applied at the instruction layer. The model did not change. The constraint layer around it did.
Teams that see inconsistency early usually rework the prompt. Almost every time, the fix is in the instruction layer.
| Layer 1 Diagnostic: Does every call to this model operate against a defined output schema? If the answer is “it depends on the prompt,” the instruction layer is broken. Schema enforcement is not optional at production volume. |
Failure Mode 2: Context Amnesia (Layer 2 Missing)
A few weeks into production, coherence across sessions starts breaking down. The AI asks clarifying questions it already asked last week. Forgets decisions already made. Operators start manually copy-pasting the same context block into every new session because that is the only way to get usable output.
Layer 2 is missing. Project context is not structured as a persistent, blocking input to every session. It exists somewhere in a Notion doc or in someone’s head, but it is not part of the model’s operating environment. Every session the model is starting from scratch and guessing.
Without preserved project context, sessions reset unpredictably. In production systems where this layer was absent, cross-session state loss ran at 38%. After context architecture was implemented and Layer 2 was structured as a blocking input, that dropped to 11%. A better model would not have touched that number.
| Layer 2 Diagnostic: What does this model know about the project before it receives a task? If the answer is “nothing” or “whatever was in the prompt that day,” Layer 2 is absent. |
Failure Mode 3: Organizational Drift (Layer 3 Missing)
Outputs are technically correct and organizationally wrong. The AI recommends an approach the team stopped using two years ago. Uses terminology nobody uses anymore. Misses implicit standards that every experienced employee just knows. The model is reasoning fine. It does not know how your organization reasons.
Layer 3 is missing. Accumulated organizational knowledge, the judgment, vocabulary, norms, and institutional memory of the team, is not in the context. And most organizations that struggle with AI implementation also do not have
most organizations that struggle with AI implementation also do not have structured decision infrastructure in place. No documented model for how decisions get made. No explicit evaluation criteria. No written tradeoff frameworks. The AI cannot surface organizational judgment it cannot find.
Fixing Layer 3 is curation work, and that part does not get automated. Someone has to write down what the organization knows, structure it so the model can use it, and keep it current as things change. There is no shortcut.
| Layer 3 Diagnostic: If a highly capable contractor joined your team today and received only what the AI receives as context, could they make decisions consistent with your organization’s standards? If not, Layer 3 is missing. |
Failure Mode 4: Repeated Decision Errors (Layer 4 Missing)
Patterns start showing up in the failures. Same mistake twice. Recommends a path the team already tried and walked away from. Keeps arriving at conclusions the project has already moved past. Every session is session one because the model has no access to what happened before.
Historical state is the memory of prior decisions, their outcomes, and the reasoning behind them. Without it, experience does not accumulate. Each new session inherits nothing from the sessions before it.
A conversation log does not fix this. Conversation logs are noise. Historical state is curated: the key decisions, the reasoning used, the outcomes observed, the constraints that drove the choice. That curation is what makes Layer 4 useful. Without it, resolved errors stay unresolved because the model has no way to know they were ever resolved.
| Layer 4 Diagnostic: Can this AI system explain why a decision made three sessions ago was made? If not, historical state is absent and the system will repeat resolved errors indefinitely. |
Failure Mode 5: System Blindness (Layer 5 Missing)
The AI needs to coordinate with real-world systems and cannot. Does not know what the current pipeline status is. Does not know which tools are available right now. Builds recommendations on a model of the environment that does not match what is actually running.
Layer 5 is environmental state: what is happening right now in the systems the AI interacts with. Tool availability, API status, current data states, active integrations. Without it, the model operates blind.
The gap between building AI tools in production and running a solid demo almost always has a Layer 5 component in it. The demo runs against a controlled environment. Production runs against reality. Execution routing, the mechanism that directs tasks between planners, tools, and evaluators, depends on accurate environmental state. When that state is missing, routing errors compound fast and in unpredictable ways.
| Layer 5 Diagnostic: Does this AI system know the current state of every tool and system it might interact with before it begins a task? If not, environmental state is absent and system blindness is the result. |
The Diagnosis: Context Failure, Not Model Failure

Run through those five failure modes and most AI project post-mortems start making sense in a different way. Output inconsistency points to Layer 1. Context amnesia points to Layer 2. Organizational drift points to Layer 3. Repeated decision errors point to Layer 4. System blindness points to Layer 5.
None of it points to the model.
The five-layer Context Stack is not a debugging tool for after things break. Each layer is a question that needs an answer before the project starts. The teams I see skip this step are the ones filing the post-mortems.
What This Looks Like When It Works
At MyEListing, a commercial real estate marketplace, we built an AI marketing stack integration to handle listing quality, investor matching, and content workflows. The first few months were a good example of every Layer 2 and Layer 3 failure mode running simultaneously.
Before context architecture was formalized, the system had listing data and basic task instructions. That was it. No project context carried across sessions. No organizational standards for what a high-quality listing actually meant. No history of prior matching decisions. No awareness of which markets and investor segments were active.
Every session started cold. Output inconsistency was constant. A well-structured listing on one run, a structurally different one on the next with no explanation for why. Investor match recommendations kept surfacing patterns the team had already deliberately moved away from. We were manually re-loading the same context block every session just to get output worth reviewing.
What surprised me was how little of this we initially attributed to context. The instinct was to refine the prompts. We spent time on that. It helped some. But the real problem was that the model had no idea what the project was from one session to the next, and no idea how MyEListing evaluates listing quality versus how a generic real estate model would.
After we built out the context layers properly: Layer 1 got a defined output schema for listings. Layer 3 got organizational standards for listing completeness and documented investor preference profiles. Layer 4 captured prior matching decisions and the reasoning behind them. Layer 5 got current market state and active investor segments injected at session start.
Listing accuracy moved from 92% to 96%. Investor match rate improved 28%. Revision cycles dropped from five per output to two. Same model throughout. What the model had access to changed completely.
Operationally, the downstream effect was what mattered most. The team stopped spending their time correcting AI output and started spending it acting on AI output. That is the shift that structured context architecture produces. Not just better accuracy numbers. Different work.
What to Build Before You Write Any Code
Five structural questions. Answer them before the build starts.
- Layer 1 (Instructions): Is there a defined output schema for every task this AI will perform? Is it enforced structurally, not just described in a prompt?
- Layer 2 (Project Context): What does the model know about this project before it receives a task? Is that knowledge structured as a persistent, blocking input at session start?
- Layer 3 (Organizational Knowledge): Has institutional knowledge been written down and made accessible? Can the model make decisions consistent with how your organization makes decisions?
- Layer 4 (Historical State): Are prior decisions, their reasoning, and their outcomes captured and available to the model? Is that state curated rather than a raw conversation log?
- Layer 5 (Environmental State): Does the model have accurate, current information about every system and tool it might interact with before a session begins?
Any “no” answer is a context gap. It will not show up in the demo. It will show up in production, through output degradation, repeated errors, and slow organizational frustration with a system that seemed to work and then quietly stopped.
Five Things to Do Before the Next AI Build
- Run the Layer 1 diagnostic before choosing a model. If you cannot define the output schema, you are not ready to build.
- Document project context as a structured input file, not a prompt. Treat it as a blocking dependency for every session.
- Audit what organizational knowledge exists in written, accessible form. Anything that lives only in someone’s head is not in the context layer.
- Start a decision log on day one. Capture every key AI-assisted decision, the reasoning behind it, and the outcome. That becomes Layer 4.
- Map every external system this AI will interact with. For each one, define how current state gets fetched and injected before a session begins.
Most Organizations Are Building the Wrong Thing
Years of investment in better models. Better prompts. Better benchmarks. The failure rate across all those institutions has barely moved because none of those improvements touch the actual problem.
Most organizations think they are building AI systems. What they are building is context systems. The AI is the execution layer. Context architecture is what determines whether the execution layer performs reliably or breaks down quietly in production.
Organizations that understand that distinction are going to outperform the ones still running model selection workshops. They are not competing on which model to pick. They are competing on information architecture. And information architecture compounds in ways that model upgrades do not.
If this idea feels unfamiliar, start with my pillar article, What Is a Context Engineer? The Truth About AI Success, where I introduce the role and explain why AI success depends more on context architecture than prompt engineering. Then read What Does a Context Engineer Do? Complete Guide, which breaks down the day-to-day responsibilities, systems, and workflows behind effective context engineering.
Build the context architecture before the first line of code. The build gets easier from there. Everything else is implementation.
Follow along as I build real AI systems and share what breaks:
Subscribe to Strategic AI Leader for diagnostic frameworks, operator build logs, and context architecture guides delivered directly to your inbox.
Help Support My Writing
Subscribe for weekly articles on leadership, growth, SEO and AI-driven strategy. You’ll receive practical frameworks and clear takeaways that you can apply immediately. Connect with me on LinkedIn or Substack for conversations, resources, and real-world examples that help.
About the Author
I’m Richard Naimy, an operator and product leader with over 20 years of experience growing platforms like Realtor.com and MyEListing.com. I work with founders and operating teams to solve complex problems at the intersection of product, marketing, AI, systems, and scale. I write to share real-world lessons from inside fast-moving organizations, offering practical strategies that help ambitious leaders build smarter and lead with confidence.
I write about:
- AI + MarTech Automation
- AI Strategy
- Context Engineering
- COO Ops & Systems
- Growth Strategy (B2B & B2C)
- Infographic
- Leadership & Team Building
- Marketplace Growth Strategy
- My Case Studies
- Personal Journey
- Revenue Operations (RevOps)
- Sales Strategy
- SEO & Digital Marketing
- Strategic Thinking
Want 1:1 strategic support?
Connect with me on LinkedIn
Read my playbooks on Substack
