Core Principles

Key Techniques

Few-Shot Prompting

Chain-of-Thought

XML Formatting

<instructions>Your task here</instructions>
<examples>Your examples</examples>
<input>Actual content</input>

Role Assignment

System Prompt Structure

  1. Role/Persona - Who is Claude?

  2. Task Description - What should it do?

  3. Context - Background information

  4. Examples - Show don't tell

  5. Instructions - Step-by-step guidance

  6. Output Format - Specify format needed

Production Best Practices

DO:

DON'T:

Collaboration Model

Prompt Engineers + Subject Matter Experts = Best Results

Quick Wins

  1. Add "Think step by step in <thinking> tags"
  2. Provide 3 concrete examples
  3. Use XML to structure your prompt
  4. Specify exact output format wanted
  5. Give Claude a relevant role/persona