Prompt engineering
Prompt Engineering for ChatGPT
Learn prompt engineering for ChatGPT: roles, context, constraints, examples, output formats, and refinement prompts.
Structure
You are [role]. Given [context], help me achieve [goal] while following [constraints], and answer in [format].
Refine
Rewrite this answer to be shorter, beginner-friendly, and include one concrete example.
Evaluate
Score this answer for accuracy, usefulness, and missing details, then suggest improvements.
What this page helps with
Prompt engineering for ChatGPT is not magic wording. It is the habit of supplying goal, context, constraints, output format, and evaluation criteria.
How it works
Core structure
Organize role, goal, context, constraints, output format, and evaluation criteria.
Common mistakes
Vague requests, no audience, no format, and no refinement step are common causes of weak output.
Next step
The related guide expands this into writing, image, coding, and analysis prompt templates.
Go deeper next
Prompt Engineering Handbook
Use the free page to get started, then use the related guide for a more structured workflow.
Frequently asked questions
Are longer prompts always better?
No. Clear prompts are better. Include useful constraints and remove noise.
Should I always use templates?
Use templates for repeatable workflows. A short structure is enough for one-off tasks.