Skip to main content

Chapter 2: Building Reusable Templates

🎯 Learning Objectives​

  • Create templates with placeholder variables
  • Maintain consistency across prompts
  • Build prompt libraries for teams

What Are Prompt Templates?​

Templates are reusable prompts with variables (placeholders) that you fill in for each use.

Template Structure​

Template: Email Response Generator

---
You are a \{ROLE\} at \{COMPANY\}.

Write a professional email response to:
\{ORIGINAL_EMAIL\}

Tone: \{TONE\}
Key points to address: \{KEY_POINTS\}
Call to action: \{CTA\}

Keep the response under \{WORD_COUNT\} words.
---

Variables to Include​

VariableDescription
\{ROLE\}Your position/persona
\{AUDIENCE\}Target reader
\{TONE\}Communication style
\{FORMAT\}Output structure
\{LENGTH\}Word/character count
\{INPUT\}Data to process

Example Templates​

Content Creation Template​

BLOG POST GENERATOR

Topic: \{TOPIC\}
Target audience: \{AUDIENCE\}
Word count: \{WORD_COUNT\}
Tone: \{TONE\}
Keywords to include: \{KEYWORDS\}
Call to action: \{CTA\}

Structure:
- Hook/intro paragraph
- \{NUM_SECTIONS\} main sections with subheadings
- Conclusion with \{CTA\}

Analysis Template​

DATA ANALYSIS PROMPT

Role: Data analyst specializing in \{DOMAIN\}
Task: Analyze \{DATA_TYPE\} for \{PURPOSE\}
Focus areas: \{FOCUS_AREAS\}

Output format:
1. Executive summary (2-3 sentences)
2. Key findings (\{NUM_FINDINGS\} points)
3. Recommendations (\{NUM_RECS\} actionable items)
4. Visualization suggestions

Version Control for Templates​

Track template changes:

Template: Customer Response v2.3
Last updated: 2024-01-15
Changes: Added \{URGENCY\} variable, refined tone options
Success rate: 92% first-try success

Key Takeaways​

Summary
  1. Templates use variables as placeholders
  2. Standardize common elements (role, format, length)
  3. Version control your templates
  4. Build team libraries for consistency

← Previous: Common Prompt Patterns | Next: Domain-Specific Prompts β†’