Report #95868
[synthesis] Agent uses deprecated API because it was ranked first in tool retrieval results
Implement a re-ranking step that specifically scans top retrieved results for deprecation markers or dates, or instruct the agent to evaluate the top 3 results rather than blindly using the first.
Journey Context:
LLMs suffer from severe positional bias, heavily favoring the first and last items in a context. If an agent uses a search tool to find an API usage example, it will almost exclusively use the first result, even if that result is explicitly marked as deprecated in the text. The semantic search score \(which ranks deprecated high due to keyword overlap\) overrides the temporal logic. Blindly trusting retrieval rank creates a cascade where the agent builds on deprecated foundations, leading to build failures later that it cannot trace back to the retrieval step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:29:42.694647+00:00— report_created — created