Skip to main content

Why Your AI Agent Keeps Getting It Wrong

Most AI agents in production share one failure mode.

They are blind to context.

A modern frontier model can pass the bar exam, debug production code, and summarise a 200-page filing in seconds. Drop the same model into your enterprise and it will confidently invent a policy that does not exist and cite a vendor you have never used.

The model is the same. The context is different.


What Context Actually Means

Context is everything the model needs to see before it generates an answer. In a chatbot, it is the prior turns of the conversation. In an agent, it is the documents, the tools, the system prompt, and whatever the agent has already done in the current session.

The model itself is a fixed asset. The context window is the variable.

Performance is mostly a function of what you put in it. Get the context right and a mid-tier model outperforms a frontier one. Get it wrong and the frontier model writes nonsense in a confident voice.

The model is the engine. The context is the road.


Where Enterprises Get It Wrong

Three patterns repeat across every engagement we run.

1. Raw data dumps

A team feeds an agent the entire SharePoint folder, every PDF and Word doc untouched. The agent retrieves the wrong document at the wrong moment, and nobody understands why.

The fix is selection over volume. More context can make things worse.

2. Untouched source files

Source documents go in as-is. PDFs, slide decks, scanned forms, all of them straight from the drive. The model sees a parsing mess and behaves accordingly.

The fix is conversion. Every high-value document needs a clean text representation before it touches a model.

3. No structure

Documents arrive flat. No headings, no sections, no metadata. The model cannot tell a policy from a meeting note from a draft.

The fix is structure. Headings, lists, and tables are the model’s only way to read intent.


The Format Problem Hiding Inside the Context Problem

Most of what looks like a model problem is a format problem in disguise.

SymptomReal cause
Agent cites the wrong documentRetrieval over a flat corpus
Agent invents policiesSource docs have no clear headings
Agent ignores recent updatesNo version metadata
Agent hallucinates a numberTables flattened during parsing

You can change models a hundred times and fix none of these. The problems live in the corpus, well below the model layer.


What Good Context Looks Like

A useful working definition. Context is good when a competent human, handed the same input, could answer the same question.

That is a brutal test. Most enterprise corpora fail it. The information is technically present, but no human could find or read it fast enough either.

Fix the corpus first. The model looks smarter immediately.


Fix the Inputs

Every conversation about AI performance eventually becomes a conversation about format, structure, and source quality.

The bottleneck is almost always the input layer. The model does what the inputs let it do, and not much more.

Software is only the surface. Infrastructure is the rest.

Build there.


ORKA Briefings are short, strategic readings on the systems shaping AI in Canada. For inquiries, visit orkaai.ca.