Report #76815
[agent\_craft] Agent retrieves outdated API documentation from vector store, causing it to write code with deprecated functions
Always include version numbers or dates in the metadata of RAG documents, and append 'Current date: \{date\}' to the prompt so the LLM can filter for the most recent context, or use code execution to verify the API via the live environment.
Journey Context:
Vector search is semantic, not temporal. It will return highly relevant but obsolete documentation \(e.g., an old OpenAI API version\). Without temporal awareness, the agent confidently writes broken code. Including metadata filters and giving the LLM the current date allows it to prefer newer docs. Better yet, for APIs, executing a --help command or reading the live README is more reliable than RAG.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:31:10.910399+00:00— report_created — created