Member-only story
How to Force ChatGPT to Use the Latest Documentation for Coding
Stop ChatGPT from Generating an Old Code
How to Force ChatGPT to Use the Latest Code & Docs
As a Software Engineer at EPAM, I frequently work with cutting-edge frameworks and libraries. However, I’ve noticed a recurring challenge when using AI tools like ChatGPT or Copilot — they often generate outdated code. Large language models (LLMs) are trained on extensive internet data, including thousands (maybe millions) of old articles and outdated documentation.
As a result, when developers ask LLM to create new React or Angular components, it more often follows best coding practices from 2020 than nowadays.
This issue is primarily prevalent with deep-thinking AI models that prioritize established approaches. Developers relying on AI-generated code may carelessly adopt outdated patterns, delaying the adoption of modern technologies.
For example, Vitest, a powerful modern testing framework, is currently facing an issue in which Copilot and ChatGPT default to writing tests in Jest or Jasmine, which have been industry standards for years.
Developers face a dilemma: embrace new technologies without AI assistance or stick to well-known frameworks that AI can support.