1.3 KiB
1.3 KiB
Prompting Anti-Patterns (And Fixes)
You are here: AI Docs Home > Cross-Platform AI Usage > Prompting Anti-Patterns
Contents
- Why Anti-Patterns Cause Rework
- Common Anti-Patterns and Fixes
- Quick Self-Check Before Sending
- Next Steps
Why Anti-Patterns Cause Rework
Anti-patterns are prompt styles that are too broad or ambiguous. They usually produce low-quality output, extra retries, and higher token use.
Common Anti-Patterns and Fixes
Too broad:
Fix everything in this project.
Better: Example prompt:
Refactor this file to remove duplication. Do not change behavior.
Too vague:
Make this code better.
Better: Example prompt:
Improve naming and add comments only where logic is complex.
Missing inputs:
Update the service to handle retries.
Better: Example prompt:
Update ServiceA in src/service/ServiceA.kt to retry 2 times on 5xx. Keep API the same.
Quick Self-Check Before Sending
- Did I name the exact file or function?
- Did I say what must not change?
- Did I ask for one clear output type?
Next Steps
- Read Prompting Patterns for reusable templates.
- Use Plan-First Workflow for larger changes.