Github Copilot · Free Practice Question Medium

Question 31

A backend developer working on a large microservices project finds that GitHub Copilot Chat is struggling to generate accurate suggestions due to the complexity of the codebase. What is the best approach to improve Copilot Chat’s efficiency?

  • A

    Increase the available memory and CPU of the development machine to improve Copilot Chat’s processing power.

  • B

    Manually copy-paste relevant code into Copilot Chat before asking questions.

  • C

    Use inline comments and docstrings to help Copilot Chat understand the function and intent of the code.

  • D

    Split the codebase into smaller repositories so Copilot Chat doesn’t process too much code at once.

Reveal correct answer

Correct answer: C

A.

Copilot Chat runs on cloud-based AI models, meaning that local machine performance does not directly impact Copilot Chat’s speed.

B.

While manually pasting small code snippets may help in specific cases, it is not the most efficient approach. Copilot already processes open files, and excessive pasting can clutter prompts and slow down responses.

C.

Copilot Chat relies on context to generate meaningful responses. Adding clear inline comments and structured docstrings enhances Copilot’s ability to interpret the purpose of functions and classes, leading to better and more relevant completions.

D.

Copilot Chat does not process the entire repository, only the open files and recent interactions. Splitting the repository would not affect its suggestion quality.

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