I do wonder though whether the methods that the LLM provides are reflective of best practice or whether they are simply what happens to be most written in SO or blog posts.
"Write C++ code that sorts the following inputs"
versus
"Write (version) C++ code that sorts the following inputs, ensure the code is secure and uses best practices"
And you'll likely get a different answer.
My default assumption now, after watching dozens of post mortems, is that beyond a certain scale, nobody understands the code in prod. (edited added 2nd para)
Why does it always get side tracked into a comparison on how useful it is compared to human capability? Everyone already knows it has issues.
It always descends into a "it won't replace me it's not smart enough" or a "AI will only help me do my job better" direction. Guys, keep your emotions out of discussions. The only way of dealing with AI is to discuss the ramifications and future projections impartially.
Before you go on and write such a system it's better to test if the LLM can do debugging to an efficacy level that we require. I don't think anyone has tried this yet and we do know LLMs have certain issues.
But make no mistake, the possibility that an LLM knows how to debug programs is quite high.