Poisoning, Distraction, Confusion, and Clash
Databricks Context Engineer Associate · Lesson 2 of 18 · 9:22
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Databricks Certified Context Engineer Associate exam. In this lesson: the four context failure modes (poisoning, distraction, confusion, and clash), how to name a failure from an agent trace rather than from its symptom, and how to match each failure to its remedy. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Four bad days
On Monday, Thistledown's support agent misreads a deposit early in a chat, and repeats the wrong amount for the rest of the conversation. On Tuesday, it applies the quiet hours of one building to another, because both rule books sit in its context. This lesson names the four ways context fails, shows how to tell them apart in a trace, and matches each one with its remedy.
Poisoning and distraction
Context poisoning happens when a hallucination or another error enters the context, and the agent keeps referring to it. Because the error now looks like a fact, every later step builds on it, and it can take a long time to undo. Context distraction happens when the context grows so long that the model leans on it more than on what it learned in training. A distracted agent tends to repeat earlier actions from its history, instead of reasoning about the next step.
Confusion and clash
Context confusion happens when superfluous content in the context shapes the response, like extra documents or tools that have nothing to do with the task. Too many tools is a classic cause: with dozens of similar tools in view, the model picks the wrong one, even when the window is far from full. Context clash happens when parts of the context contradict each other, like an old rule and a new rule, or a tool description that disagrees with the system prompt. Clash is harder than confusion, since the bad content is relevant, it just disagrees with other relevant content.
Reading a trace
An MLflow trace shows what the agent saw and did at each step, so you can name the failure from evidence. Is a wrong fact being reused from earlier in the trace? That is poisoning. Is the agent repeating past actions in a very long history? That is distraction. Is irrelevant content steering the answer, or do two relevant pieces disagree? That is confusion in the first case, and clash in the second.
Matching the remedy
Each failure has its own remedy. For poisoning, remove or correct the bad item, validate facts before they are written to memory, and if needed restart from a clean context. For distraction, compact or summarize the history, so the agent works from a short, faithful summary. For confusion, give the agent fewer and better tools, and retrieve only what the task needs. For clash, keep one authoritative source, and remove the version it replaces. And isolating risky subtasks in their own context stops failures from spreading.
Recap
Let's recap. Poisoning is an error that enters the context and keeps being reused. Distraction is a history so long that the agent relies on it instead of reasoning. Confusion is irrelevant content that steers the response, and clash is relevant content that disagrees. Name the failure from the trace, not from the symptom alone. And match the remedy: correct, compact, select, or keep one authoritative source.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
The agent misreads a $1,500 deposit as $1,200, though the lease tool returned the right figure. For ten turns, it computes refunds from $1,200. Which failure is this?
- Context distraction
- Context confusion
- Context poisoning
- Context clash
Show the answer
Context poisoning
An error entered the context, and later steps keep referring to it, which is context poisoning. “Context distraction” is wrong, since the agent is not over-relying on a long history, it is reusing one wrong fact. “Context confusion” is wrong, since the bad figure is relevant to the task, not superfluous. And “Context clash” is wrong, since nothing in the context contradicts the error, the correct tool result was never used again.
The retriever returns the 2025 and the 2026 house rules of one building, with different quiet hours. The agent’s answers change from turn to turn. Which failure is this?
- Context clash
- Context confusion
- Context poisoning
- Context distraction
Show the answer
Context clash
Two relevant pieces of the context disagree, which is context clash. “Context confusion” is wrong, since both rule books are relevant, so the problem is not superfluous content. “Context poisoning” is wrong, since no error from an earlier step is being reused. And “Context distraction” is wrong, since the history is short, and the agent is not repeating past actions.
The maintenance agent sees 40 tools, and calls the parking permit tool for a broken heater. Its context is half full. Which technique most directly fixes this?
- Summarize the conversation history
- Restart from a clean context
- Move to a model with a larger window
- Give the agent only the tools that fit the request
Show the answer
Give the agent only the tools that fit the request
This is confusion caused by too many tools, so give the agent only the tools that fit the request. “Summarize the conversation history” is wrong, since the window is only half full, and summarizing the history removes no tools. “Restart from a clean context” is wrong, since no wrong fact is being reused, so restarting would not help. And “Move to a model with a larger window” is wrong, since a larger window would keep all forty tools in view.