When I have use cases similar to this one (similar in complexity), I'll pair program with it. If the code fails, I'll tell it what error I got and ask it to refactor. If the explanation it gives with the code shows it didn't understand the question, I'll guide it along the correct track.
It's not perfect at "zero-shot" answers but from my experience is very good when you work with it conversationally.
It's not perfect at "zero-shot" answers but from my experience is very good when you work with it conversationally.