Learn AI /Large Language Models /Prompt engineering
Prompt engineering
- Starter
- Large Language Models
- Communications teams
- Programme & data teams
Also called: prompt design.
Back to the milestone you came from
In five seconds
What it is
The practice of writing and refining instructions so a language model is more likely to produce a useful, safe and well-structured reply.
In plain words
It means telling the AI tool clearly what you want, what rules to follow and what shape the answer should have.
An everyday example
x
A human assistant can ask clarifying questions, use workplace judgement and recognise meaning in a richer way. A language model does not reliably do that. It generates output from patterns in data and may still produce confident but wrong results even when the instructions are clear.
Remember thisPrompt engineering refines the instructions and context that steer a model's reply. It can improve consistency and structure, but it neither changes the model's weights nor verifies the result.
This term is contested
The broad idea is widely used, but the term can be contentious because some people use it for everyday clear prompting, while others reserve it for more systematic, testable methods.
Understand it
Understand it
Why it matters
Non-specialists do not need to become engineers, but they do need to know that results depend heavily on the instructions given. A vague request can waste time, while a clear prompt can produce output that is easier to review, compare and reuse. This matters for decisions about efficiency, quality control and risk. It also helps people recognise the limits: if the model gives a polished answer, that does not mean the answer is correct. Good prompting improves usefulness, but it does not replace evidence, policy checks or human judgement.
How better prompting changes the output
Show that changing instructions, context and output format can improve a model’s response without changing the model itself.
01
1. Vague request
The user gives a short instruction with little context, such as “Summarise these messages.”
Draw a simple input card labelled “Prompt A” with one short line of text and a warning icon for missing context.
02
2. Broad output
The model produces something, but it may miss the purpose, include extra detail or use an unhelpful format.
Show an output card with mixed bullet points, some highlighted as off-target or too general.
03
3. Refined prompt
The user adds the task, audience, rules and required format, such as “Classify each message as urgent or not urgent using these criteria, then give a two-column table.”
Draw a larger input card labelled “Prompt B” with four tagged lines: task, context, constraints, format.
04
4. More usable output
The next response is more likely to match the need because the prompt gives clearer guidance.
Show a tidy table output card with columns “Urgent” and “Reason”, plus a small note: “Still check for errors.”
A four-step sequence reads left to right. It starts with a vague request, shows the broad and uneven reply, then shows a revised prompt with context and formatting rules, and ends with a more targeted reply. The diagram highlights that the main change is the input, not the underlying model.
Hover or tap each step to reveal the exact wording change and the effect on the output structure.
Describe this without the diagram
This diagram explains prompt engineering as a four-step process. First, a vague request such as “Summarise these messages” is sent to a model. Second, the model returns a broad reply that may be uneven or in the wrong format. Third, the user rewrites the prompt to include the task, context, limits and the desired format, for example a classification task with specific criteria and a table output. Fourth, the model returns a more targeted response. The main lesson is that changing the prompt can improve usefulness without changing the model itself, but the output still needs checking.
With reduced motion: A static four-panel diagram shows the same sequence without animation: vague prompt, weak output, refined prompt with labelled parts, and improved structured output with a note that human checking remains necessary.
A prompt is the text, image or other input you give a model. Prompt engineering means shaping that input carefully: stating the task, giving relevant context, setting limits, and asking for the output format you need. The goal is not magic control. The goal is to improve the chance of a useful result.
What goes in can include a role, the task, background information, examples, rules and a requested format such as bullets or a table. What happens next is that the model processes those words as tokens, which are small pieces of text, and predicts a response token by token. The wording of the prompt matters because it changes the patterns the model draws on.
What comes out is a completion: the model’s generated text, and sometimes images or other content in multimodal systems. A better prompt can make the output clearer, more relevant and easier to check. But a good prompt does not guarantee factual accuracy, fairness or compliance with policy. Human review is still needed.
Prompt engineering is often confused with fine-tuning and retrieval-augmented generation. Fine-tuning changes the model itself by additional training. Retrieval-augmented generation adds outside sources at run time. Prompt engineering usually changes only the instructions and context you provide for a particular task.
How “x” maps onto the real thing
| In the story | In the AI system |
|---|---|
| Manager’s written instructions | Prompt given to the model |
| Three urgency criteria | Constraints and context in the prompt |
| Two-column table request | Specified output format |
| Tightening the instructions after a weak first pass | Iterative prompt refinement |
A worked example
During the lessons-learned exercise, the chief of section tests a revised prompt for turning approved meeting notes into a consistent note for the file.
Starting from: Initial prompt: “Summarise the meeting notes.” Revised prompt: “Using only the approved notes below, draft text for a lessons-learned note for the file. Use three headings: What worked, What did not and Follow-up. Under Follow-up, name an owner or timing only if stated. Mark unsupported details ‘Not in record’. Use a neutral tone and no more than 180 words. Notes: Pilot users found the template useful. Outputs varied when prompts omitted the audience and format. The section will test a standard prompt and review it at the next monthly meeting.”
- The initial prompt gives the model wide latitude, so its structure and emphasis may vary.
- The chief compares the first completion with the requirements of the note for the file.
- The revised prompt adds the artefact, source boundary, headings, tone, length and a rule for missing information.
- Those elements steer next-token prediction towards the requested structure without changing the model's weights.
- The chief checks every statement against the approved notes before clearing the text.
Result: What worked Pilot users found the template useful. What did not Outputs varied when prompts did not specify the audience and format. Follow-up The section will test a standard prompt and review it at the next monthly meeting. Owner: Not in record.
In a United Nations workplace
After a drafting-assistant pilot, a chief of section at Headquarters must clear a lessons-learned note for the file before close of business. The first summaries vary in tone and omit decisions, so the chief revises the standard prompt to require fixed headings, separate decisions from follow-up actions and flag anything unsupported by the approved meeting record.
Prompt engineering turns the drafting requirement into explicit instructions, context, constraints and an output format. Testing the result and refining those elements can make later completions more consistent. It steers generation through the input; it does not change the model's weights.
Before you try thisUse only approved, non-sensitive source material. Never enter confidential, personal, protection-sensitive, security-sensitive or procurement-sensitive information into a tool not approved for it, as the information could be retained or disclosed. Prompt wording cannot make an unapproved service safe. The draft still requires human review before clearance.
Where you may hear it
- During a lessons-learned session after an AI pilot
- At a vendor demo for an office drafting tool
- In an ICT governance board review of an approved use case
- While clearing a standard prompt for a briefing-note workflow
Avoid confusion
Avoid confusion
Often confused with
Fine-tuning
Updating a pre-trained model's parameters with additional examples to improve performance on a narrower task, style or domain.
Retrieval-augmented generation
A method that first finds relevant source passages and then asks a language model to answer using that material.
System prompt
A high-priority instruction that sets the assistant’s role, rules and priorities before it responds to later messages.
User prompt
The input a person gives a chat assistant to guide what kind of response it should produce.
Side-by-side
Common misconceptions
Common misconception: Prompt engineering is a way to make the model always tell the truth.
Correction: Clear prompts can reduce confusion and ask for sources or uncertainty statements, but they do not guarantee factual accuracy. The model still generates likely text and can produce errors or invented details, so checking remains necessary.
Common misconception: It only matters for technical staff.
Correction: Anyone using a chat assistant benefits from clearer instructions. Asking for audience, purpose, constraints and format is useful in communications, administration, programme support and learning, not only in software work.
Common misconception: Prompt engineering and fine-tuning are the same thing.
Correction: They work at different levels. Prompt engineering changes the instructions for one task or session. Fine-tuning changes the model through additional training, which usually needs more data, testing and governance.
Common misconception: A longer prompt is always better.
Correction: More detail can help, but extra text can also distract the model or bury the main task. The useful pattern is relevant detail, clear structure and explicit limits, not maximum length.
Quick check
Which example best shows prompt engineering rather than fine-tuning or retrieval?
Prompt engineering changes the input you give the model for a task. Fine-tuning changes the model through training. Retrieval adds outside information. Lower latency affects speed, not instruction design.
Go deeper
Go deeper
The simple version
It means telling the AI tool clearly what you want, what rules to follow and what shape the answer should have.
The technical version
Prompt engineering is the design and iterative refinement of the input sent to a language model so that next-token prediction is steered toward a more useful completion. In practice, the prompt may include task instructions, context, constraints, examples, role framing and output formatting requirements. These elements influence which patterns in the model’s training and current context are activated during generation. This is different from changing model weights through fine-tuning, and different from retrieval-augmented generation, which adds external information at run time. Prompt engineering can improve relevance, consistency and structure, but it cannot by itself guarantee truthfulness, policy compliance or robust reasoning.
Reviewed external resources
EncyclopaediaPrompt engineering (opens in a new tab)Wikipedia
This link gives a broad, general overview of the term and suits readers who want a quick starting definition and related concepts.
Intermediatelink checked 2026-07-31
CourseLLM Course (opens in a new tab)Hugging Face
This course material suits learners who want practical, hands-on instruction about working with language models, including prompting in context.
Deeperlink checked 2026-07-31
VideoLarge language models, explained visually (opens in a new tab)3Blue1Brown
This video suits visual learners who want intuition about how large language models generate text, which helps explain why prompt wording matters.
Intermediatelink checked 2026-07-31
VideoVideo explanations: Prompt engineering (opens in a new tab)YouTube search
This is a search results page rather than one single explanation, so it suits readers who want to compare different video teaching styles on the topic.
search results, not one pagelink checked 2026-07-31
DiscussionCommunity discussion: Prompt engineering (opens in a new tab)Reddit search
This is a search results page rather than one single source, so it suits readers who want to see community questions, examples and debates about practical prompting.
search results, not one pagelink checked 2026-07-31
Where this came from
Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.
The one thing to remember
Prompt engineering refines the instructions and context that steer a model's reply. It can improve consistency and structure, but it neither changes the model's weights nor verifies the result.