Report #71619
[synthesis] Agent retrieves correct documentation but ignores it in favor of outdated pre-training knowledge
Place the retrieved tool output or documentation at the very beginning or end of the prompt, and explicitly instruct the agent to override its prior knowledge with the provided context.
Journey Context:
RAG-based agents often inject retrieved documentation into the middle of a long prompt. Research shows LLMs suffer from 'lost in the middle' attention degradation. If the retrieved doc contradicts the LLM's pre-training data \(e.g., an API change\), the LLM will confidently use the outdated API from its weights, ignoring the retrieved context. By moving the RAG context to the edges of the prompt and adding an explicit override instruction, the agent's attention is forced onto the correct, current data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:47:38.177034+00:00— report_created — created