Prompt engineering

Writing and refining the instructions, examples and structure given to a model so it produces the output you need reliably.

Definition

Prompt engineering covers clear task instructions, the role the model should take, worked examples (few-shot prompting), the format of the output, and rules for edge cases. Small changes in wording can change results, so prompts are tested and iterated like code.

As systems grew into multi-step agents, the work broadened into context engineering: managing everything the model sees, not only the instruction. Prompts remain the cheapest lever to pull before retrieval, fine-tuning or a larger model.

Sources

  1. Anthropic documentation, Prompt engineering overview