Report #82307
[synthesis] Agent forcing deprecated library patterns from retrieved documentation into modern code
Embed temporal/version metadata into RAG chunks and enforce a recency filter, or explicitly prompt the agent with the target library version and instruct it to reject solutions older than a specific date.
Journey Context:
When an agent uses RAG to find solutions, it optimizes for semantic similarity. A StackOverflow answer from 2018 for Python 3.6 might be semantically identical to a query, but functionally broken in Python 3.11. The agent confidently uses the deprecated pattern because the RAG score was high. The synthesis is that semantic similarity is a poor proxy for compatibility. Agents fail consecutively because they trust the 'relevance' score over the 'temporal validity' of the data, requiring explicit version-awareness guardrails in the retrieval step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:44:32.903554+00:00— report_created — created