How to Write Better ChatGPT Prompts: A Practical Prompt Engineering Guide
A practical prompt engineering guide for ChatGPT—templates, examples, and fixes that improve coding, writing, and research results immediately.

Most disappointing ChatGPT answers come from vague prompts—not “dumb models.” This prompt engineering guide shows a simple system you can reuse for writing, coding, research, and analysis.
The same patterns work across Claude and Gemini too—see ChatGPT vs Claude vs Gemini.
The 6-part prompt skeleton
Copy this structure:
- Role — who the model should act as
- Goal — what “done” looks like
- Audience — who will read/use the output
- Context — facts, constraints, source notes
- Format — bullets, table, code, JSON, etc.
- Quality bar — what to avoid; how to verify
Example
“You are a technical editor. Goal: improve clarity of this README for junior developers. Audience: new contributors. Context: React + Next.js app. Format: revised README + list of changes. Quality bar: no fluff; don’t invent setup steps not in my notes.”
High-leverage techniques
1. Show, don’t only tell
Paste 1–2 examples of the tone or output shape you want.
2. Ask for a plan first
“Outline approaches and wait.” Prevents wasted long drafts.
3. Constrain the canvas
Word limits, section counts, allowed libraries, reading level.
4. Require uncertainty labels
“If unknown, say unknown.” Reduces confident hallucinations.
5. Iterate surgically
“Rewrite only the FAQ; keep the intro.”
6. Use rubrics
“Score your draft 1–5 on clarity, specificity, and actionability; then improve anything under 4.”
Templates by use case
Writing / blogging
“Create an H2/H3 outline for [keyword] targeting [reader]. Include FAQ ideas and an internal-link wishlist. Don’t write full paragraphs yet.”
Coding
“Given this error and file, propose the smallest fix. List assumptions. Provide a test. If you need more files, ask.”
Related: AI coding assistants
Research
“Compare [A] vs [B] for [use case]. Use a table. Flag claims that need sources.”
Related: AI research tools
“Draft 3 subject lines + one 100-word email. Tone: direct. CTA: [action]. No hype adjectives.”
Before/after prompt makeovers
Before: “Write a blog about AI tools.”
After: “Write a 1,200-word blog for freelancers comparing 5 free AI productivity tools. Include a comparison table, FAQ, and internal links placeholders. Tone: practical. Avoid clichés.”
Before: “Fix my code.”
After: “Here’s the failing test and function. Explain root cause in 3 bullets, then patch. Keep public API stable.”
Common prompt failures (and fixes)
| Failure | Fix |
|---|---|
| Generic output | Add audience + examples + banned phrases |
| Hallucinated facts | Provide source notes; ban invention |
| Too long | Hard word limit + outline-first |
| Wrong format | Specify schema / markdown structure |
| Insecure code | Require threat notes + safer pattern |
Evaluation checklist
Before you trust an answer:
- Does it follow the requested format?
- Are actionable next steps concrete?
- Did it invent APIs, citations, or prices?
- Can you verify the risky parts in 5 minutes?
FAQ
Do I need a fancy “prompt engineer” job title?
No. Clear goals and constraints beat jargon.
Are long prompts always better?
Only when length adds signal. Structured short prompts beat vague essays.
Does this work for image models too?
Yes—subject, style, aspect ratio, and negatives transfer. See free AI image generators.
Advanced pattern: critique → revise → compress
For important docs, use a three-pass loop:
- Draft with the 6-part skeleton.
- Critique: “List weak claims, missing evidence, and jargon. Don’t rewrite yet.”
- Revise using the critique.
- Compress: “Cut 20% without losing meaning.”
This produces cleaner work than a single mega-prompt.
System-level tips inside ChatGPT
- Put durable preferences in custom instructions (audience, banned phrases, formatting defaults).
- Keep a personal prompt library in Notion/Docs with 10 templates.
- For coding, paste interface signatures and tests before asking for implementations.
- For research, demand sources and then open them—never cite blind.
Related deep dives: AI writing tools and AI coding assistants.
Next steps
Save the 6-part skeleton in a notes doc and use it for your next 10 chats. Then explore tools in our directory or practice with AI writing workflows.