Chain-of-thought Prompting

Definition

A prompting technique that encourages the model to break down complex problems into step-by-step reasoning. The model explicitly shows its thinking process, leading to more accurate and interpretable results for complex tasks.

Characteristics

Example

Prompt:

Solve this math problem step by step:
Sarah has 15 apples. She gives 4 apples to her friend and then buys 8 more apples. How many apples does Sarah have now?

Let me think through this step by step:
1. Sarah starts with 15 apples
2. She gives away 4 apples: 15 - 4 = 11 apples
3. She buys 8 more apples: 11 + 8 = 19 apples
4. Therefore, Sarah has 19 apples now.

Use Cases

Benefits

Limitations

Implementation Strategies

  1. Explicit instruction: "Think step by step"
  2. Example demonstration: Show CoT in examples
  3. Structured format: Use numbered steps or bullets
  4. Verification steps: Include checking/validation
  5. Clear transitions: Connect reasoning steps logically

Variants

Best Practices

When to Use