This a very interesting topic! To start I wanted to highlight part of Wikipedia about ChatGPT:
"Its uneven factual accuracy was identified as a significant drawback." - I just love the uneven factual accuracy as term, we might adopt it in other areas of life as well.
In my code editor I have been using Copliot (based on GPT) for a while and it has been extremely timesaving, but I rarely use it for more than single / double line completion.
Last week I have used ChatGPT a couple of times to help me with some more advanced TypeScript types (instead of scouring Stackoverflow + TS docs). The results were useful but unevenly accurate... Sometimes through careful crafting of prompts I was able to get result, that looked exactly what I wanted it to be. Only to realize that transformation proposed by ChatGPT were how I wanted TypeScript to work, not how it really works.
I have not tried adding "step by step" or anything similar, but probably even then I will be safer with assumption that results will be unevenly factually accurate.