From experience listening to a coworker who has used AI a lot. You really need to tell it everything it has to do, slowly. It will try repeatedly to do something you didn't ask it to, and you will need to tell it repeatedly to undo it, and to not make up solutions to problems that aren't there.
I think a lot of people make the mistake of telling it something like "I need to make a program that can do z, x and y". The ai will then fill in whatever gaps you didn't mention between z, x and y, without asking, just guessing.