Report #45461
[research] Generating code using outdated or deprecated library functions
Inject the library version into the system prompt \(e.g., 'Using pandas 2.1.0'\). If the version is unknown, default to the latest stable version and explicitly state the assumed version in the output.
Journey Context:
Training data cutoffs mean models strongly prefer APIs they saw most frequently during training, which are often older versions \(e.g., using append instead of concat in Pandas\). Without version grounding, the model will confidently generate code that throws DeprecationWarnings or fails at runtime.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:46:41.292788+00:00— report_created — created