Github Copilot · Free Practice Question Medium

Question 8

You are contributing to an open-source healthcare software project and using GitHub Copilot to speed up your work. However, some generated code resembles code from other projects. Aware that Copilot is trained on publicly available repositories, you're unsure about the ethical implications of using AI-generated code that may resemble copyrighted code. Which action aligns with ethical AI usage?

  • A

    Avoid using any AI-generated code in open-source contributions to prevent potential copyright violations, as there is no guarantee that Copilot’s suggestions are not copyrighted.

  • B

    Modify the Copilot-suggested code to make it less recognizable, assuming this will mitigate any potential copyright concerns.

  • C

    Use the generated code without worrying, as all suggestions made by Copilot are considered open-source due to the nature of its training data.

  • D

    Compare the AI-generated code with existing open-source licenses to ensure it aligns with the project's licensing requirements before incorporating it.

Reveal correct answer

Correct answer: D

A.

While it’s important to be cautious, avoiding AI-generated code entirely is unnecessary. Ethical AI usage requires critical thinking and review, not a blanket rejection of its suggestions. Proper review of licenses and code ensures that ethical and legal standards are met.

B.

Modifying code to make it less recognizable is not an ethical approach. Ethical AI usage involves ensuring that any AI-generated code is compliant with legal and licensing requirements, not trying to disguise potential copyright issues by altering the code slightly.

C.

While Copilot is trained on publicly available repositories, this does not automatically mean that all its suggestions are safe to use without consideration of licensing. Some public repositories may have restrictive licenses, and blindly assuming that all AI-generated code is open-source can lead to copyright infringement.

D.

This is the correct answer because it is important to ensure that any code, whether AI-generated or manually written, complies with the licensing terms of the open-source project. Copilot’s suggestions may include snippets that resemble code from repositories with different licenses, so it’s essential to compare AI-generated code with existing licenses to ensure compliance. This approach respects the original authors' rights while ensuring that your contributions remain ethical and legally sound.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need