Q117 [Scenario]: A developer is attempting to solve a complex graph traversal bug. Asking Copilot 'Fix this graph algorithm' results in invalid code. How can Chain-of-Thought prompting improve the outcome?
The developer should prompt: 'Analyze this graph traversal step-by-step, explain where the cycle detection fails, and then output the corrected function.' Forcing explicit reasoning steps improves output accuracy.
Key Takeaways
Chain-of-Thought prompting forces the model to articulate logical steps first.
Reduces logic errors on complex algorithmic tasks.
Knowledge Check
Which prompt phrasing leverages Chain-of-Thought reasoning to solve a complex bug?