← Back to Main Page
Avoid These Common Prompts
Posted on Jul 4, 2025
Usage
Not all Copilot prompts are created equal. Some generic, overused prompts actually limit Copilot’s potential and may get you bland, off-the-mark, or even flat-out wrong suggestions.
Prompts to avoid:
- “Write a function” (with no details)
- “Fix this code” (with no context)
- “Make this better”
- “Generate unit tests” (with no requirements or examples)
- “Explain this code” (with no file, method, or details provided)
These work, but they miss the power of Copilot. Copilot thrives on context and details!
ProTip
Be specific!
- Include the language and framework (“Write a Python function to…”)
- Add constraints (“…using recursion”, “that handles errors”, “for all edge cases”)
- Give Copilot code samples, expected input/output, or describe your intent (“Given an array of user records, filter…”)
- For bug fixes, copy in the error message, stack trace, and code block
Better prompt examples:
- “In Python, write a function to find all unique values in a list, ignoring case.”
- “Fix the following code to handle division by zero errors.”
- “Generate unit tests for my ‘parseInvoice’ function to cover edge cases.”
The more context you give, the smarter Copilot becomes!