Github Copilot · Free Practice Question Medium

Question 6

You are using GitHub Copilot to assist with writing Python code for a new machine learning project. Which of the following is a limitation of GitHub Copilot (and large language models in general) when generating code suggestions?

  • A

    GitHub Copilot can generate syntactically correct code, but it may not always understand the context or deliver logically correct solutions for your specific problem.

  • B

    GitHub Copilot can only generate code in a few popular languages and cannot handle niche programming languages or frameworks.

  • C

    GitHub Copilot is unable to generate code for low-level programming languages like C and assembly because it is trained only on high-level languages like Python and JavaScript.

  • D

    GitHub Copilot always provides bug-free and optimized code since it is trained on high-quality open-source data.

Reveal correct answer

Correct answer: A

A.

While Copilot can generate syntactically correct code, it doesn’t always understand the specific context or requirements of the problem you're solving. The model is not capable of reasoning like a human developer and may suggest solutions that are logically incorrect or inefficient for your use case. This limitation is common in all large language models (LLMs), as they generate responses based on patterns rather than deep understanding.

B.

GitHub Copilot supports a wide range of programming languages and frameworks, including less common ones. While it may be more effective in popular languages due to the size of the training data, it is not limited only to those languages. This is a common misconception, but Copilot is quite versatile in terms of language support.

C.

GitHub Copilot can generate code for various programming languages, including low-level languages like C. It was trained on diverse datasets that include multiple languages, so it is not limited to high-level languages like Python and JavaScript.

D.

GitHub Copilot does not guarantee bug-free or optimized code. The model generates suggestions based on patterns found in the data it was trained on, which includes both good and bad examples. Developers still need to review and test the generated code to ensure correctness, efficiency, and security.

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