Microsoft GH-300 Practice Test 35
Question 340
Copilot proposes a complicated concurrency optimization without tests and claims a runtime improvement. Which TWO requests improve reviewability? (Select TWO.)
- Ignore the project latency budget and memory limits.
- Treat the prose explanation as a formal proof of race freedom.
- Ask for the synchronization invariant and concurrency failure cases.
- Request reproducible benchmarks under a representative workload.
- Avoid running any tests because the suggested code is concise.
Explanation
Correct Answers
C:Race safety requires explicit shared-state reasoning.
D:Performance changes need measured outcomes.
Incorrect Answers
A:Resource constraints determine operational suitability.
B:LLM explanations are not formal correctness evidence.
E:Brevity is not evidence of correctness.
Question 341
A repository contains hundreds of unrelated generated files, but the task concerns one service. How should context be selected?
- Include only the relevant architecture excerpt and local code constraints.
- Focus on the service implementation, API contract, and tests rather than generated artifacts.
- Strip secrets and duplicate frames while preserving the decisive failure evidence.
- Prefer bounded logs and summarized diagnostics while retaining exact error lines.
Explanation
Correct Answer
B:Extraneous files can distract retrieval and consume tokens.
Incorrect Answers
A:Narrow high-quality context helps the assistant focus. extraneous files can distract retrieval and consume tokens.
C:Context hygiene protects data and improves retrieval signal. extraneous files can distract retrieval and consume tokens.
D:Smaller relevant tool results maintain room for requirements. How should context be selected. Extraneous files can distract retrieval and consume tokens.
Question 342
Copilot keeps using outdated documentation in its response. What can the user do?
- Focus on the service implementation, API contract, and tests rather than generated artifacts.
- Include only the relevant architecture excerpt and local code constraints.
- Prefer bounded logs and summarized diagnostics while retaining exact error lines.
- Pin the current document and explicitly mark the old guide as superseded.
Explanation
Correct Answer
D:Fresh authoritative context can override stale assumptions.
Incorrect Answers
A:Extraneous files can distract retrieval and consume tokens. Fresh authoritative context can override stale assumptions.
B:Narrow high-quality context helps the assistant focus. fresh authoritative context can override stale assumptions.
C:Smaller relevant tool results maintain room for requirements. What can the user do. Fresh authoritative context can override stale assumptions.
Question 343
A chat prompt includes passwords, long logs, and irrelevant stack frames. What should be removed?
- Strip secrets and duplicate frames while preserving the decisive failure evidence.
- Focus on the service implementation, API contract, and tests rather than generated artifacts.
- Include only the relevant architecture excerpt and local code constraints.
- Pin the current document and explicitly mark the old guide as superseded.
Explanation
Correct Answer
A:Context hygiene protects data and improves retrieval signal.
Incorrect Answers
B:Extraneous files can distract retrieval and consume tokens. Context hygiene protects data and improves retrieval signal.
C:Narrow high-quality context helps the assistant focus. context hygiene protects data and improves retrieval signal.
D:Fresh authoritative context can override stale assumptions. context hygiene protects data and improves retrieval signal.
Question 344
An agent's context window fills with verbose command output. What should tool usage change?
- Focus on the service implementation, API contract, and tests rather than generated artifacts.
- Strip secrets and duplicate frames while preserving the decisive failure evidence.
- Prefer bounded logs and summarized diagnostics while retaining exact error lines.
- Pin the current document and explicitly mark the old guide as superseded.
Explanation
Correct Answer
C:Smaller relevant tool results maintain room for requirements.
Incorrect Answers
A:Extraneous files can distract retrieval and consume tokens. Smaller relevant tool results maintain room for requirements.
B:Context hygiene protects data and improves retrieval signal. What should tool usage change. Smaller relevant tool results maintain room for requirements.
D:Fresh authoritative context can override stale assumptions. smaller relevant tool results maintain room for requirements.
Question 345
A developer needs advice on one class but attaches the entire company wiki. What improves the prompt?
- Pin the current document and explicitly mark the old guide as superseded.
- Prefer bounded logs and summarized diagnostics while retaining exact error lines.
- Include only the relevant architecture excerpt and local code constraints.
- Strip secrets and duplicate frames while preserving the decisive failure evidence.
Explanation
Correct Answer
C:Narrow high-quality context helps the assistant focus.
Incorrect Answers
A:Fresh authoritative context can override stale assumptions. narrow high-quality context helps the assistant focus.
B:Smaller relevant tool results maintain room for requirements. narrow high-quality context helps the assistant focus.
D:Context hygiene protects data and improves retrieval signal. What improves the prompt. Narrow high-quality context helps the assistant focus.
Question 346
A team repeats the same code-review checklist manually in every chat. What reusable asset fits?
- Run both on a consistent representative task set and compare verified outcomes.
- Replace the key with a placeholder and rotate the exposed secret if necessary.
- Store a focused prompt file or scoped repository instruction with version-controlled criteria.
- Resolve and consolidate the rules before relying on generated code.
Explanation
Correct Answer
C:Reusable prompts and instructions support consistency across sessions.
Incorrect Answers
A:Controlled comparison limits confounding changes. Reusable prompts and instructions support consistency across sessions.
B:Version-controlled prompts must not contain live credentials. reusable prompts and instructions support consistency across sessions.
D:Conflicting custom instructions weaken predictable behavior. What reusable asset fits. Reusable prompts and instructions support consistency across sessions.
Question 347
A shared prompt references a removed dependency. What maintenance step is needed?
- Replace the key with a placeholder and rotate the exposed secret if necessary.
- Run both on a consistent representative task set and compare verified outcomes.
- Store a focused prompt file or scoped repository instruction with version-controlled criteria.
- Update the prompt file alongside the dependency and test contract.
Explanation
Correct Answer
D:Prompt artifacts can become stale like any other project asset.
Incorrect Answers
A:Version-controlled prompts must not contain live credentials. prompt artifacts can become stale like any other project asset.
B:Controlled comparison limits confounding changes. Prompt artifacts can become stale like any other project asset.
C:Reusable prompts and instructions support consistency across sessions. prompt artifacts can become stale like any other project asset.
Question 348
An instruction file asks for contradictory naming conventions. What should its maintainers do?
- Resolve and consolidate the rules before relying on generated code.
- Run both on a consistent representative task set and compare verified outcomes.
- Store a focused prompt file or scoped repository instruction with version-controlled criteria.
- Update the prompt file alongside the dependency and test contract.
Explanation
Correct Answer
A:Conflicting custom instructions weaken predictable behavior.
Incorrect Answers
B:Controlled comparison limits confounding changes. Conflicting custom instructions weaken predictable behavior.
C:Reusable prompts and instructions support consistency across sessions. conflicting custom instructions weaken predictable behavior.
D:Prompt artifacts can become stale like any other project asset. What should its maintainers do. Conflicting custom instructions weaken predictable behavior.
Question 349
A reusable prompt contains a customer's private API key as an example. What should be corrected?
- Update the prompt file alongside the dependency and test contract.
- Replace the key with a placeholder and rotate the exposed secret if necessary.
- Store a focused prompt file or scoped repository instruction with version-controlled criteria.
- Resolve and consolidate the rules before relying on generated code.
Explanation
Correct Answer
B:Version-controlled prompts must not contain live credentials.
Incorrect Answers
A:Prompt artifacts can become stale like any other project asset. What should be corrected. Version-controlled prompts must not contain live credentials.
C:Reusable prompts and instructions support consistency across sessions. version-controlled prompts must not contain live credentials.
D:Conflicting custom instructions weaken predictable behavior. version-controlled prompts must not contain live credentials.
Question 350
A team wants to compare two prompt versions objectively. What evaluation method fits?
- Replace the key with a placeholder and rotate the exposed secret if necessary.
- Update the prompt file alongside the dependency and test contract.
- Resolve and consolidate the rules before relying on generated code.
- Run both on a consistent representative task set and compare verified outcomes.
Explanation
Correct Answer
D:Controlled comparison limits confounding changes.
Incorrect Answers
A:Version-controlled prompts must not contain live credentials. Controlled comparison limits confounding changes.
B:Prompt artifacts can become stale like any other project asset. What evaluation method fits. Controlled comparison limits confounding changes.
C:Conflicting custom instructions weaken predictable behavior. controlled comparison limits confounding changes.