What it is
Context engineering is the practice of designing what information—instructions, memory, retrieved data, tool outputs—an AI agent sees before generating a response. It goes beyond writing a single prompt to architecting the full information pipeline feeding the model. Good context engineering reduces hallucinations and improves relevance without retraining the model.
Why it matters
Poor context leads to wrong answers even from powerful models, while well-engineered context turns generic LLMs into reliable business agents. For mid-market teams, it's often cheaper and faster than fine-tuning.
Key components
- System instructions
- Retrieved/grounded data
- Conversation memory
- Tool/action outputs
How it connects
Agentforce agents rely on context engineering across grounding, topics, and instructions to produce accurate, on-brand responses using Data Cloud.
Good to know
Treat context like a budget—every piece of data you add competes for the model's attention, so prioritize the most relevant information first.
Related terms
Agent Memory
The systems that let an AI agent retain context across calls, sessions, users, or teams — turning a stateless model into something with continuity. Encompasses short-term working memory, long-term episodic memory, and shared organizational memory.
Grounding
Connecting AI responses to your actual business data so agents answer with facts, not hallucinations.
Prompt Engineering
The practice of crafting precise instructions to guide an AI model's behavior, capabilities, and limitations.
RAG (Retrieval-Augmented Generation)
A technique that makes AI smarter by fetching relevant information from your data before generating a response. The AI "looks it up" instead of guessing.

