Late last year, a team at Stanford University posted a research paper that looked at how using a code-generating AI assistant they built affects the quality of code that people produce. The researchers found that programmers getting AI suggestions tended to include more bugs in their final code-yet those with access to the tool tended to believe that their code was more secure. To its credit, GitHub is researching the question of how to safely code with AI assistance.

[…]

None of this is to say that generative AI is a bust. There is a growing body of research that shows how generative AI tools can boost the performance and happiness of some workers, such as those who handle customer support calls. Some other studies have also found no increase in security bugs when developers use an AI assistant. And to its credit, GitHub is researching the question of how to safely code with AI assistance.

Source: The huge power and potential danger of AI-generated code

We all have a lot to learn about this