Writing Effective ChatGPT Prompts
The quality of ChatGPT's responses depends heavily on how you ask. Learn proven techniques to get better results.
The Prompt Formula
A great prompt typically includes:
Examples: Bad vs Good Prompts
"Write about marketing"
"Act as a digital marketing consultant. Create a 6-month social media marketing plan for a new sustainable clothing brand targeting millennials. Include platform recommendations, content themes, posting frequency, and key metrics to track. Format as a markdown table."
"Fix my code"
"I'm getting a 'TypeError: Cannot read property of undefined' in this JavaScript function. The error occurs when I try to access user data. Here's my code: [paste code]. Please identify the bug, explain why it's happening, and provide a corrected version with comments."
Advanced Techniques
1. Chain of Thought
Ask ChatGPT to think step-by-step for complex problems:
"Solve this problem step by step, showing your reasoning at each stage: If a train leaves Station A at 2 PM traveling at 60 mph, and another train leaves Station B at 3 PM traveling at 80 mph, when will they meet if the stations are 300 miles apart?"
2. Few-Shot Learning
Provide 2-3 examples of what you want:
"Convert product names to SEO-friendly URLs:
Product: 'iPhone 16 Pro Max 256GB' → URL: 'iphone-16-pro-max-256gb'
Product: 'Samsung Galaxy S25 Ultra' → URL: 'samsung-galaxy-s25-ultra'
Now convert: 'Sony WH-1000XM5 Noise Cancelling Headphones'"
3. Role-Playing
Assign specific expertise:
"Act as a senior software architect with 15 years of experience in microservices. Review this system design and suggest improvements for scalability and fault tolerance."
4. Constrain the Output
Be specific about format, length, style:
"Explain quantum computing in exactly 3 bullet points, each under 20 words, using analogies a 10-year-old would understand."
5. Iterative Refinement
Start broad, then narrow down:
First: "Suggest blog post topics about AI"
Then: "Focus on practical AI tools for small businesses"
Finally: "Create detailed outlines for the top 3 topics"
Prompt Templates
Content Writing
Write a [type of content] about [topic] for [audience]. Tone: [professional/casual/humorous] Length: [word count] Include: [specific elements] Avoid: [things to exclude]Code Generation
Write a [language] function that [task]. Input: [describe input] Output: [describe expected output] Requirements: [edge cases, performance needs] Include error handling and comments.Analysis
Analyze [subject/data] and provide: 1. Key findings (top 3) 2. Trends or patterns 3. Actionable recommendations 4. Potential risks or concerns Format as a professional report.Common Pitfalls to Avoid
- ❌ Being too vague ("Tell me about history")
- ❌ Not providing context ("Fix this: [code snippet]")
- ❌ Assuming ChatGPT knows your preferences
- ❌ Asking multiple unrelated questions at once
- ❌ Not specifying the desired format
- ❌ Forgetting to mention constraints or requirements
Pro Tips
- Use delimiters: Triple quotes or XML tags to separate different parts
- Ask for alternatives: "Give me 5 different approaches"
- Request explanations: "Explain your reasoning"
- Set tone explicitly: "Write this in a friendly, conversational tone"
- Iterate in the same chat: Build on previous responses
- Leverage GPT-5.1: Use the latest model for complex reasoning tasks
Master advanced features
Learn about custom instructions, plugins, and other pro techniques.
Advanced Features