π Applying Constraints in Prompts
Constraints are rules or boundaries you give to ChatGPT to control the format, tone, length, or content of the response. These are powerful when precision matters.
Why Constraints Matter
- They reduce hallucinations (i.e., made-up facts).
- They make outputs reproducible and consistent.
- They ensure responses fit within real-world formats like emails, code, outlines, etc.
Example Prompts with Constraints
π Task Constraint
"Summarize this article in 100 words or less."
π Format Constraint
"Explain the importance of hydration in the form of a haiku."
π¬ Tone Constraint
"Describe the importance of cybersecurity in a friendly and humorous tone."