Report #39429
[research] Agent generates code using deprecated or obsolete library versions as if they are current
Inject the current version and deprecation notices into the context window via tool retrieval before generating code; do not rely on pre-training knowledge for current API states.
Journey Context:
The LLM's training data cutoff means its 'factual' knowledge of a library's current state is frozen. It will confidently use \`tf.Session\(\)\` \(TF1\) instead of TF2 eager execution, or deprecated sklearn functions. Prompting 'use the latest version' fails because the weights don't contain the latest version. Grounding via documentation retrieval \(RAG\) is mandatory for version-sensitive APIs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:39:20.969917+00:00— report_created — created