The amount of reference material it has is also a big influence. I’ve had to pick up PLC programming a while ago (codesys/structured text, which is kinda based on pascal). While chatgpt understands the syntax it has absolutely no clue about libraries and platform limitations so it keeps hallucinating those based on popular ones in other languages.
Still a great tool to have it fill out things like I/O mappings and the sorts. Just need to give it some examples to work with first.