So, the first thing I learnt with Chatgpt is we need to be very clear and specific about what we desire. It does not (yet) automatically provide the best code but I am sure this could change soon enough.