ai-docs/docs/ai/crossplatform/prompting-antipatterns.md
Matt Bruce 3586f39e8e More refactoring
Signed-off-by: Matt Bruce <matt.bruce1@toyota.com>
2026-02-22 15:02:58 -06:00

53 lines
1.3 KiB
Markdown

# Prompting Anti-Patterns (And Fixes)
You are here: [AI Docs Home](../index.md) > [Cross-Platform AI Usage](cross-platform.md) > 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:
```text
Fix everything in this project.
```
Better:
Example prompt:
```text
Refactor this file to remove duplication. Do not change behavior.
```
Too vague:
```text
Make this code better.
```
Better:
Example prompt:
```text
Improve naming and add comments only where logic is complex.
```
Missing inputs:
```text
Update the service to handle retries.
```
Better:
Example prompt:
```text
Update ServiceA in src/service/ServiceA.kt to retry 2 times on 5xx. Keep API the same.
```
## Quick Self-Check Before Sending
1. Did I name the exact file or function?
2. Did I say what must not change?
3. Did I ask for one clear output type?
## Next Steps
- Read [Prompting Patterns](prompting-patterns.md) for reusable templates.
- Use [Plan-First Workflow](plan-first-workflow.md) for larger changes.