How to Write Better ChatGPT Prompts (With Examples)
Write better ChatGPT prompts with examples: roles, constraints, formats, and iteration. Copy templates for coding, writing, and study.

Why Most ChatGPT Prompts Fail
Two coworkers asked ChatGPT the same question about refunds. One wrote “What is our refund policy?” and got a confident essay about generic consumer law. The other pasted role, audience, and “answer only from the attached policy; say if missing.” Same model, different prompts — only one answer was safe to send to a customer.
Better ChatGPT prompts are specific. They name the role, audience, constraints, and output format. Vague prompts produce vague answers — then people blame the model.
Why better ChatGPT prompts Matters
High search volume sits on ChatGPT how-tos. Fresh examples and templates earn clicks and support prompt-engineering hub pages.
The Story Behind better ChatGPT prompts
Specificity beats clever wording
Better ChatGPT prompts name the role, audience, constraints, and output format before the task. Vague prompts produce vague answers — then users blame “the AI” instead of the specification.
Constraints reduce hallucinations and scope creep: word limits, banned topics, required sections, citation rules. Treat constraints as guardrails, not suggestions.
When data is missing, instruct the model to ask clarifying questions or explicitly state assumptions. That single habit prevents silent fabrication in customer-facing workflows.
Examples lock style and structure
Show one good output for stylistic tasks: tone, heading hierarchy, bullet density. ChatGPT mirrors patterns in the prompt more reliably than adjectives like “professional.”
For coding help, paste the function and ask for severity-ranked findings with minimal fixes — not a rewrite of the entire module. For study, ask for one analogy, one code sample, then quiz questions with hidden answers.
Keep a prompt library with version notes. Iterate in public with yourself: v1 failed on length, v2 failed on tone, v3 added an example — winner saved.

Templates you can copy today
Use the study and coding templates in the code block below as starting points — replace braces, keep the skeleton. Templates encode lessons from hundreds of failures so you do not repeat them.
For factual tasks, request sources or say “if unsure, say you do not know.” For creative tasks, specify what must remain factual versus what can be invented.
Run, critique, tighten. One iteration cycle per day on a real task beats reading fifty tip threads.
- State the goal in one sentence
- Add audience + constraints + format
- Include one exemplar output
- Run ten variations; save the winner
From ChatGPT to every other model
These patterns transfer to Claude, Gemini, and local LLMs — only API details change. Custom GPTs help when you repeat identical system instructions; reusable prompts help when you iterate frequently.
Practice on Sturdee’s Prompt Engineering skill page. Upgrade to Pro for AI Tutor critique that scores constraint-following and suggests tighter formats.
Better ChatGPT prompts are a career skill disguised as a party trick. The person who specifies success clearly becomes the person teams trust with customer emails, code reviews, and research packs.
Elements of a Strong Prompt
- Specificity beats clever wording
- Constraints reduce hallucinations
- Examples lock style and structure
- Ask for assumptions when data is missing
- Request citations or sources when factual
Iterate Prompts Like a Pro
- State the goal in one sentence
- Add audience + constraints
- Show one good example output
- Run, critique, tighten the prompt
- Save the winner in a prompt library
Prompt Examples You Can Copy
Study:
"Explain closures in JavaScript to a beginner. Use one analogy, one code sample, then 3 quiz questions with answers."
Coding:
"You are a senior reviewer. Find bugs in this function. List severity, why it fails, and a minimal fix. Code:
{paste}"Practice Prompting on Sturdee
Practice on the Prompt Engineering skill page. Upgrade to Pro for AI Tutor critique of your prompts.
Takeaways — What to Do Next
Write better ChatGPT prompts by specifying success, showing examples, and iterating with a saved library. The model is interchangeable; your specification discipline is not.
ChatGPT Prompts — FAQ
Frequently Asked Questions
How long should a ChatGPT prompt be?+
Long enough to specify success. Many great prompts are 80–200 words with clear structure — not novels.
Should I use custom GPTs or just prompts?+
Start with reusable prompts. Custom GPTs help when you repeat the same system instructions often.
Do temperature settings matter for beginners?+
Lower temperature for factual, structured tasks; higher for brainstorming. Prompt clarity matters more than knob tuning at first.
How do I reduce hallucinations in ChatGPT?+
Add constraints, require citations or source quotes, and instruct the model to refuse when information is missing.
Can I share prompts safely at work?+
Share templates, not customer data. Redact identifiers and follow your company’s acceptable-use policy for AI tools.
Continue learning interactively
/skills/prompt-engineering →