Github Copilot · Free Practice Question Medium

Question 19

You are using GitHub Copilot to write a Python script and notice frequent, repetitive suggestions for tasks like loops or error handling. You wonder how the prevalence of common examples in the model's training data influences these suggestions. How does the frequency of "most seen examples" impact the suggestions you get?

  • A

    GitHub Copilot avoids suggesting frequently seen code patterns in favor of more creative, unique solutions tailored to each specific use case.

  • B

    The most seen examples in the training data help GitHub Copilot suggest more accurate and highly customized solutions based on the specific needs of your project.

  • C

    The most common patterns seen in the training data increase the likelihood that GitHub Copilot will suggest generic, repetitive solutions even when more tailored solutions would be better.

  • D

    GitHub Copilot is designed to ignore common examples and focus on uncommon or novel patterns in its suggestions to encourage diversity and innovation in code.

Reveal correct answer

Correct answer: C

A.

GitHub Copilot does not avoid frequently seen code patterns. In fact, it is more likely to suggest such patterns because its model relies on seeing these examples during training, especially for common programming tasks.

B.

While frequent patterns help GitHub Copilot make suggestions, it doesn’t guarantee that these will be highly customized to your specific project. Common suggestions can be generic and may not always be the best fit for the problem you’re solving.

C.

GitHub Copilot often generates suggestions based on the most common patterns it has seen in its training data, which can result in repetitive, generic solutions for common tasks. This is one of the limitations of using an LLM trained on a large corpus of code: it tends to favor commonly seen examples over potentially more innovative or context-specific solutions.

D.

GitHub Copilot does not deliberately ignore common examples. On the contrary, it is trained on large amounts of data, and frequent patterns can often influence its suggestions, leading to less diversity in the code it suggests for common problems.

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