What is Prompt Engineering?
Also called prompting.
Prompt engineering is the practice of designing and refining the input to a model to get more reliable output. It covers wording instructions precisely, supplying examples, specifying output format, decomposing a task into steps, and testing variants against measured results. It works because a model's behavior is highly sensitive to how a request is framed and structured.
The reliable techniques are unglamorous. State the task explicitly rather than implying it, describe the exact output format expected, provide two or three representative examples, give the model the context it needs instead of assuming it has that context, and say plainly what to do when the input is unclear or the answer is genuinely unknown.
Evaluation is what separates prompt engineering from guesswork. A prompt that works on three hand-picked inputs frequently fails on the fourth, so serious work maintains a fixed set of representative test cases and scores every change against it. Without that, prompt edits are driven by anecdote and quietly reintroduce failures that an earlier edit had already fixed.
Two beliefs cause most of the wasted effort in this area. The first is that magic phrases, flattery, or threats meaningfully improve results, when clear task descriptions matter far more. The second is that a prompt transfers cleanly between models. It often does not, because different families were instruction-tuned differently, so prompts should be retested after any model change.
The discipline is also shifting under its own feet. Newer models handle vaguer instructions well and increasingly perform their own step-by-step reasoning, which makes several older tricks unnecessary or even counterproductive. What remains durable is being explicit about the task, the output format, the constraints, and the behavior expected when something goes wrong.
Key points
- Behavior is highly sensitive to wording, structure, and examples.
- Specify the task, the output format, and what to do when unsure.
- Test prompts on a fixed set of cases, not on a few favorites.
- Prompts often do not transfer between model families.
In practice
'Summarize this feedback' returns a paragraph of variable length and focus. Replace it with: 'Return exactly three bullets. Each names one concrete complaint in under twelve words. If the text contains no complaint, return the single word NONE.' The output becomes consistent enough to store in a database, and the empty case is now defined rather than invented.