Can't you just... tell it not to make mistakes? :-)

"Write me a function you found on Stack Overflow; make sure you check the comments on that function and ensure you're using their corrections. Also, check the 2nd and 3rd highest, incase the top comment is using the old API and the other comments actually solve the problem I'm asking for. MAKE NO MISTAKES"

i always feel like telling an LLM "make no mistakes" gives me the literary voice of hans gruber with his pistol pointed at that banker. (unfortunately, just like in the film it does not seem to have the intended effect)