Microsoft GH-300 Practice Test 31
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.
Question 301
A developer wants a common utility with clear requirements and no preferred examples. Which prompting approach can start?
- Replace the identifier with synthetic representative data.
- Align examples and written instructions before retrying.
- Use a direct zero-shot task description with explicit success conditions.
- Include valid and invalid sample records with correct expected outputs.
Explanation
Correct Answer
C:A well-specified request can be attempted without example demonstrations.
Incorrect Answers
A:Examples should demonstrate structure without leaking personal information. Which prompting approach can start. A well-specified request can be attempted without example demonstrations.
B:Conflicting supervision makes the intended behavior ambiguous. a well-specified request can be attempted without example demonstrations.
D:Examples teach both accepted forms and boundaries. a well-specified request can be attempted without example demonstrations.
Question 302
A project has a house style for converting log records into issue summaries. What helps enforce it?
- Provide a few representative input-output examples of the desired style.
- Replace the identifier with synthetic representative data.
- Align examples and written instructions before retrying.
- Use a direct zero-shot task description with explicit success conditions.
Explanation
Correct Answer
A:Few-shot demonstrations make the expected transformation pattern concrete.
Incorrect Answers
B:Examples should demonstrate structure without leaking personal information. What helps enforce it. Few-shot demonstrations make the expected transformation pattern concrete.
C:Conflicting supervision makes the intended behavior ambiguous. few-shot demonstrations make the expected transformation pattern concrete.
D:A well-specified request can be attempted without example demonstrations. Few-shot demonstrations make the expected transformation pattern concrete.
Question 303
An AI response misformats a niche serialization format repeatedly. What should the user add?
- Provide a few representative input-output examples of the desired style.
- Align examples and written instructions before retrying.
- Include valid and invalid sample records with correct expected outputs.
- Use a direct zero-shot task description with explicit success conditions.
Explanation
Correct Answer
C:Examples teach both accepted forms and boundaries.
Incorrect Answers
A:Few-shot demonstrations make the expected transformation pattern concrete. examples teach both accepted forms and boundaries.
B:Conflicting supervision makes the intended behavior ambiguous. examples teach both accepted forms and boundaries.
D:A well-specified request can be attempted without example demonstrations. Examples teach both accepted forms and boundaries.
Question 304
A prompt example exposes a real customer ID. What should be done before few-shot use?
- Replace the identifier with synthetic representative data.
- Use a direct zero-shot task description with explicit success conditions.
- Provide a few representative input-output examples of the desired style.
- Include valid and invalid sample records with correct expected outputs.
Explanation
Correct Answer
A:Examples should demonstrate structure without leaking personal information.
Incorrect Answers
B:A well-specified request can be attempted without example demonstrations. Examples should demonstrate structure without leaking personal information.
C:Few-shot demonstrations make the expected transformation pattern concrete. examples should demonstrate structure without leaking personal information.
D:Examples teach both accepted forms and boundaries. What should be done before few-shot use. Examples should demonstrate structure without leaking personal information.
Question 305
A provided few-shot example contradicts the stated rule. What should be corrected?
- Include valid and invalid sample records with correct expected outputs.
- Align examples and written instructions before retrying.
- Replace the identifier with synthetic representative data.
- Provide a few representative input-output examples of the desired style.
Explanation
Correct Answer
B:Conflicting supervision makes the intended behavior ambiguous.
Incorrect Answers
A:Examples teach both accepted forms and boundaries. What should be corrected. Conflicting supervision makes the intended behavior ambiguous.
C:Examples should demonstrate structure without leaking personal information. conflicting supervision makes the intended behavior ambiguous.
D:Few-shot demonstrations make the expected transformation pattern concrete. conflicting supervision makes the intended behavior ambiguous.
Question 306
A developer asks for a dependency-free solution but Copilot imports a new package. What should the prompt say?
- Require stable ordering with a defined tie-breaker.
- Explicitly require offline operation with no external network requests.
- Constrain the task to application code and reject schema migrations.
- State that only standard-library and existing declared dependencies are allowed.
Explanation
Correct Answer
D:An explicit dependency boundary narrows acceptable implementations.
Incorrect Answers
A:Determinism must be a testable output property. an explicit dependency boundary narrows acceptable implementations.
B:An unstated environmental limitation is easy for a generator to miss. What should the prompt say. An explicit dependency boundary narrows acceptable implementations.
C:Explicit non-goals protect unrelated layers of the system. An explicit dependency boundary narrows acceptable implementations.
Question 307
A generated API endpoint leaks internal fields in its response. What should be specified?
- State that only standard-library and existing declared dependencies are allowed.
- List the permitted response fields and prohibit exposing secret or internal attributes.
- Constrain the task to application code and reject schema migrations.
- Require stable ordering with a defined tie-breaker.
Explanation
Correct Answer
B:Data minimization belongs in the interface contract.
Incorrect Answers
A:An explicit dependency boundary narrows acceptable implementations. data minimization belongs in the interface contract.
C:Explicit non-goals protect unrelated layers of the system. Data minimization belongs in the interface contract.
D:Determinism must be a testable output property. data minimization belongs in the interface contract.
Question 308
Copilot proposes network calls in a function that must run offline. How should the task be constrained?
- State that only standard-library and existing declared dependencies are allowed.
- List the permitted response fields and prohibit exposing secret or internal attributes.
- Explicitly require offline operation with no external network requests.
- Constrain the task to application code and reject schema migrations.
Explanation
Correct Answer
C:An unstated environmental limitation is easy for a generator to miss.
Incorrect Answers
A:An explicit dependency boundary narrows acceptable implementations. an unstated environmental limitation is easy for a generator to miss.
B:Data minimization belongs in the interface contract. How should the task be constrained. An unstated environmental limitation is easy for a generator to miss.
D:Explicit non-goals protect unrelated layers of the system. An unstated environmental limitation is easy for a generator to miss.
Question 309
A service needs deterministic sorting but Copilot uses random tie breaking. What should be added?
- Explicitly require offline operation with no external network requests.
- List the permitted response fields and prohibit exposing secret or internal attributes.
- Require stable ordering with a defined tie-breaker.
- State that only standard-library and existing declared dependencies are allowed.
Explanation
Correct Answer
C:Determinism must be a testable output property.
Incorrect Answers
A:An unstated environmental limitation is easy for a generator to miss. determinism must be a testable output property.
B:Data minimization belongs in the interface contract. What should be added. Determinism must be a testable output property.
D:An explicit dependency boundary narrows acceptable implementations. determinism must be a testable output property.
Question 310
A service must run offline and must not add dependencies, but Copilot suggests a cloud API and a new package. Which TWO restrictions belong in the prompt? (Select TWO.)
- Permit the model to choose any runtime it prefers.
- Delete all integration tests before regenerating the solution.
- State that the implementation cannot make external network requests.
- Say only 'make this reliable' with no execution constraints.
- Restrict implementation to the standard library and existing declared packages.
Explanation
Correct Answers
C:Offline operation rules out cloud API calls.
E:Dependency constraints prevent unapproved imports.
Incorrect Answers
A:Arbitrary environment changes do not meet the deployed contract.
B:Removing tests destroys verification of requirements.
D:Vague quality words do not define the forbidden behavior.