Report #63597
[synthesis] Agent drifts away from the original task because it retrieves highly relevant but tangential information and starts answering the retrieved context instead of the user's prompt
Append the original user goal to every retrieval step's prompt, and force the agent to explicitly state how the retrieved information relates to the goal before synthesizing an answer.
Journey Context:
RAG-equipped agents often fall into the 'relevance trap.' If they retrieve a document that is topically related but doesn't answer the specific question, the LLM's attention is captured by the retrieved context, and it generates a response based on the document rather than the user's intent. This is a form of context poisoning from the retrieval tool. By constantly re-injecting the original goal and forcing a relevance justification, you anchor the agent's attention back to the user's task, preventing drift.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:14:22.050350+00:00— report_created — created