Most prompt engineering advice is either too basic ("be specific") or too academic to apply in practice. Here are seven patterns we use daily that consistently produce better results.

1. Role + Context + Task

Don't just state the task. Set a role, provide context, then give the instruction.

You are a senior technical writer at a SaaS company.
Context: We're launching a new API endpoint for bulk user imports.
Task: Write the API documentation section covering request format, authentication, rate limits, and error codes.

2. Chain of Thought

For complex reasoning, explicitly ask the model to think step-by-step before answering.

Think through this problem step by step before giving your final answer:
[complex question]

3. Few-Shot with Edge Cases

Don't just show happy-path examples. Include edge cases in your few-shot examples to teach the model boundary behavior.

4. Output Format Pinning

Specify the exact format you want. JSON schema, markdown structure, or a template the model fills in.

Respond in this exact JSON format:
{
  "summary": "one sentence",
  "key_points": ["point1", "point2"],
  "confidence": 0.0-1.0
}

5. Negative Constraints

Tell the model what NOT to do. This is often more effective than positive instructions alone.

Do NOT:
- Use marketing language
- Include unverified claims
- Exceed 200 words

6. Iterative Refinement

Break complex tasks into steps. Use the output of one prompt as input to the next.

7. Meta-Prompting

Ask the model to improve your prompt before executing the task.

Before answering, suggest 3 ways this prompt could be improved for better results. Then answer using your improved version.

Which Models Respond Best?

  • Claude: Excels with detailed system prompts and role-based instructions
  • ChatGPT: Responds well to few-shot examples and structured output formats
  • Both: Benefit from explicit constraints and step-by-step instructions