Improving AI Outcomes Through Context Engineering
TRAINING MODELS FOR AGENTIC AI
Enterprises adopting agentic AI are charged with training not just a few, but often hundreds of, agents, each assigned a specific task and objectives. It could be staffing, compliance, logistics, or research. Agents are autonomous and proactive, not waiting for guidance from humans to perform their tasks and achieve their objectives. They communicate with each other and learn from changes in the business environment. Suppose a problem arises with the apple crop. Agents can redirect shipping to accommodate the late, or early, harvesting.
On the LangChain blog (langchain.com/blog/context-engineering-for-agents), it’s phrased this way: “Context engineering is the art and science of filling the context window with just the right information at each step of an agent’s trajectory.” It goes on to list the context types that context engineers need to manage:
- Instructions – prompts, memories, fewshot examples, tool descriptions, etc
- Knowledge – facts, memories, etc
- Tools – feedback from tool calls
Many technologies can be included in the context engineer’s toolbox, such as classic retrieval software, semantic search, vector databases, retrieval-augmented generation, linked data, knowledge graphs, and metadata, along with other legacy technologies designed to connect AI with trusted enterprise knowledge and real-time business context. It’s not a total reinvention of the wheel (or wheelbarrow), but it is looking at how these older technologies interact to enhance the understanding of context.
Although not exactly rule-based in the traditional sense of the term, agent decisions do need to be grounded in the business logic of the individual enterprise. At what point do the apples too ripe for grocery stores become eligible to be sold to a food manufacturer for applesauce? The underlying information architecture and business rules enable the dynamic automation of existing business processes and the ability of agents to notice and solve problems. This can be situational. How much autonomy, for example, do agents have in making pricing decisions will be a decision made differently from one company to another.
CONTEXT HELPS WITH HISTORY
With agentic AI, context becomes even more important, since the independent actions of agents require context to perform those actions appropriately. Context determines not only what they should do today, but also what changes have occurred that would affect the actions. In that sense, context engineering for LLMs relies on history, but must also have human input to identify why that history may no longer be relevant. Agents should not upset the apple cart, but sometimes the apple cart upsets itself due to weather, a pot-holed road, or bad loading decisions. Context is the answer.
In a perfect world, context engineering would solve relevancy problems. That is not always the case. As a vision, a situation to strive for, it’s great. Not every enterprise is at the same level of expertise regarding context engineering. They are at different stages of development and have differing resources available for context engineering.
Enterprise AI is evolving fast. Still, too many organizations struggle to deliver accurate and trustworthy results, often because the context has not been implemented at scale. Without context, enterprise AI is essentially working without a firm knowledge of what constitutes accuracy. It’s as if they had obscured access to context and blindfolded their engineers. Investing in context engineering will eliminate bottlenecks that threaten to lengthen, rather than shorten, the time it takes to achieve business objectives. Context engineering turns LLMs into effective partners, opening up new opportunities.
As AI moves from experimentation to production, the focus shifts from concentrating on content to determining context. Context engineering allows organizations to improve AI outcomes by delivering richer context, memory, retrieval, and business knowledge to AI systems and agents.