WTF is Prompt Engineering?
Iteratively designing the instructions and examples you give a model to get reliable, useful outputs.
Also called: prompting, few-shot prompting, zero-shot prompting
TL;DR
The same model can give a vague or a precise answer depending on how you ask. Prompt engineering is the craft of writing clear instructions, adding examples (few-shot), specifying output format, and testing changes. For agents it has grown into the broader discipline of context engineering.
How it works
Core techniques: clear role and task statements, zero-, one- and few-shot examples, explicit output schemas, step-by-step reasoning cues (chain-of-thought), and delimiting untrusted input. Changes should be validated with evals rather than spot checks, since a prompt tweak that fixes one case can quietly break others.
Origin
- Coined / introduced by
- LLM practitioners
- When
- 2020
- Story
- Took off after GPT-3 showed that few-shot prompts could replace task-specific training for many problems.