Foundations of Prompt Engineering

The Anatomy of an Effective Prompt

5 min read

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:

  1. Context (who you are, situation)
  2. Task (what you want)
  3. Format (how to structure output)
  4. Tone (voice and style)
  5. 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. :::

Quiz

Module 1 Quiz: Foundations of Prompt Engineering

Take Quiz