Foundations of Prompt Engineering
The Anatomy of an Effective Prompt
Every great prompt has structure. Master this 5-element framework and you'll write effective prompts for any situation.
The CTFTC Framework
Think of CTFTC as your prompt-writing checklist:
| Element | What It Does | Example |
|---|---|---|
| Context | Sets the scene | "I'm a marketing manager launching a new product..." |
| Task | Defines what you want | "Write 3 email subject lines..." |
| Format | Specifies the output structure | "Present as a numbered list..." |
| Tone | Sets the voice and style | "Use a professional but friendly tone..." |
| Constraints | Adds boundaries | "Keep each under 50 characters..." |
See the Framework in Action
Without CTFTC (weak prompt):
"Write me some email subject lines"
With CTFTC (strong prompt):
Context: I'm a B2B SaaS marketing manager launching a new AI-powered analytics feature.
Task: Write 3 email subject lines for our announcement email to existing customers.
Format: Present as a numbered list with the subject line followed by why it works.
Tone: Professional but exciting — we want customers to feel valued and curious.
Constraints: Each subject line must be under 50 characters and include an action word.
You Don't Need All 5 Every Time
The framework is flexible. Use what you need:
| Situation | Essential Elements |
|---|---|
| Quick question | Task only |
| Content creation | Context + Task + Tone |
| Complex project | All 5 elements |
| Data analysis | Context + Task + Format |
The Order Matters (Sometimes)
For best results, lead with context:
Recommended order:
- Context (who you are, situation)
- Task (what you want)
- Format (how to structure output)
- Tone (voice and style)
- Constraints (boundaries and limits)
Why? AI uses earlier text to inform later predictions. Context first helps AI understand everything that follows.
Quick Template
Copy and customize this template:
Context: [Your role/situation]
Task: [What you want AI to do]
Format: [How to structure the output]
Tone: [Voice and style preferences]
Constraints: [Length, audience, other limits]
Key Takeaway
The CTFTC framework turns vague requests into precise instructions. Not every prompt needs all 5 elements, but knowing the framework helps you identify what's missing when outputs aren't right.
Next: The 5 most common prompt mistakes and how to avoid them. :::