Context Engineering for Agents: Does Your AI Really Need More Data?

An AI agent confidently says a table is safe to drop. A job nobody documented still reads from it. The usual fix is more data, bigger windows and better prompts. This post explains what context engineering for agents actually does, and why its real limit sits upstream, in the sources it draws from.
context engineering ai agents

Context & AI Agents. | Part 1 of 3 | Your agents have never been short on data. They’ve been short on context. This series is about the difference, and why it’s about to become the most expensive gap in enterprise AI.

TL;DR

When an AI agent gets an answer wrong inside a large organization, the reflex is to give it more: more documents, bigger context windows, sharper prompts. This article looks at why that reflex rarely fixes the problem, what context engineering for agents actually does, and where the real limit sits. It’s for leaders responsible for taking agents from promising pilot to something the business can trust.

In this Article

Picture a platform team that has done everything right:

  • They connected an internal agent to the wiki, the repository READMEs, the architecture decision records and three years of tickets.
  • They tuned the prompts.
  • They set up retrieval.
  • The pilot demo went well.

Then someone asks the agent a real question: can we decommission the customer_legacy table?

The agent answers with confidence. No active references found. It even cites an architecture page from 2022 that marks the table as deprecated. Clear, sourced, reasonable.

It’s also wrong.

A nightly reconciliation job in another system still reads from that table. Nobody wrote that down, because the engineer who built the job left before the wiki existed. The team only finds out the old way: by turning something off and waiting to see who complains.

The instinctive diagnosis follows fast:

  • The agent needs more data.
  • Index more sources, raise the window, rewrite the prompt.

That instinct is where most conversations about context engineering for agents begin. It’s also where many of them go wrong.

Why Does AI Give Wrong Answers?

AI gives wrong answers, most of the time, because the information it needs is missing, outdated, or disconnected from what it was given. A large language model produces the most plausible response to its input. When the input is complete and current, plausible and correct tend to line up. When it isn’t, they drift apart, and the model has no built-in way to notice.

In enterprise systems, that gap usually takes one of three forms:

  • Missing. The fact exists in the system but not in any source the agent can reach. The reconciliation job above is a typical case.
  • Stale. The fact was written down once, and the system changed afterwards. Documentation records a moment. Systems keep moving.
  • Disconnected. The pieces exist, but the relationship between them was never recorded. The agent can read about the table and read about the job without anything telling it that one depends on the other.

None of these is a model problem. A stronger model given the same input would produce a more fluent version of the same wrong answer.

That’s the first sign that “more data” might be aiming at the wrong target, and the first clue about what context engineering for agents can and can’t fix.

The Limits of More Data, Bigger Windows and Better Prompts

The more-data reflex feels reasonable, and part of it is. Agents do need access to information, and many early deployments start with far too little. The trouble begins when volume becomes the strategy, which is how many first attempts at context engineering for agents end up looking like a bigger search index.

Bigger context windows are the clearest example.

Being able to accept a huge input is not the same as using it well. Researchers at Stanford and collaborators, in the paper Lost in the Middle, found that language models perform best when the relevant information sits at the beginning or end of the input, and that performance can drop significantly when it’s buried in the middle, even in models designed for long contexts. Pouring more documents into the window can make the one fact that matters harder to find, not easier.

Better prompts are the second reflex.

You may have heard the claim that context engineering is the new prompt engineering, and there’s truth in it. But the two are often treated as the same skill with a new name.

A prompt shapes how the question is asked. It cannot supply a fact that isn’t there.

Asking more precisely whether the table is safe to drop won’t reveal a job the agent has never seen.

RAG vs Prompt Engineering: Two Fixes at the Same Layer

The rag vs prompt engineering debate usually frames them as alternatives. It helps to see what each one actually changes:

ApproachWhat it changesWhat it assumesWhere it falls short
Prompt engineeringHow the question is phrasedThe model already has what it needsCan’t add missing facts
RAG (retrieval-augmented generation)Which text is placed in front of the modelThe answer is written down somewhereReturns what resembles the question, which may not be what’s related to it
Context engineering for agentsWhat the model sees at each step, and in what formGood sources exist to draw fromDepends entirely on the quality of those sources

Read the third column and a pattern appears. Every approach assumes the right information is already within reach. Often it isn’t. It exists, just not in the documents and pages these approaches draw from. Which leaves an open question for later: when an agent needs to know how enterprise systems connect, where should it look?

What Is Context Engineering, Really?

Context engineering is the practice of deciding what an AI model sees at each step of a task: which instructions, which facts, which tools, which memory, in what order and in what form. 

Prompt engineering is about writing one good request. Context engineering is about designing the flow of information around a model so that every step starts from the right material.

For a single chatbot answer, that distinction barely matters. For agents, it’s everything. An agent works across many steps, calls tools, reads results and decides what to do next. Each step fills the context window a little more, and each step depends on what came before. Context engineering for agents is the discipline of keeping that window focused as the task unfolds.

 

Context Engineering for Agents in 4 Moves

Most practical approaches come down to three moves:

  1. Write. Save what the agent learns or decides outside the context window, in memory, scratchpads or state, so later steps can draw on it without carrying everything along.
  2. Select. Choose the few pieces of information directly relevant to the current step, and leave the rest out.
  3. Compress. Summarize or trim what has accumulated, so earlier steps don’t crowd out the current one.
  4. Isolate. Split work across separate contexts, so one sub-task’s noise doesn’t leak into another.

 

Done well, context engineering for agents makes the difference between an agent that stays on task and one that loses the thread halfway through. It’s real engineering, with real payoff, and it’s why the term has spread so quickly. But all four moves share one dependency: they can only work with what the agent has been given. Even memory only stores what the agent has already seen. 

 

Is RAG Dead? Not Quite

Some voices in the market frame the shift as the end of RAG. That reading goes too far. Retrieval remains one of the main ways context gets into the window. What changes is its role. 

In context engineering for agents, RAG is one input among several, and the goal moves toward context aware RAG: retrieval that takes into account the task, the step and what the agent already knows, instead of returning whatever scores highest against the query.

That’s progress. But every form of context engineering rag shares a boundary. However well retrieval ranks and filters, it can only return what exists in the sources it searches. If those sources don’t hold the answer, better retrieval won’t find it. 

Context Engineering for Agents: Where Should the Context Come From? 

For questions about how enterprise systems work, the most reliable context comes from the systems themselves: their code, databases, integrations and configuration. Documents about those systems help, but they are a secondary source. Context engineering for agents can only assemble what its sources contain, so the source sets the ceiling for everything the agent does.

That’s why the source deserves as much attention as the technique. Context engineering for agents is an assembly discipline. It decides what goes into the window and how. It cannot decide what exists to be assembled.

In most enterprises, the sources agents draw on to understand systems are documents written by people:

  • Wikis and runbooks
  • Diagrams and READMEs
  • Tickets and the occasional spreadsheet

They’re valuable. They’re also a secondhand account of the systems, written at a point in time, covering what someone thought to record.

Semantic retrieval searches those documents for text that looks like the question. But looking similar is not the same as being connected.

Ask “can we delete the customer_legacy table?” and the agent will likely find the architecture page that marks the table as deprecated. It may miss the nightly job that still reads from it, because that job never mentions deleting anything. And if the job isn’t documented at all, no search will find it. The agent can only guess.

That’s the structural limit of context engineering AI built on outdated documents. Three questions show where it bites hardest:

  • What depends on this? The answer lives in code, queries, integrations and configuration, across systems that were never designed to describe each other.
  • What breaks if it changes? That requires following relationships through several hops, often across tangled dependencies no single team owns.
  • Is this still true today? A document can’t tell whether the system has changed since it was written.

These are exactly the questions context engineering for agents is expected to support once agents move beyond answering FAQs and start touching change, migration and operations. They’re also the questions that decide whether an agent is safe to trust.

What Changes When Agents Work from Real System Structure 

An agent asked whether a table can be deleted doesn’t need a better prompt or a bigger window. It needs to know what actually uses that table. That information rarely lives in a wiki page. It lives in the systems: in the code, the queries, the jobs and the integrations. What’s missing is a way to make that structure readable.

That’s the layer Velorum builds. Velorum connects to code, databases, infrastructure and BI tools, and maps how they relate: which components exist, what calls what, which job reads which table, which report depends on which query. The result is a knowledge graph of the IT ecosystem, built on three principles:

  • Deterministic. Algorithms read real structure. No language model invents the relationships.
  • Structure, not data. Velorum reads structure and definitions, never the business data inside the systems.
  • Inside your environment. It runs within your own infrastructure.

This is what The Velorum Context Layer means in practice: a source of system facts that stays current as the systems change, where every relationship traces back to the component it came from.

Context engineering for agents keeps doing its job with this layer in place. It just works with better material:

  • The agent retrieves the actual dependencies of a table, not the page that sounds most like the question.
  • It works from facts about the systems, not assumptions of them.
  • Its answers point to the job, the query and the table, so a person can check them in seconds.

Velorum makes the same layer available to people and to agents through a suite of specialized applications and MCP:

  • For people, Navis answers natural-language questions about systems and processes, grounded in the mapped structure. Impact System Mapper reveals the impact of any change before it happens, like the SAP or Navision migration that keeps getting postponed.
  • For agents, MCP servers let the agents you already run query the same structural facts your teams see. Impact System Mapper also generates spec-driven specifications, so agents can implement changes aligned with the real architecture.

Context engineering for agents will keep maturing, and the frameworks will get better at writing, selecting, compressing and isolating information. But the organizations that get the most out of it will be the ones that stopped asking how much data their agents can hold, and started asking what their agents actually know.

Final Summary

An agent that gets enterprise questions wrong is rarely short on data. More often it works from sources that are missing facts, out of date, or silent about how systems connect. More documents, bigger windows and better prompts can’t fix that, because context engineering for agents can only assemble what already documented. The lasting fix is a source of context derived from the systems themselves: current, traceable and structural. That’s what gives context engineering something reliable to work with.

Ready to explore what Velorum can uncover?

If you would like to see how Velorum can map and activate your organisation’s knowledge in weeks, our team can provide a tailored demonstration and a complimentary assessment of your current knowledge landscape.

Can context engineering for agents reduce hallucinations in enterprise systems?

Yes. Selecting and structuring the right information gives the model less room to fill gaps with plausible guesses. The remaining risk comes from the sources themselves: if they’re missing or outdated, the model still guesses. A context layer built from real system structure, like the one Velorum maps, narrows that remaining gap.

Is a data catalog enough to give agents context about systems?

Not directly. A data catalog describes data assets: tables, fields, owners, definitions. That’s useful, and often necessary. What agents also need for change and operations questions is how systems depend on each other: which job reads which table, which service calls which API. Velorum maps those structural relationships from code, databases and infrastructure, without reading the business data itself.

Where does context engineering for agents fit in an enterprise AI stack?

It sits between the model and the organization’s sources of knowledge, deciding what reaches the model at each step. It works best when it can draw on sources that are current and connected. For questions about how systems work, Velorum provides that source as a context layer, available to people through Navis and to agents through MCP servers.

Ready to explore what Velorum can uncover?

If you would like to see how Velorum can map and activate your organisation’s knowledge in weeks, our team can provide a tailored demonstration and a complimentary assessment of your current knowledge landscape.

Your Enterprise knowledge continues to be your differentiator. Unlock its unique potential in hours