Prompt Engineering

Prompt engineering is the craft of writing and structuring inputs so a frozen pretrained model does what you want—without updating weights. It is product logic expressed as text: roles, constraints, examples, and output formats.

Unlike prompt tuning (learned soft prompts), prompt engineering edits readable hard prompts and system prompts. Iteration is empirical: change wording, measure task metrics, keep versioned templates.

Common techniques

  • Clear instructions and schemas (JSON keys, bullet rules)
  • Zero-shot vs few-shot exemplars
  • Chain-of-thought for multi-step reasoning
  • Separating system policy from user content

Example

Weak: The movie was okay.
Stronger: Classify the sentiment as Positive, Negative, or Neutral. Review: "The movie was okay."

Prompt engineering does not replace retrieval, tools, or fine-tuning when the model lacks facts or format fidelity—but it is the cheapest first lever.

← Back to AI Glossary