Github Copilot · Free Practice Question Medium

Question 3

You are using GitHub Copilot for JavaScript development and notice varying accuracy in its suggestions. You wonder how Copilot processes data, why some suggestions are inaccurate, and whether it learns from your code over time. Which statement correctly explains Copilot’s data handling and limitations?

  • A

    GitHub Copilot can suggest code based on patterns in your current file, but it does not access or analyze any code outside of your current project.

  • B

    Copilot continuously learns from the code you write and adjusts its suggestions accordingly for future interactions.

  • C

    Copilot generates suggestions based on a large language model trained on public code repositories, but it does not always understand project-specific context or dependencies.

  • D

    Copilot is limited to providing suggestions only in popular programming languages and does not support lesser-known or niche languages.

Reveal correct answer

Correct answer: C

A.

This is incorrect because while Copilot does suggest code based on the context of the current file, its suggestions are powered by a model trained on large datasets that include public code from various projects and repositories, not just your current project. However, Copilot cannot access private repositories unless explicitly given access, and it doesn’t analyze dependencies or external libraries unless they are part of the visible code context.

B.

Copilot does not learn from the specific code that individual users write. It does not engage in active learning or adapt based on previous interactions with users. The model is static and was pre-trained on publicly available code repositories. It cannot evolve its suggestions based on your coding style or preferences.

C.

GitHub Copilot is powered by a large language model trained on vast public code repositories. While it can provide useful suggestions, it lacks deep understanding of project-specific context, including code dependencies, libraries, and external configurations. Copilot makes suggestions based on patterns in the code, but it doesn't have an awareness of your project architecture, custom business logic, or specific libraries unless these patterns are explicitly present in the code. This limitation can lead to inaccurate or incomplete suggestions, particularly when code involves complex, project-specific logic.

D.

GitHub Copilot supports a wide variety of programming languages, including many that are considered less popular or niche. While its performance may be better in more widely used languages, such as JavaScript, Python, and Go, it can still provide suggestions in lesser-known languages, though the quality may vary depending on the language's representation in the training data.

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