The evolution of artificial intelligence demands more than just well-crafted queries; it requires a sophisticated orchestration of information. Martin Keen, a Master Inventor at IBM, alongside Graeme Noseworthy of TechXchange Content & Experiences, presented a compelling distinction between prompt engineering and the emerging discipline of context engineering. Their discussion, framed around an illustrative "Agent Graham" scenario, highlighted how the latter builds significantly smarter, more dynamic AI systems.
Keen introduced prompt engineering as "the process of crafting the input text used to prompt a large language model," steering its behavior and output. However, he quickly pivoted to demonstrate its inherent limitations. When Agent Graham, an AI specialized in travel booking, was simply prompted to "book me a hotel in Paris for the DevOps conference next month," it booked a Best Western in Paris, Kentucky. This misstep, Keen explained, could be attributed to a lack of specificity in the prompt, but more critically, it underscored a failing of broader context.
Prompt engineering, while foundational, is only "part art, part science." Key techniques include role assignment, such as telling the LLM, "You are a senior Python developer reviewing code for security vulnerabilities," which produces vastly different outputs than a generic request. Few-shot examples, where developers "show, don't just tell" by providing input-output pairs, help the model understand exact formats. Chain-of-thought (CoT) prompting, by instructing the model to "let's think step by step," prevents it from jumping to conclusions, proving particularly powerful for complex reasoning. Finally, constraint setting explicitly defines boundaries, like "limit your response to only 100 words."
However, context engineering encompasses a broader, system-level approach, programmatically assembling *everything* an LLM sees during inference. This discipline orchestrates entire agentic environments. Its components are crucial for enabling AI to act intelligently beyond single-turn interactions.
Central to context engineering is robust memory management. This includes short-term memory, which might summarize long conversations to keep responses within context windows, preventing the AI from "forgetting" earlier interactions. Long-term memory, utilizing vector databases, retrieves user preferences, past trips, and learned patterns. State management ensures the agent maintains awareness across multi-step processes, knowing if a flight booking succeeded or what arrival time is needed for airport transfers. Retrieval Augmented Generation (RAG) connects agents to dynamic knowledge sources. RAG employs hybrid search, combining semantic and keyword matching, to pull only "contextually relevant parts" of a document, rather than overwhelming the LLM with an entire policy. Finally, tools empower LLMs to interact with the real world, querying databases, calling APIs, or executing code, bridging the gap where LLMs alone cannot act.
Ultimately, while prompt engineering refines the questions posed to an AI, context engineering builds superior systems by intelligently combining these elements. The final prompt, Keen notes, "might be 80% dynamic content from the states and the memory and the RAG retrievals, and 20% static instructions." This integration allows AI agents like Graham to move beyond simple directives to truly understand and act within a complex, real-world context.

