D15Intermediate
Negative Prompting
30 minEvery time AI output is unsatisfactory
Format: Improve output by telling the AI "what not to do."
Comparison:
Positive instructions only:
"Write a user registration API"
With negative instructions:
"Write a user registration API.
Do not:
- Do not use var (use const/let)
- Do not hardcode any values
- Do not use console.log
- Do not omit error handling
- Do not use the any type (TypeScript)
- Do not do more than one thing per function
- Do not use callback functions (use async/await)"
Exercise: Write a "do not" list for the following tasks:
- Design a login page
- Write a product introduction
- Create a REST API
- Design a database schema