Stockertim Dictionary · Artificial intelligence
Prompt engineering
Also called prompt design, prompt crafting
In short
Prompt engineering is the practice of designing, testing and improving prompts so that an AI model's outputs are reliably useful for a particular task.
- Beginner
- Process
- Checked
In detail
Prompt engineering treats a prompt as something to be designed and tested, not typed once and hoped for. The work starts with a clear task and a definition of a good answer, then builds a prompt from parts: the task, the context, examples, the output format, the constraints and the success test. Each part is chosen because it fixes a likely fault.
The testing step is what turns tips into engineering. A candidate prompt is run on a set of realistic cases, the outputs are scored against a rubric, and the prompt is revised to fix the faults found. Two versions are compared on exactly the same cases, so a change is kept only if it helps. One impressive answer proves little, because outputs vary between runs.
At work, prompt engineering ranges from an individual tidying up a request to a team maintaining tested templates for customer replies or data extraction. It does not replace checking: even a well-tested prompt can produce errors on unusual inputs, so outputs that matter are still reviewed by a person.
Worked example
Harbour Foods wants supplier emails sorted into five categories and tests two prompts on the same 20 emails.
- Weak prompt: "Sort these emails." scores 14 / 20 = 70% correct.
- Improved prompt: "Label each email as one of: order, invoice query, delivery issue, complaint, other. Give the label only." scores 18 / 20 = 90% correct.
- Reason: the improved prompt names the allowed labels and the exact format, removing guesswork.
The improved prompt is kept, and the two remaining errors are studied before the next revision.
In practice
Teams keep a test set and a change log for important prompts, store working versions in a library, and rerun tests whenever the prompt, the model or the source documents change.
Watch out
- Prompt engineering is not a set of magic phrases; the gains come from clarity, examples and testing.
- A prompt that works for one model or tool may behave differently in another, so retest after a switch.
Learn it properly
Official sources
- Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile · National Institute of Standards and Technology
- NIST AI RMF Playbook · National Institute of Standards and Technology
Facts last checked on 3 November 2026.
Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.