Generally, ChatGPT seems able to understand how KM works. It's able to describe the actions needed and how to configure them. It usually offers to download a KM macro for import but their macros are not recognized by KM.
Is there a safe way to edit these files downloaded from ChatGPT to make them recognizable by KM?
Rebuild it yourself in the Editor, using the suggested actions and checking the Wiki for anything you aren't 100% sure of. If nothing else that's a very good way to get yourself to the point where you're way better at writing KM macros than the LLM!
I find that LLMs generally aren't very good at knowing the specifics of many KM actions, and the knowledge between different LLMs of KM varies significantly. The chances of ChatGPT and the like producing working XML to copy and paste as macros are slim to none unless it's very simple. There simply isn't enough training data they're using in comparison to more traditional coding languages.
Your best bet is to either:
Ask for the macro as a list of follow-along instructions you use while producing it in KM (you'll realise quickly which actions it doesn't fully understand pretty quickly)
Or, provide the XML of actions you'll need, and a couple of working macros as XML alongside your instructions to give it better context of how macros are structured.
To my knowledge, no one has developed an instructions file to plug into LLMs to give them working knowledge of each KM action and how to construct macros only using XML. That might be a worthwhile community GitHub project to set up.
The results surprised us: Developers thought they were 20% faster with AI tools, but they were actually 19% slower when they had access to AI than when they didn't.
Such was the novelty of plausible-looking machine-generated text and images that we've probably all been drinking a bit of the kool-aid on this one ...