human
what are the risks of using AI to create code for a professional programmer
gpt
One can identify multiple risks with AI code generation or completion:
- Lack of learning: if an AI writes the code for you, you will often not learn as much.
- Lack of reviewing: a code might work but have bugs or security issues. Sometimes, programmers are lazy and do not review the code written by the AI
- Security issues: because AI is trained on human code data, it can reproduce security issues that are often made by humans.
- Intellectual Property issues: AI can sometime copy parts of code they have been trained on. This can lead to IP issues.
human
Seems like only the Intellectual Property issue remains a problem if you review the code before using it.
gpt
To address the remaining intellectual property issue, the AI model would need to be trained in a way that reduces the risk of model memorisation, a behaviour of the AI that simply copies answers from its learning data rather than generating unique answers. This can be achieved with techniques such as regularization, early stopping, and cross-validation. Alternatively, an algorithm that compares the input code with original codes in its database could be used.