Bug fix: same prompt, different AI
Task: Find and fix a bug from an error message and code. Below is the same job written the way each tool works best. All prompts are RuleStack originals (MIT). We describe how prompting differs, not which tool is "best": we haven't run benchmarks, and results change with every model update.
Note: Review and test before use. Provided as is, without warranty. See Terms.
ChatGPT
Ask for a minimal diff so it does not rewrite unrelated code.
Bug: [expected vs actual]. Stack: [language, framework, versions].
Error:
```
[stack trace]
```
Code:
```
[relevant code]
```
Explain the root cause in 2 sentences, give the minimal fix as a diff, and one test that would have caught it.Claude
Making Claude rank hypotheses first reduces confident wrong fixes.
<bug>[expected vs actual]</bug>
<error>[stack trace]</error>
<code file="[path]">[code]</code>
Find the root cause. Before proposing a fix, list the 3 most likely causes and what evidence in the code supports each. Then give the minimal fix and a regression test.Gemini
Gemini handles large pastes well; attach whole files when the bug may span several.
Here is my error and the related files: [paste or attach]. Explain what is going wrong, point to the exact line, propose a minimal fix, and mention any related places in the files that might have the same bug.DeepSeek
Reasoning mode helps on logic and off-by-one bugs.
With DeepThink on: reason through this bug step by step. Expected: [x]. Actual: [y]. Error: [trace]. Code: [code]. Show the reasoning chain briefly, then the fix and a test case. If information is missing, say what you need.Mistral Le Chat
Le Chat works well for quick, short fixes.
Debug this [language] code. Error: [trace]. Code: [code]. Give: cause, fix (code), and one sentence on how to avoid this class of bug. Keep it short.How they differ
- Give every tool the same three things: expected vs actual behavior, the exact error, and the smallest code that reproduces it.
- Reasoning modes (DeepThink, extended thinking) are worth turning on for logic bugs, less so for typos.
- Always run the fix and the test yourself; review before merging.
Replace everything in [square brackets] with your details. More: Coding prompts · all comparisons