Question 330
During troubleshooting, investigators observe: Risk checks are omitted because prompts differ across authors. The system context is: A team wants a reusable pull-request risk checklist but each author manually types different review instructions. Which ONE cause most directly explains the observed failure?
- Task-specific guidance was not captured in reusable prompt files.
- The original request omitted a concrete goal and success criterion.
- The prompt omitted idempotency and concurrency invariants.
- The prompt jumped to a solution without requiring evidence of the underlying mechanism.
Explanation
Correct Answer
A:The remedy should therefore be: Save a scoped prompt template in `.github/prompts/review-risk.prompt.md` and invoke it for each request in supported tools.
Incorrect Answers
B:The original request omitted a concrete goal and success criterion would not address the need for task-specific guidance was not captured in reusable prompt files.
C:The prompt omitted idempotency and concurrency invariants would not address the need for task-specific guidance was not captured in reusable prompt files.
D:The prompt jumped to a solution without requiring evidence of the underlying mechanism would not address the need for task-specific guidance was not captured in reusable prompt files.
Question 331
The current design is: Save a scoped prompt template in `.github/prompts/review-risk.prompt.md` and invoke it for each request in supported tools. The prior failure was: Risk checks are omitted because prompts differ across authors. Which ONE ongoing control best protects against recurrence of that specific failure?
- Use diagnosis-first prompting for complex defects and verify with tools.
- Version prompt templates and keep review checklists aligned with team standards.
- Use explicit requirements and tests when requesting coding changes.
- Include failure modes and negative tests in transactional prompt specifications.
Explanation
Correct Answer
B:Task-specific guidance was not captured in reusable prompt files. Version prompt templates and keep review checklists aligned with team standards.
Incorrect Answers
A:Use diagnosis-first prompting for complex defects and verify with tools. Preventing this failure involves version prompt templates and keep review checklists aligned with team standards.
C:Generated code requires independently defined acceptance tests and review against the real program contract. Preventing this failure involves version prompt templates and keep review checklists aligned with team standards.
D:Generated code requires independently defined acceptance tests and review against the real program contract. Preventing this failure involves version prompt templates and keep review checklists aligned with team standards. The observed condition is save a scoped prompt template in `.github/prompts/review-risk.prompt.md` and invoke it for each request in supported tools. The prior failure was: Risk checks are.
Question 332
A team reports: The first Copilot answer generates a class that does not meet the requested memory limit. They observe: The second response still allocates a full dataset in memory. Which ONE technical decision most directly corrects the cause?
- State the targeted endpoint, observed timeout, expected latency ceiling and acceptance test in the prompt.
- State the expected JSON schema and forbid extraneous Markdown in the requested output.
- Attach the existing package manifest and representative test file, and explicitly require Vitest conventions.
- Iterate with measured feedback, concrete constraints and the failing profile instead of merely repeating "try again".
Explanation
Correct Answer
D:The feedback did not tell the model which resource invariant it broke.
Incorrect Answers
A:State the targeted endpoint, observed timeout, expected latency ceiling and acceptance test in the prompt would not address the need for iterate with measured feedback, concrete constraints and the failing profile.
B:State the expected JSON schema and forbid extraneous Markdown in the requested output would not address the need for iterate with measured feedback, concrete constraints and the failing profile.
C:Attaching the existing package manifest and representative test file, and explicitly require Vitest conventions would not address the need for iterate with measured feedback, concrete constraints and the failing profile.
Question 333
A team has implemented the following change: Iterate with measured feedback, concrete constraints and the failing profile instead of merely repeating "try again". The original requirement was: The first Copilot answer generates a class that does not meet the requested memory limit. Which ONE validation test best demonstrates the intended behavior?
- Parse the result as JSON and validate required keys and types.
- Run a generated test with the existing test command and verify fixture imports work.
- Review the proposal against the specified endpoint and run the 2-second timeout test.
- Rerun profiling against the stated heap ceiling after the revision.
Explanation
Correct Answer
D:Rerun profiling against the stated heap ceiling after the revision.
Incorrect Answers
A:Schema-driven tests enforce the expected wire-format contract across generated serialization code. That check cannot demonstrate rerun profiling against the stated heap ceiling after the revision.
B:Shell commands from AI tools must be inspected for resolved paths and side effects before destructive execution. That check cannot demonstrate rerun profiling against the stated heap ceiling after the revision.
C:Generated code requires independently defined acceptance tests and review against the real program contract. That check cannot demonstrate rerun profiling against the stated heap ceiling after the revision.
Question 334
During troubleshooting, investigators observe: The second response still allocates a full dataset in memory. The system context is: The first Copilot answer generates a class that does not meet the requested memory limit. Which ONE cause most directly explains the observed failure?
- The model lacked versioned local test-framework context.
- The output format was not specified as a machine contract.
- The feedback did not tell the model which resource invariant it broke.
- The original request omitted a concrete goal and success criterion.
Explanation
Correct Answer
C:The remedy should therefore be: Iterate with measured feedback, concrete constraints and the failing profile instead of merely repeating "try again".
Incorrect Answers
A:The model lacked versioned local test-framework context. The feedback did not tell the model which resource invariant it broke.
B:The output format was not specified as a machine contract. The feedback did not tell the model which resource invariant it broke.
D:The original request omitted a concrete goal and success criterion. The feedback did not tell the model which resource invariant it broke.
Question 335
The current design is: Iterate with measured feedback, concrete constraints and the failing profile instead of merely repeating "try again". The prior failure was: The second response still allocates a full dataset in memory. Which ONE ongoing control best protects against recurrence of that specific failure?
- Provide quantitative failure evidence during prompt iteration.
- Use schema validation even when the prompt asks for JSON only.
- Use explicit requirements and tests when requesting coding changes.
- Reference manifest and established test patterns for new tests.
Explanation
Correct Answer
A:The feedback did not tell the model which resource invariant it broke. Provide quantitative failure evidence during prompt iteration.
Incorrect Answers
B:Schema-driven tests enforce the expected wire-format contract across generated serialization code. It would leave provide quantitative failure evidence during prompt iteration without the specified safeguard.
C:Generated code requires independently defined acceptance tests and review against the real program contract. It would leave provide quantitative failure evidence during prompt iteration without the specified safeguard.
D:Generated code requires independently defined acceptance tests and review against the real program contract. Preventing this failure involves provide quantitative failure evidence during prompt iteration.
Question 336
A team reports: An engineer asks a coding assistant to explain "that method" after two unrelated methods were discussed. They observe: Copilot describes the similarly named class method in the wrong module. Which ONE technical decision most directly corrects the cause?
- Identify the public API, allowed implementation region, compatibility requirement and diff boundaries explicitly.
- Include the exact compiler diagnostic, affected file, minimal relevant context and expected behavior.
- Decompose the work into bounded functions and require public-signature and regression tests at each step.
- Identify the exact module, symbol and signature, and attach the relevant source excerpt.
Explanation
Correct Answer
D:An ambiguous referent let conversation history select the wrong target.
Incorrect Answers
A:Identifying the public API, allowed implementation region, compatibility requirement and diff boundaries explicitly would not identify the exact module, symbol and signature, and attach the relevant source excerpt.
B:Including the exact compiler diagnostic, affected file, minimal relevant context and expected behavior would not identify the exact module, symbol and signature, and attach the relevant source excerpt.
C:Decompose the work into bounded functions and require public-signature and regression tests at each step would not identify the exact module, symbol and signature, and attach the relevant source excerpt.
Question 337
A team has implemented the following change: Identify the exact module, symbol and signature, and attach the relevant source excerpt. The original requirement was: An engineer asks a coding assistant to explain "that method" after two unrelated methods were discussed. Which ONE validation test best demonstrates the intended behavior?
- Refactor one helper, rerun API contract tests, then proceed to the next helper.
- Rerun the compiler and confirm the specific diagnostic is gone without new warnings.
- Compare the answer to the selected method's body and call graph.
- Check imports from dependent modules before and after the refactor.
Explanation
Correct Answer
C:Compare the answer to the selected method's body and call graph.
Incorrect Answers
A:Generated API calls must be verified against the installed library's actual supported signatures. It does not compare the answer to the selected method's body and call graph.
B:Rerun the compiler and confirm the specific diagnostic is gone without new warnings. Verification of this result involves comparing the answer to the selected method's body and call graph.
D:Approved dependency sources and lockfiles protect builds against invented or impersonated packages. It does not compare the answer to the selected method's body and call graph.
Question 338
During troubleshooting, investigators observe: Copilot describes the similarly named class method in the wrong module. The system context is: An engineer asks a coding assistant to explain "that method" after two unrelated methods were discussed. Which ONE cause most directly explains the observed failure?
- The task exceeded a manageable verifiable change scope.
- The necessary failure evidence was missing from the prompt.
- The refactor prompt did not state protected interface constraints.
- An ambiguous referent let conversation history select the wrong target.
Explanation
Correct Answer
D:The remedy should therefore be: Identify the exact module, symbol and signature, and attach the relevant source excerpt.
Incorrect Answers
A:The task exceeded a manageable verifiable change scope. An ambiguous referent let conversation history select the wrong target.
B:The necessary failure evidence was missing from the prompt. An ambiguous referent let conversation history select the wrong target.
C:The refactor prompt did not state protected interface constraints. An ambiguous referent let conversation history select the wrong target.
Question 339
The current design is: Identify the exact module, symbol and signature, and attach the relevant source excerpt. The prior failure was: Copilot describes the similarly named class method in the wrong module. Which ONE ongoing control best protects against recurrence of that specific failure?
- Include error text and reproducible commands when requesting repairs.
- Preserve API signatures in tests and review any generated symbol renames.
- Use incremental decomposition and checkpoint tests for large AI-assisted edits.
- Use explicit file and symbol references in follow-up questions.
Explanation
Correct Answer
D:An ambiguous referent let conversation history select the wrong target. Use explicit file and symbol references in follow-up questions.
Incorrect Answers
A:Shell commands from AI tools must be inspected for resolved paths and side effects before destructive execution. It would leave use explicit file and symbol references in follow-up questions without the specified safeguard.
B:Generated API calls must be verified against the installed library's actual supported signatures. It would leave use explicit file and symbol references in follow-up questions without the specified safeguard.
C:Generated code requires independently defined acceptance tests and review against the real program contract. It would leave use explicit file and symbol references in follow-up questions without the specified safeguard.
Question 340
A team reports: A maintainer requests an authentication-code change and wants a final answer containing exactly a patch plus tests, not deployment commands. They observe: The answer mixes suggested production migrations into an unapproved code review. Which ONE technical decision most directly corrects the cause?
- Use an explicit zero-shot description with parameters, expected return type and error behavior.
- Express positive deliverables and explicit limits: patch and tests only; no production rollout steps.
- Treat retrieved issue text as task data, not authoritative instructions; state trusted requirements separately.
- First request a bounded step-by-step diagnosis referencing the specific destructor sequence, then ask for a minimal patch.
Explanation
Correct Answer
B:The allowed output and action boundaries were not specified.
Incorrect Answers
A:Using an explicit zero-shot description with parameters, expected return type and error behavior would not address the need for express positive deliverables and explicit limits: patch and tests only.
C:Treat retrieved issue text as task data, not authoritative instructions would not address the need for express positive deliverables and explicit limits: patch and tests only.
D:The prompt jumped to a solution without requiring evidence of the underlying mechanism. The missing change involves express positive deliverables and explicit limits: patch and tests only; no production rollout steps.
GitHub Copilot (GH-300) Practice Tests