Context clash, confusion, and poisoning
Key Takeaway
Match the symptom to the cause: unexpected behavior or errors point to context clash, inconsistent and slower responses point to context confusion, and incorrect or outdated information points to context poisoning.
An Agentforce agent's context is everything the model has to work with. Context engineering means tuning that context so the agent gets the right information, tools, and instructions. Bad context causes three common problems: context clash, context confusion, and context poisoning. Each one has its own symptoms and its own ways to prevent it.
What an agent's context includes
An agent's context has four kinds of parts:
| Includes | |
|---|---|
| Prompts and instructions | Subagent instructions and user prompts |
| Actions and tools | Flows, Apex actions, and prompt templates |
| Data inputs | CRM data, Data 360, knowledge articles, uploaded documents, and Slack |
| Memory | Short-term memory (the current conversation) and long-term memory (past interactions) |
Context engineering is broader than prompt engineering or RAG (Retrieval Augmented Generation). Prompt engineering focuses on direct instructions. RAG focuses on retrieving the right content. Context engineering covers everything available to the model, which means all four kinds of parts above.