Prompt engineering is the skill of communicating effectively with AI models. Whether you're using ChatGPT, Claude, Gemini, or any other LLM, how you phrase your request dramatically affects the quality of the output.
Why Prompt Engineering Matters
The same AI model can give you a mediocre paragraph or a brilliant, structured response — the difference is the prompt. Good prompts lead to:
- Better accuracy — the AI understands exactly what you want
- Consistent quality — reliable outputs every time
- Time savings — fewer back-and-forth iterations
- Professional results — content you can actually use
The 5-Part Prompt Structure
Every great prompt follows a basic structure. Think of it as a recipe:
1. Role
Tell the AI who it should be. This sets the expertise level and perspective.
You are a senior content strategist with 10 years of experience in B2B SaaS marketing.
2. Context
Provide background information the AI needs to understand your situation.
I'm launching a new AI writing tool targeted at freelance writers. Our main differentiator is the domain-specific templates.
3. Task
Be specific about what you want the AI to do. Use action verbs.
Write 5 LinkedIn post ideas that highlight our template feature. Each post should be 150-200 words, conversational, and end with a CTA.
4. Constraints
Set boundaries: tone, length, format, what to avoid.
Tone: friendly but professional. Avoid jargon. Don't use more than 2 emojis per post. No hashtag overload.
5. Format
Specify the output structure you need.
Return as a numbered list. Each item should have: a hook line, the body, and the CTA in bold.
Advanced Techniques
Chain-of-Thought (CoT)
Ask the AI to think step-by-step before giving the answer. This dramatically improves reasoning tasks.
Think step-by-step before answering. First analyze the data, then identify patterns, then give your recommendation.
Few-Shot Learning
Give the AI 2-3 examples of what you want. This is the fastest way to teach it your style.
Here are 2 examples of the output I want:
Example 1: [your example]
Example 2: [your example]
Now generate a new one following the same pattern.
Output Iteration
Don't try to get the perfect result in one shot. Use follow-up prompts to refine:
Good, but make it more conversational. Shorten the paragraphs. Add a specific example for the second point.
Common Mistakes to Avoid
- Being too vague: "Write me something about marketing" vs "Write a LinkedIn post about why short-form video outperforms static images for B2B brands"
- Too many instructions: Break complex requests into smaller steps
- No examples: Show, don't just tell. Examples are worth 1000 words of instruction
- Ignoring output format: Always specify how you want the result structured
Putting It All Together
Here's a complete prompt using the 5-part structure:
# Role
You are a copywriter specializing in SaaS landing pages.
# Context
I'm building a landing page for PromptLab, a free AI prompt workspace. The target audience is marketers and content creators who struggle with writing effective prompts for ChatGPT and Claude.
# Task
Write the hero section copy for the landing page, including:
- A headline (max 8 words)
- A subheadline (max 25 words)
- A primary CTA button text (3-5 words)
# Constraints
- Tone: confident, clear, slightly playful
- No buzzwords like "revolutionary" or "game-changing"
- Focus on the pain point (bad prompts = bad AI output)
# Format
Return as:
**Headline:** ...
**Subheadline:** ...
**CTA:** ...
Or — even easier — just paste this into PromptLab's Builder, pick "Marketing" as the category, and let the engine generate a structured prompt with all 5 components automatically.