GH-300 domain - 14% of the exam

Improve developer productivity with GitHub Copilot

Improve developer productivity with GitHub Copilot is 14% of the GH-300 exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

36
Practice questions
3
Objectives
10
Easy
26
Medium

Where people go wrong

  • Treating a passing signal as verified Copilot output

    The wrong answers accept a signal that looks like verification: a first-run pass, a quick smoke test, a clean build, or the fact that the request asked for behaviour to be kept. A first-run pass can mirror the function's present output, including a bug. A smoke test covers a happy path, and compilation proves only valid syntax. Copilot does not guarantee behaviour preservation, so the developer stays accountable and confirms correctness through review and tests.

    See it in a sample question
  • Using inline completions where an answer is needed

    The wrong answers pick inline completions for jobs that need an explanation or a conversation. Inline completions propose code at the cursor, so they cannot interpret a stack trace, describe a regular expression, explain an unfamiliar exception, or discuss which test scenarios a draft missed. Those jobs belong to Copilot Chat, which answers inside the editor with the selected code as context and keeps the developer in the current file.

    See it in a sample question
  • Using code review outside a pull request diff

    Copilot code review is offered for work that happens before or outside a pull request. It comments on an existing diff after authoring, so it cannot draft a test file, drive an iterative fix loop, or answer a question about a method open in the editor. Those jobs go to Copilot Chat or Agent Mode, while code review suits a pull request diff that has already been written.

    See it in a sample question
  • Swapping the terminal CLI and editor Chat

    The terminal and editor surfaces get swapped. GitHub Copilot CLI suggests and explains shell commands in the terminal, and it does not explain a source module, a regular expression, or a performance problem in an open file. Chat in the editor handles those, but it does not run in the terminal, so asking it for command flags still means switching panes. The surface must match where the developer is working.

    See it in a sample question

Objectives in this domain

What to study

The official documents this domain's practice questions cite most.

Sample questions from this domain

Free sampleImprove developer productivity with GitHub Copilotmedium

Copilot Chat reviews a data-access method and suggests replacing string-concatenated SQL with a parameterised query to address an injection risk. The change passes the developer's quick local smoke test. What is the most responsible next step before shipping this security improvement?

  • AShip immediately, treating the passing smoke test as confirmation that the parameterised query is correct and that the injection risk has been fully eliminated by Copilot.
  • BEnable Copilot duplication detection for the repository, relying on it to confirm the parameterised query is safe because the snippet does not match any public code.
  • CMove the team to Copilot Business, expecting that the Business plan validates each suggested security fix before it is shown so the rewrite needs no further checking.
  • DReview the parameterised query and run it through the team's security checks, since the developer who merges the change stays accountable for confirming it is secure. Correct
Verify a Copilot security rewrite with human review and the team's security checks, because the merging developer stays accountable. Copilot can suggest a sound security improvement such as a parameterised query, but it does not prove the result is safe, so the accountable developer must review it and apply the team's security checks, which a smoke test, duplication detection, or a plan change do not provide.

Why A is wrong: A smoke test exercises a happy path and is tempting to trust, but it does not prove the rewrite is secure, so shipping on it alone leaves the change unverified.

Why B is wrong: Duplication detection blocks suggestions matching public code based on similarity, not security, so it cannot confirm the parameterised query closes the injection risk.

Why C is wrong: Copilot Business adds organisation and policy controls but does not validate the security of individual suggestions, so a plan change does not remove the need to verify the fix.

Why D is correct: Copilot can propose the safer pattern, but the developer remains accountable, so reviewing the query and applying the team's security checks is what confirms the improvement before shipping.

Free sampleImprove developer productivity with GitHub Copilotmedium

A developer hits an unfamiliar runtime exception with a long stack trace and would normally paste it into a search engine and read several forum threads. They want to understand the cause faster and stay in their editor. How can Copilot Chat best accelerate diagnosing this error?

  • AAdd the failing file to content exclusions, on the basis that removing it from Copilot's context forces Copilot to recalculate the cause of the exception cleanly.
  • BAccept the next inline ghost-text completion in the failing method, trusting that the suggested code will resolve the exception and so reveal what originally caused it.
  • CPaste the stack trace into Copilot Chat and ask what is causing it, so Chat explains the likely cause and next steps in context instead of trawling forum threads. Correct
  • DOpen a Copilot-generated pull request summary for the branch and read it to learn which line raised the exception and why the failure occurred at runtime.
Paste a stack trace into Copilot Chat to get an in-context explanation of the likely cause and speed up diagnosis. Copilot Chat can read a pasted stack trace and explain the likely cause and next steps in context, so a developer diagnoses an unfamiliar error faster and without leaving the editor, unlike inline completions, a PR summary, or content exclusions.

Why A is wrong: Content exclusions stop a file being used as context and have nothing to do with diagnosing an error, so excluding the file does not explain the exception.

Why B is wrong: Inline completions propose code as you type but do not interpret a stack trace, so they cannot explain why the exception is being thrown.

Why C is correct: Copilot Chat can interpret a pasted stack trace and suggest likely causes and fixes in context, so the developer understands the error faster than searching forum threads by hand.

Why D is wrong: A pull request summary describes the intent of a change rather than analysing a runtime error, so it will not diagnose the cause of the exception.

Free sampleImprove developer productivity with GitHub Copilotmedium

A developer has an open payment module in the editor and wants Copilot to draft a unit test suite for a single pure function, then talk through which scenarios the draft missed before committing. Which GitHub Copilot surface is most appropriate for that conversational test-generation work?

  • AInline ghost-text completions, accepting the suggested test body that appears as greyed code beneath the cursor without any back-and-forth about missed scenarios.
  • BGitHub Copilot CLI, running a terminal command that explains an existing shell pipeline so the developer understands how the payment module is invoked at runtime.
  • CCopilot Chat, asking it to generate the test suite for the function and then prompting it to review which edge cases the first draft left untested. Correct
  • DCopilot code review on a pull request, leaving automated comments on the diff after the tests are written rather than helping draft and discuss them beforehand.
Choose Copilot Chat when generating tests and then conversing about missed scenarios, since it supports the iterative dialogue inline completions lack. Copilot Chat is the conversational surface, so a developer can ask it to generate a unit test suite and then follow up to identify untested edge cases, which inline ghost-text, the terminal-focused CLI, and after-the-fact pull request review cannot provide.

Why A is wrong: Inline completions offer single in-place suggestions and no dialogue, so they cannot discuss which scenarios were missed, which is the conversational need stated in the stem.

Why B is wrong: The CLI focuses on command-line explanation and suggestion in the terminal, not on drafting and discussing in-editor unit tests for a function, so it does not fit the task.

Why C is correct: Copilot Chat supports an iterative conversation about generated tests, so the developer can request a suite and then probe for missed scenarios, matching the stated need exactly.

Why D is wrong: Copilot code review acts on an existing diff in a pull request, so it arrives after authoring and cannot drive the upfront conversational drafting the developer wants.

Free sampleImprove developer productivity with GitHub Copilotmedium

A developer joins a project and must work in a dense module written by someone who has left the team, but they do not understand what the code does or why. They want to get up to speed quickly without pulling a busy colleague away. How can Copilot Chat best accelerate this learning?

  • AAccept inline ghost-text completions throughout the module, trusting that the suggestions Copilot offers will gradually teach the developer how the existing logic behaves.
  • BOpen Copilot code review on the file so the review comments describe each line, giving the developer a guided explanation of the module's existing behaviour.
  • CSelect the unfamiliar code and ask Copilot Chat to explain what it does and why, so the developer learns the module in context instead of waiting on a colleague. Correct
  • DRun GitHub Copilot CLI against the file in the terminal so it prints a summary, then read that output instead of asking about the code in the editor.
Ask Copilot Chat to explain unfamiliar code so a developer can learn a module quickly without interrupting colleagues. Copilot Chat can take a selected block of code and explain what it does and why in context, which lets a developer ramp up on unfamiliar code from the code itself, something inline completions, Copilot code review, or the CLI are not designed to do.

Why A is wrong: Inline completions propose new code as you type rather than explaining existing logic, so they do not build the understanding of the module the developer needs.

Why B is wrong: Copilot code review flags issues in proposed changes rather than teaching how existing code works, so it is the wrong surface for understanding an unfamiliar module.

Why C is correct: Copilot Chat can explain a selected block in plain language, so the developer builds understanding directly from the code and accelerates their learning without interrupting anyone.

Why D is wrong: GitHub Copilot CLI is built for command-line tasks, not for explaining a source module in the editor, so it is a poor fit for learning the code in place.

Other domains in this exam

See also the GH-300 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by GitHub. Original, blueprint-aligned practice material only.