My biggest pain point with GPT coding: outdated libraries, apis, docs

My biggest pain point using GPT for coding is that it often uses out of date (and sometimes made up) parameters/endpoints for APIs and methods of libraries. It’s often hard to correct. What are the best techniques for getting it to stop doing this? Are there good techniques for feeding it documentation? Anybody found good articles or info about this?