prompt engineering
In plain wordsThe skill of writing requests to an AI — picking the words, examples, format and background information it receives — so that it reliably gives the result you want, without retraining it.
The practice of steering a generative model entirely through its input: drafting promptsprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results., trying them on representative cases and revising them until the outputs are reliably what is wanted, with the weightsweights, n.: The learned numbers inside a neural network that set how strongly each part influences the next. The finished set of weights is, in effect, the trained model itself. left untouched. Its tools concern what the prompt contains — an explicit statement of the task, audience and success criteria, background and reference material, and worked examples (few-shot promptingfew-shot prompting, n.: Showing an AI a handful of examples of a task — inputs with the answers you want — inside the prompt, so it can copy the pattern for a new case.); how it is framed — standing instructions in the system promptsystem prompt, n.: Background instructions given to a chatbot before the conversation starts, setting its role, rules, tone and tools. Users usually never see it, but it shapes every reply., an assigned role (role promptingrole prompting, n.: Telling an AI to take on a part — 'You are an experienced tax accountant' — so that its answers adopt that role's knowledge, vocabulary and tone.) and a required output format or schema, sometimes enforced by prefillingprefill, n.: The first stage of an AI's reply, in which it reads your whole prompt in one go before it starts writing. Long prompts make this stage take longer. the start of the reply; and how the work is staged — asking for step-by-step reasoning (chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate.) or splitting a job across a sequence of calls (prompt chainingprompt chaining, n.: A way of getting a big job done with a relay of AI requests: each handles one stage and passes its result to the next — pull out the facts, write, polish — with automatic checks between stages.). Good practice treats prompts like code — versioned, evaluated against test sets and revised when the model changes — because prompt sensitivityprompt sensitivity, n.: The way an AI's answers, and its test scores, can change a lot after small changes to a prompt that should not matter — a different word, an extra space or examples in another order. can make small wording changes matter. Automated methods search over prompts with an optimizer or another model (prompt optimizationprompt optimization, n.: Using software, often another AI model, to search automatically for the wording and examples that make an AI model perform best on a task, instead of tweaking prompts by hand.). From 2025, the broader framing of context engineeringcontext engineering, n.: Managing an AI model's reading material: choosing, trimming and arranging the instructions, documents, tool results and memories it is given on every turn, so that it has what the task needs and little else. emphasizes managing everything that enters the context window, especially for agents.
Most of the accuracy gain came from prompt engineering: clearer criteria and two worked examples.
Origin
Emerged with GPT-3 in 2020–2021, when users found that phrasing strongly shaped results: Gwern Branwen wrote of 'prompt programming' in 2020 and Laria Reynolds and Kyle McDonell used the same phrase in a 2021 paper. OpenAI's CLIP paper (early 2021) already referred to the prompt-engineering discussion around GPT-3, and the term spread through research surveys and the text-to-image community. After ChatGPT it became a job title and a cultural touchstone (see prompt engineerprompt engineer, n.: A person whose job is writing and testing the instructions given to AI models so they behave reliably; hyped in 2023 as a six-figure job anyone could learn, the role has since largely merged into ordinary engineering.).
Usage note
Its long-term importance is debated: some argue that better models and automatic optimizers make it obsolete, others that stating intent clearly will always matter. Distinguish from prompt tuningprompt tuning, n.: Teaching a frozen language model a new task by learning a few made-up 'words' — lists of numbers rather than real text — that are placed before the input to steer the model., which learns continuous prompt vectors by gradient descent.
Related
- promptprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results.
- system promptsystem prompt, n.: Background instructions given to a chatbot before the conversation starts, setting its role, rules, tone and tools. Users usually never see it, but it shapes every reply.
- few-shot promptingfew-shot prompting, n.: Showing an AI a handful of examples of a task — inputs with the answers you want — inside the prompt, so it can copy the pattern for a new case.
- chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate.
- role promptingrole prompting, n.: Telling an AI to take on a part — 'You are an experienced tax accountant' — so that its answers adopt that role's knowledge, vocabulary and tone.
- prompt optimizationprompt optimization, n.: Using software, often another AI model, to search automatically for the wording and examples that make an AI model perform best on a task, instead of tweaking prompts by hand.
- context engineeringcontext engineering, n.: Managing an AI model's reading material: choosing, trimming and arranging the instructions, documents, tool results and memories it is given on every turn, so that it has what the task needs and little else.
- prompt sensitivityprompt sensitivity, n.: The way an AI's answers, and its test scores, can change a lot after small changes to a prompt that should not matter — a different word, an extra space or examples in another order.
- fine-tuningfine-tuning, n.: Taking an AI model that has already learned a lot and training it a little more on a smaller, focused set of examples so it gets better at one job or behaves a certain way.
- prompt tuningprompt tuning, n.: Teaching a frozen language model a new task by learning a few made-up 'words' — lists of numbers rather than real text — that are placed before the input to steer the model.
Sources
- Liu, P., Yuan, W., Fu, J., Jiang, Z., Hayashi, H. & Neubig, G. (2023). Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing. ACM Computing Surveys 55(9). arxiv.org/abs/2107.13586v1
- Reynolds, L. & McDonell, K. (2021). Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm. CHI 2021 Extended Abstracts.
Mentioned in
chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate., fine-tuningfine-tuning, n.: Taking an AI model that has already learned a lot and training it a little more on a smaller, focused set of examples so it gets better at one job or behaves a certain way., promptprompt, n.: The message or instructions you give an AI system — a question, a request, some examples or a document — that it responds to. Clearer prompts generally get better results., activation steeringactivation steering, n.: Changing an AI model's behavior by adjusting the internal numbers it computes while it runs — like turning a hidden dial — instead of rewording the prompt or retraining the model., AI engineeringAI engineering, n.: The craft of building useful, reliable products on top of AI models — choosing models, writing prompts, connecting data and tools, testing quality and running it all safely at scale., context engineeringcontext engineering, n.: Managing an AI model's reading material: choosing, trimming and arranging the instructions, documents, tool results and memories it is given on every turn, so that it has what the task needs and little else., few-shot promptingfew-shot prompting, n.: Showing an AI a handful of examples of a task — inputs with the answers you want — inside the prompt, so it can copy the pattern for a new case., GPT-3GPT-3, prop. n.: A huge 2020 OpenAI language model that could perform new tasks simply from instructions or a few examples written into its prompt, without retraining. It made prompting a new way of programming., negative promptnegative prompt, n.: A second prompt listing what you do not want in a generated image — 'blurry, extra fingers, watermark' — which the generator then steers away from., prompt chainingprompt chaining, n.: A way of getting a big job done with a relay of AI requests: each handles one stage and passes its result to the next — pull out the facts, write, polish — with automatic checks between stages., prompt engineerprompt engineer, n.: A person whose job is writing and testing the instructions given to AI models so they behave reliably; hyped in 2023 as a six-figure job anyone could learn, the role has since largely merged into ordinary engineering., prompt sensitivityprompt sensitivity, n.: The way an AI's answers, and its test scores, can change a lot after small changes to a prompt that should not matter — a different word, an extra space or examples in another order., prompt templateprompt template, n.: A reusable prompt with blanks to fill in — for example, 'Summarize this email for a busy manager: {email}' — so a program can send the same tested instructions with different content each time., role promptingrole prompting, n.: Telling an AI to take on a part — 'You are an experienced tax accountant' — so that its answers adopt that role's knowledge, vocabulary and tone., Software 3.0Software 3.0, n.: Andrej Karpathy's name for programming computers by writing plain-language instructions for AI models, following traditional code (Software 1.0) and trained neural networks (Software 2.0)., steeringsteering, n.: Guiding what an AI model does — its topic, tone or behavior — while it runs, by changing its instructions, its internal signals or how its next word is chosen, rather than by retraining it., capability elicitationcapability elicitation, n.: The work of drawing out the best an AI can do on a test — with better instructions, tools, retries or extra training — so that its abilities are not underestimated., context distillationcontext distillation, n.: Training a model to behave as if it had been given a long set of instructions, so it no longer needs to read those instructions every time., DSPyDSPy, prop. n.: A free software framework in which programmers describe what each step of an AI pipeline should do, and the framework automatically works out good prompts and examples instead of hand-writing them., English is the hottest new programming languageEnglish is the hottest new programming language, phr.: A catchphrase meaning that people can now get computers to do things by describing what they want to an AI in ordinary language, instead of writing code., prefix tuningprefix tuning, n.: Customizing a frozen language model by learning a short sequence of invisible 'virtual words' that is placed in front of every input at every layer, steering what the model produces., prompt managementprompt management, n.: Treating the written instructions given to AI models like valuable code: storing them in one place, tracking every change, testing new versions and rolling back bad ones., prompt optimizationprompt optimization, n.: Using software, often another AI model, to search automatically for the wording and examples that make an AI model perform best on a task, instead of tweaking prompts by hand., prompt tuningprompt tuning, n.: Teaching a frozen language model a new task by learning a few made-up 'words' — lists of numbers rather than real text — that are placed before the input to steer the model.