Prompt engineering guide

Writing effective prompts is the core skill of AI mastery. These five principles will transform your results.

1

Clarity and specificity

The clearer and more specific your prompt, the better the output. Vague requests produce vague results.

  • State what you want upfront
  • Specify the format of the output
  • Include edge cases you care about
  • Use active voice and direct language
2

Providing context

Context transforms outputs. Give the AI the information it needs to understand your situation fully.

  • Describe your background or expertise level
  • Explain what you will do with the output
  • Share relevant constraints or requirements
  • Describe the audience or purpose
3

Using examples

Examples are one of the most powerful tools in prompt engineering. Show, do not just tell.

  • Provide 1-3 concrete examples of what you want
  • Show both successful and unsuccessful examples to clarify boundaries
  • Label your examples clearly
  • Use examples matching your exact use case
4

Iterative refinement

The first output is rarely perfect. Treat AI as a conversation, not a one-shot interaction.

  • Request specific changes rather than starting over
  • Build on what works; discard what does not
  • Test variations on the prompt itself
  • Track what prompts produce your best outputs
5

Format specification

Be explicit about how you want information structured. Structure enables downstream use.

  • Request markdown, JSON, CSV, or plain text as needed
  • Specify heading levels and hierarchy
  • Ask for bulleted lists, tables, or prose as appropriate
  • Define any custom notation or structure you need

Quick examples

Weak prompt

Write me something about productivity

Strong prompt

Write a 500-word guide for software engineers on maintaining deep focus during code reviews. Use markdown headings. Include three concrete techniques with practical examples. Assume the reader works in a collaborative environment with frequent interruptions.

Download the full guide

Get email access for the complete prompt engineering playbook with 30 reusable prompt templates.

Join the newsletter

Get weekly prompts and techniques directly to your inbox.

Join readers of Leverage