Skip to main content
Bring your team and maximize your impact at Dreamforce. Register three or more to unlock $999 passes.

Explore Prompt Design Patterns

Learning Objectives

After completing this unit, you'll be able to:

  • Identify the four core prompt design patterns.
  • Apply each pattern to solve different business problems.
  • Recognize which pattern to use for different tasks.
  • Practice pattern matching with real scenarios.

Learn About Prompt Design Patterns

A prompt design pattern is a reusable template for a specific type of task. Just like design patterns in software development, prompt patterns solve common problems in predictable ways.

Just like a baker has go-to techniques (layering, folding, proofing) when they bake, prompt designers rely on a core set of patterns while they work. Each one is suited to a different task. Using recipes as an example, a prompt designer will use these techniques when prompting:

  • Summarization: Condense a full recipe down to the key steps.
  • Content generation: Create a new recipe from a list of ingredients you have on hand.
  • Transformation: Adapt a recipe for a dietary restriction or different cuisine.
  • Extraction: Pull just the ingredient list from a full recipe card.

Pattern 1: Summarization

Purpose: Condense a large amount of information into a shorter, digestible format.

When to use: When you have too much text and need the key points quickly.

Example use cases:

  • Summarize a long case history into 2 to 3 sentences.
  • Extract key findings from a research document.
  • Create a brief from a lengthy email thread.
  • Condense meeting notes into action items.

Example prompt:

Task: Summarize this customer support case
"""
Case Details:
Customer complained about billing issue. We investigated and found an error in our system from their third billing cycle. The charge was $250 when it should have been $150. We've issued a refund and applied an additional $50 credit. Customer responded positively.
"""
Instructions:
- Provide a 2-3 sentence summary
- Include the problem, resolution, and customer response
- Use clear, straightforward language
- Focus on what matters most

Pattern 2: Content Generation

Purpose: Create new content from scratch based on provided parameters.

When to use: When you need to generate original content quickly.

Example use cases:

  • Generate follow-up emails automatically.
  • Create product descriptions.
  • Write social media posts.
  • Draft responses to common questions.

Example prompt:

Task: Generate a follow-up email to a customer who purchased but hasn't used the product yet
"""
Customer: John Smith
Product: Advanced Analytics Suite
Days since purchase: 14
Customer's industry: Financial Services
"""
Instructions:
- Write a friendly, non-pushy email
- Offer to help them get started
- Include one key benefit of the product
- Add a link to a getting-started guide
- Keep it under 150 words
Format: Email with subject line

Pattern 3: Transformation

Purpose: Change existing content for a different audience, tone, or purpose.

When to use:When you have content that needs to be adapted.

Example use cases:

  • Rewrite technical documentation for a general audience.
  • Change a formal tone to conversational.
  • Adapt content for different platforms (social media vs. blog).
  • Localize content for different regions.

Example prompt:

Task: Transform this technical error message into a user-friendly message
"""
Original error: "NullPointerException in AuthenticationManager.validate() at line 247"
"""
Instructions:
- Remove technical jargon
- Explain what went wrong in simple terms
- Suggest what the user should do next
- Keep a helpful, not alarming tone
- Make it something a non-technical person would understand

Pattern 4: Extraction

Purpose: Pull specific information from unstructured text.

When to use: When you need to find particular data points in lots of text.

Example use cases:

  • Extract action items from meeting notes.
  • Pull customer contact information from emails.
  • Identify key requirements from a long proposal.
  • List all mentioned deadlines from a document.

Example prompt:

Task: Extract all action items and deadlines from this meeting transcript
"""
Meeting Transcript:
Sarah mentioned we need to finalize the budget by March 30. John said he'd handle the vendor calls. We also discussed launching the new feature—target date is April 15. Maria will coordinate with design by March 22.
"""
Instructions:
- List each action item
- Include the responsible person if mentioned
- Include the deadline if mentioned
- Use a simple bullet-point format
- If no deadline is mentioned, note "No deadline specified"

Practice Scenario Challenge

You've seen all four patterns in action. Now it's time to put your pattern recognition to the test. Read each scenario, and decide which pattern fits best. There's one right answer for each. Drag the correct pattern to the scenario.

Getting comfortable with these four patterns is one of the most valuable things you can do as a prompt designer. Most business use cases are a variation of one of these four. Once you can recognize them quickly, writing the prompt becomes much easier. In the next unit, you'll learn how to choose the right model to power your prompt.

Salesforce ヘルプで Trailhead のフィードバックを共有してください。

Trailhead についての感想をお聞かせください。[Salesforce ヘルプ] サイトから新しいフィードバックフォームにいつでもアクセスできるようになりました。

詳細はこちら フィードバックの共有に進む