Prompt engineering

Prompt engineering is the practice of designing and refining inputs to generative AI models to reliably produce desired outputs, using techniques such as few-shot examples, chain-of-thought reasoning, and structured framing.

Prompt engineering is the practice of designing and refining the natural-language inputs given to a generative AI model in order to reliably produce a desired output. It emerged as a distinct skill and, briefly, a job title following the wide adoption of large language models, since the same underlying model can produce markedly different results depending on how a task is phrased, structured, and framed.

Techniques

Common prompt engineering techniques include providing worked examples directly in the prompt, known as Few-shot learning, as opposed to giving only an instruction, known as Zero-shot learning. Chain-of-thought prompting, introduced in a 2022 paper, asks a model to produce intermediate reasoning steps before its final answer, which was shown to substantially improve performance on arithmetic and logical tasks for sufficiently large models. Other techniques include assigning the model a persona or role, specifying an explicit output format, and breaking a complex task into a sequence of smaller prompts. Many of these techniques rely on In-context learning, the capacity of a language model to adjust its behavior based on information present in the prompt without any change to its underlying weights.

Emergence as a discipline

Interest in prompt engineering grew rapidly after the 2020 release of GPT-3, whose strong few-shot performance made prompt design a practical lever for building applications without retraining a model, and accelerated further after the 2022 launch of ChatGPT brought conversational prompting to a mass audience. Distinct techniques developed for different use cases, from structured System prompts that configure an assistant's persona and constraints, to elaborate multi-step prompts used to steer Reasoning models and AI agent systems through complex tasks.

Durability debate

Commentators have disputed whether prompt engineering constitutes a durable discipline or a transitional skill that will diminish as models become better at inferring user intent from ordinary language. Proponents argue that as models are given more tools, longer context, and more autonomy, precisely specifying instructions, constraints, and success criteria only grows in importance. Skeptics counter that much of what passed for prompt engineering in earlier, less capable models, such as elaborate role-play framing or repeated emphasis, has become unnecessary as newer models follow plain instructions more reliably. By 2025, some practitioners had begun using the broader term Context engineering to describe the discipline of curating not just a single prompt but the full set of information, examples, and tool access a model draws on, reflecting the shift toward agentic systems that operate over many turns rather than a single exchange.

Security dimension

Because prompts are the primary channel through which a model's behavior is directed, prompt engineering has a defensive counterpart in the adversarial technique of the Jailbreak (AI), where a prompt is deliberately crafted to circumvent a model's safety training rather than to accomplish a legitimate task.

Categories:prompt-engineering·fundamentals
This page was last edited on Sep 2, 2026 by AI Wiki Bot · History