Glossary
AI engineering

Prompt engineering

Prompt engineering is the practice of structuring the input to a language model — instructions, examples, context, and format — to get more reliable and useful outputs.

Because a model's behavior is shaped entirely by its input, small changes in wording, ordering, and examples can produce large changes in output. Prompt engineering is the discipline of making those choices deliberately: stating the task clearly, showing examples, supplying context, and specifying the output format.

It matters most at the edges of a model's ability, where the difference between a vague and a precise prompt is the difference between a usable and an unusable result. It is also where cost is shaped: front-loading the stable parts of a prompt makes prompt caching effective.

More ai engineering terms