GH-300 Sample Questions & Answers
Copilot's SKUs, pricing and core features get the most attention, alongside privacy configuration and context exclusions, how it processes and trains on data, common development scenarios, crafting effective prompts, test generation, and AI ethics.
Launch the full GH-300 simulator →Showing 10 of 20 free samples.
- Question 1Intermediate
GitHub Copilot Plans and Features · Differentiate between Copilot Business and Enterprise plans
An organization is evaluating GitHub Copilot plans. Their primary requirements are: centralized policy management, audit logs for user activity, and the ability to prevent suggestions that match public code. Which plan is the minimum required to meet all these needs?
Show answer & explanation
Correct answer: B
GitHub Copilot Business is the first tier that introduces organization-level features such as centralized policy management, audit logs, and the filter to block suggestions matching public code. The Individual plan lacks all of these. Copilot Enterprise offers more advanced features like content exclusions and personalized models but is not the minimum required for the stated needs.
- Question 2Advanced
Responsible AI · Handle suggestions matching public code responsibly
A developer working on an open-source project receives a multi-line code suggestion from GitHub Copilot that seems vaguely familiar. What is the most responsible first step for the developer to take to mitigate potential licensing or attribution issues?
Show answer & explanation
Correct answer: B
Many IDE extensions for GitHub Copilot have a feature that shows references for suggestions matching public code, including the source repository and its license. This is the most direct and responsible first step to determine if the code requires attribution or has an incompatible license. Simply accepting the code or rejecting it without investigation avoids the core issue of responsible use.
- Question 3Advanced
Privacy Fundamentals and Context Exclusions · Configure content exclusions using file paths
A hospital is developing patient management software and wants to use GitHub Copilot. To comply with HIPAA, they must prevent any files containing Protected Health Information (PHI) from being processed by Copilot. The PHI is stored in files ending with
.phi.json. Which configuration in the organization settings would achieve this?# Correct YAML configuration snippet for content exclusionShow answer & explanation
Correct answer: C
The correct syntax for specifying content exclusions in the organization's Copilot settings involves using the
content_exclusionkey. The value is a list of glob patterns. The pattern'**/*.phi.json'correctly targets all files ending with.phi.jsonin any directory within the repositories. - Question 4Beginner
GitHub Copilot Plans and Features · Use the GitHub Copilot CLI for shell commands
A developer is using the GitHub Copilot CLI to get suggestions for a shell command. They want to create a new Git branch, but they are unsure of the exact command syntax. Which of the following Copilot CLI commands should they use?
Show answer & explanation
Correct answer: A
The GitHub Copilot CLI uses
??as the alias to ask for a suggestion for a shell command. The user types??followed by a natural language description of the command they need.gh copilot suggestis another valid command, but??is the most common and direct alias for this purpose. - Question 5Intermediate
How GitHub Copilot Works and Handles Data · Understand the concept of tokens in language models
When GitHub Copilot processes a prompt, what is the fundamental unit of text that the underlying language model operates on?
Show answer & explanation
Correct answer: A
Large language models (LLMs) like the one powering GitHub Copilot do not process text as raw words or characters. They break down the input into 'tokens,' which can be words, parts of words, or punctuation. The model's context window and processing limits are all measured in tokens. Understanding this is fundamental to how Copilot processes data.
- Question 6Intermediate
Testing with GitHub Copilot · Prompt engineering for edge case testing
A team is using GitHub Copilot to generate unit tests. For a specific function, Copilot consistently fails to generate tests for a critical edge case involving null input. What is the most effective way to prompt Copilot to generate the missing test case?
Show answer & explanation
Correct answer: B
This is a form of prompt engineering known as providing an example or 'few-shot' prompting. By starting the specific test case you want (
test_function_with_null_input), you provide strong context and guide Copilot to complete that specific scenario, overcoming its initial blind spot. General comments are less effective than providing a concrete starting point. - Question 7Intermediate
Responsible AI · Understand the principle of Accountability for AI systems
Which of the following describes the ethical AI principle of 'Accountability' in the context of using GitHub Copilot?
Show answer & explanation
Correct answer: A
The principle of Accountability in AI means that humans are ultimately responsible for the systems they build and use. When using GitHub Copilot, the developer acts as the 'human-in-the-loop' and is accountable for the final code. They must review, understand, test, and secure any suggestions before incorporating them into their work. The AI is a tool, not the final authority.
- Question 8Advanced
GitHub Copilot Plans and Features · Apply Copilot Business features to a real-world scenario
Case Study:
A mid-sized e-commerce company, 'StyleSphere', is migrating its monolithic backend to a microservices architecture. They have subscribed to GitHub Copilot Business for their 50 developers to accelerate the transition. The CTO has established several key objectives and constraints for the project.
Current Situation: The existing codebase is a large, legacy PHP application. The new microservices are being written in Python and Go. Developers are skilled in their respective languages but are new to the specific frameworks and libraries being used. The company uses GitHub Enterprise Cloud for source control.
Requirements:
- Maximize developer productivity during the migration.
- Ensure all new code adheres to strict internal coding standards.
- Prevent any legacy PHP code or customer data from being used as context by Copilot.
- Enable senior developers to review Copilot usage patterns to identify training opportunities.
Constraints:
- The company cannot afford the upgrade to GitHub Copilot Enterprise at this time.
- No custom fine-tuning of the AI model is possible.
Which combination of actions should the StyleSphere administrators take to best meet their requirements with GitHub Copilot Business?
Show answer & explanation
Correct answer: D
This solution correctly uses the features available in GitHub Copilot Business. While Copilot Business does not have the granular content exclusion of Enterprise, it does allow policies to enable/disable Copilot for specific repositories. This addresses requirement #3. The public code filter is a standard Business feature. The audit log in GitHub Enterprise Cloud can be used to track Copilot usage (e.g., seat assignments and policy changes), addressing requirement #4. Using Copilot to suggest code that adheres to standards (aided by linters) addresses requirements #1 and #2.
- Question 9Intermediate
How GitHub Copilot Works and Handles Data · Understand how context size affects Copilot performance
A developer is using GitHub Copilot in VS Code and notices that suggestions are slow to appear and sometimes irrelevant. They are working in a large monorepo with many unrelated projects. What is the most likely reason for the poor performance and relevance of Copilot suggestions?
Show answer & explanation
Correct answer: D
GitHub Copilot gathers context from open tabs and relevant files within the workspace. In a large monorepo, it may try to process an excessive amount of information, much of it irrelevant to the current task. This can lead to a large context payload being sent, causing slower response times and diluted, less relevant suggestions. Limiting the workspace to only the relevant project folder would likely improve performance.
- Question 10IntermediateSelect 3
Developer Use Cases for AI · Understand context sources for Copilot Chat
Which three of the following are valid context sources that GitHub Copilot Chat can use when the
@workspacecommand is invoked? (Select THREE)Show answer & explanation
Correct answers: A, D, F
Ready for the real thing?
The full GH-300 simulator has every exam-style question, timed mode, and instant scoring.