I asked for examples of how the algorithm worked. I asked for examples of how to call the code. I asked for a happy-path unit test and a simple error-handling unit test. I asked it to rewrite something as a pure function. I pointed out an obvious race condition and told it to guard against that issue. I asked it to rewrite a function in the style of this other function. I told it to separate one function into two separate functions that handle the first step and the second step separately.
Etc etc.
If you don't understand it, ask for more or better comments, or better variable names, or cut down the scope into a smaller section, or more examples.
Edit: also I almost entirely leave the LLM in read only mode... I tell it to make the smallest change possible, and tell it I will only copy paste it in its proposed change when I understand the change and where it needs to be made. That way it's my hands on the keyboard, interacting with the code by making recommended changes... 80% of the code is touched by me (via copy-paste) most-of-the-way before I will 'git commit'.
Sure, there was one recursive folder descent function that found the most recent file modification time that I didn't fully understand, but it's self-contained in a function, I don't care to learn every corner of file modification times, and it appears to work, so I left it as is for my static site generator.