Prompt Engineering

Writing the input to a model deliberately — with context, examples and constraints — to get a more reliable output.

Generative AI Beginner 1 min read Start here

Definition

Prompt engineering is the practice of structuring what you send a model so the output is more reliable. In practice that means supplying context the model cannot infer, showing examples of the format you want, stating constraints explicitly, and giving the model an explicit way to decline rather than forcing it to invent.

The name oversells it somewhat — much of it is simply clear technical writing. But the effect sizes are real: the same model given a well-specified prompt and a vague one behaves like two different systems.

Key points

Examples usually beat instructions
Give the model a way to say "I do not know"
Constraints stated once are ignored less often than constraints implied

How it relates to other terms

See also Few-Shot Learning Giving a model a handful of worked examples in the prompt so it infers the pattern you want. See also Chain-of-Thought Prompting a model to work through its reasoning step by step before answering, which measurably improves multi... Contrast with Fine-Tuning Continuing to train an existing model on a smaller, specific dataset so it adapts to a particular task, domain...
Referenced by

Related terms

A setting that controls how much randomness goes into choosing each token — low is predictable, high is varied.

Beginner Generative AI

A generative model that learns to reverse a gradual noising process, turning random noise into an image step by step.

Advanced Generative AI

Was this definition helpful?

Definitions are reviewed by our editorial team. Spotted a problem? Tell us.