AI & Generative Media

Prompt Engineering

Also known as: Prompt Design, Prompting

The practice of crafting effective instructions for AI models to elicit desired outputs, a key skill for working with language models.

Prompt engineering is the practice of designing effective inputs for AI language models to achieve desired outputs. As models have become more capable, prompting has evolved from simple questions to sophisticated techniques.

Key Techniques

  • Zero-shot: Direct instructions without examples
  • Few-shot: Providing examples of desired output format
  • Chain-of-thought: Asking the model to reason step-by-step
  • Role prompting: Assigning the model a specific persona
  • System prompts: Setting overall context and constraints

Best Practices

  • Be specific about desired format and length
  • Break complex tasks into steps
  • Provide relevant context
  • Iterate based on outputs
  • Use delimiters to separate sections

Applications

Effective prompting dramatically improves results for:

  • Code generation
  • Writing and editing
  • Analysis and summarization
  • Creative tasks
  • Data extraction

Limitations

Prompt engineering is partly art, partly science. What works for one model may fail on another, and techniques evolve as models improve.