Microsoft GH-300 Practice Test 30
Question 290
A team needs to evaluate a Copilot suggestion that relies on an unseen type, matches potentially old public code, and includes a claim about agent exclusions. Which THREE checks are justified? (Select THREE.)
- Consult per-mode content-exclusion support and the agent's tool permissions.
- Claim successful compilation without executing any build command.
- Assume every Copilot agent is constrained by inline-suggestion exclusions.
- Review match provenance and current library licensing independently.
- Inspect the actual type declaration and the interfaces it exposes.
- Treat generated code as automatically free of all licensing obligations.
Explanation
Correct Answers
A:Exclusion enforcement depends on surface and can omit third-party tools.
D:Matching indexes may be stale or incomplete.
E:Grounded types prevent invented signatures.
Incorrect Answers
B:Generated code is not execution evidence.
C:Agent and Edit modes have separate documented limitations.
F:AI authorship does not erase third-party rights.
Question 291
A developer asks Copilot to "improve this parser" and receives a cosmetic rewrite. How should they specify the task?
- State the exact machine-readable output schema and valid example.
- Require preservation of the published API and backward compatibility tests.
- Define stable sort keys, page size, and cursor behavior in the request.
- State the desired valid formats, failure behavior, and testable acceptance criteria.
Explanation
Correct Answer
D:Observable behavior is a stronger target than an undefined quality adjective.
Incorrect Answers
A:Format requirements should be present in the prompt, not inferred afterwards. Observable behavior is a stronger target than an undefined quality adjective.
B:Explicit compatibility criteria reduce accidental interface changes. observable behavior is a stronger target than an undefined quality adjective.
C:Deterministic pagination requires an unambiguous ordering contract. observable behavior is a stronger target than an undefined quality adjective.
Question 292
A generated handler works but violates the service's response-time requirement. What belongs in the prompt?
- State the exact machine-readable output schema and valid example.
- Require preservation of the published API and backward compatibility tests.
- Include the latency budget and representative workload size as explicit constraints.
- State the desired valid formats, failure behavior, and testable acceptance criteria.
Explanation
Correct Answer
C:Performance requirements affect algorithm and caching choices.
Incorrect Answers
A:Format requirements should be present in the prompt, not inferred afterwards. Performance requirements affect algorithm and caching choices.
B:Explicit compatibility criteria reduce accidental interface changes. performance requirements affect algorithm and caching choices.
D:Observable behavior is a stronger target than an undefined quality adjective. What belongs in the prompt. Performance requirements affect algorithm and caching choices.
Question 293
A feature request asks for pagination but leaves ordering unspecified. How should it be clarified?
- State the desired valid formats, failure behavior, and testable acceptance criteria.
- Define stable sort keys, page size, and cursor behavior in the request.
- Include the latency budget and representative workload size as explicit constraints.
- Require preservation of the published API and backward compatibility tests.
Explanation
Correct Answer
B:Deterministic pagination requires an unambiguous ordering contract.
Incorrect Answers
A:Observable behavior is a stronger target than an undefined quality adjective. How should it be clarified. Deterministic pagination requires an unambiguous ordering contract.
C:Performance requirements affect algorithm and caching choices. deterministic pagination requires an unambiguous ordering contract.
D:Explicit compatibility criteria reduce accidental interface changes. deterministic pagination requires an unambiguous ordering contract.
Question 294
A coding assistant outputs CSV while an API consumer requires JSON. What should the author change?
- State the exact machine-readable output schema and valid example.
- Define stable sort keys, page size, and cursor behavior in the request.
- State the desired valid formats, failure behavior, and testable acceptance criteria.
- Include the latency budget and representative workload size as explicit constraints.
Explanation
Correct Answer
A:Format requirements should be present in the prompt, not inferred afterwards.
Incorrect Answers
B:Deterministic pagination requires an unambiguous ordering contract. Format requirements should be present in the prompt, not inferred afterwards.
C:Observable behavior is a stronger target than an undefined quality adjective. What should the author change. Format requirements should be present in the prompt, not inferred afterwards.
D:Performance requirements affect algorithm and caching choices. format requirements should be present in the prompt, not inferred afterwards.
Question 295
Copilot writes a paginated API that returns inconsistent records and an unsupported JSON shape. Which TWO prompt additions directly clarify acceptance? (Select TWO.)
- Ask for 'better code' without specifying expected behavior.
- Trust the first response because it seems professionally formatted.
- Remove compatibility requirements from the API request.
- Define stable sorting, page boundaries, and cursor semantics.
- Provide a precise JSON response schema with an example.
Explanation
Correct Answers
D:Pagination requires deterministic ordering and boundary behavior.
E:Machine-readable output must follow an explicit consumer contract.
Incorrect Answers
A:An undefined goal cannot establish testable success.
B:Presentation quality is not interface correctness.
C:Unstated compatibility increases regression risk.
Question 296
Copilot suggests the wrong module for a fix because the prompt names only a function. What helps?
- Provide the helper signature and request its use under explicit retry conditions.
- Include workspace manifests and the affected package's documented scripts.
- Supply the path, actual function body, and important callers.
- Include the relevant branch, failing test, and neighboring assumptions, not unrelated files.
Explanation
Correct Answer
C:Concrete code context disambiguates duplicate names and behavior.
Incorrect Answers
A:Supplying the intended primitive prevents a parallel implementation. Concrete code context disambiguates duplicate names and behavior.
B:Build procedures depend on the actual repository layout. concrete code context disambiguates duplicate names and behavior.
D:Targeted context improves relevance under token constraints. What helps. Concrete code context disambiguates duplicate names and behavior.
Question 297
A project uses a custom repository error class but Copilot creates a new exception type. What context was missing?
- Include workspace manifests and the affected package's documented scripts.
- Include the relevant branch, failing test, and neighboring assumptions, not unrelated files.
- Show the existing error type and representative usage pattern.
- Supply the path, actual function body, and important callers.
Explanation
Correct Answer
C:Local conventions matter to generated integration code.
Incorrect Answers
A:Build procedures depend on the actual repository layout. local conventions matter to generated integration code.
B:Targeted context improves relevance under token constraints. What context was missing. Local conventions matter to generated integration code.
D:Concrete code context disambiguates duplicate names and behavior. local conventions matter to generated integration code.
Question 298
An API wrapper must use the repo's retry helper. What prompt structure fits?
- Include the relevant branch, failing test, and neighboring assumptions, not unrelated files.
- Supply the path, actual function body, and important callers.
- Provide the helper signature and request its use under explicit retry conditions.
- Show the existing error type and representative usage pattern.
Explanation
Correct Answer
C:Supplying the intended primitive prevents a parallel implementation.
Incorrect Answers
A:Targeted context improves relevance under token constraints. What prompt structure fits. Supplying the intended primitive prevents a parallel implementation.
B:Concrete code context disambiguates duplicate names and behavior. supplying the intended primitive prevents a parallel implementation.
D:Local conventions matter to generated integration code. Supplying the intended primitive prevents a parallel implementation.
Question 299
A model recommends the wrong build command for a monorepo. What should be attached?
- Provide the helper signature and request its use under explicit retry conditions.
- Include workspace manifests and the affected package's documented scripts.
- Supply the path, actual function body, and important callers.
- Show the existing error type and representative usage pattern.
Explanation
Correct Answer
B:Build procedures depend on the actual repository layout.
Incorrect Answers
A:Supplying the intended primitive prevents a parallel implementation. build procedures depend on the actual repository layout.
C:Concrete code context disambiguates duplicate names and behavior. build procedures depend on the actual repository layout.
D:Local conventions matter to generated integration code. Build procedures depend on the actual repository layout.
Question 300
A large file contains one failing branch that matters. How should the user focus Copilot?
- Show the existing error type and representative usage pattern.
- Include workspace manifests and the affected package's documented scripts.
- Include the relevant branch, failing test, and neighboring assumptions, not unrelated files.
- Provide the helper signature and request its use under explicit retry conditions.
Explanation
Correct Answer
C:Targeted context improves relevance under token constraints.
Incorrect Answers
A:Local conventions matter to generated integration code. Targeted context improves relevance under token constraints.
B:Build procedures depend on the actual repository layout. How should the user focus Copilot. Targeted context improves relevance under token constraints.
D:Supplying the intended primitive prevents a parallel implementation. targeted context improves relevance under token constraints.