Prompt engineering glossary
This prompt engineering glossary explains the words you will meet when writing prompts for chat assistants and image, video or music generators. Definitions are short and practical, with a small example where it helps.
Basics
Prompt
The input you give an AI model: a question, an instruction, examples or an image. Everything the model produces is a response to it, so its wording matters.
Prompt engineering
The practice of designing and testing prompts so a model gives useful, reliable results. It is less about magic phrases and more about clear instructions, enough context and a defined output.
Large language model (LLM)
A model trained on large amounts of text to predict the next piece of text. Chat assistants such as ChatGPT, Claude and Gemini are built on LLMs.
Token
The unit of text a model reads and writes. A token is often a short word or part of a word, so a sentence of ten words may be around thirteen tokens. Limits and API prices are counted in tokens; the token counter gives an estimate.
Context window
The maximum number of tokens a model can consider at once, including your prompt, any attached documents and its own reply. Text beyond the window is ignored or forgotten.
System prompt
Instructions set before the conversation that define the assistant's role, rules and tone for every reply. Example: You are a support agent for a bike shop. Answer in under 100 words.
User prompt
The message a person sends in a conversation, as opposed to the system prompt written by the developer or operator.
Output
The text, image, video or audio the model returns. Also called a response or completion.
Temperature
A setting that controls randomness. Low values give focused, repeatable answers; higher values give more varied, creative ones. Usually available only through an API or advanced settings.
Top-p
Another sampling setting that limits the model to the most likely words whose probabilities add up to p. It is usually adjusted instead of temperature, not together with it.
Hallucination
A confident answer that is false or invented, such as a citation to a paper that does not exist. Asking for sources, providing reference text and checking facts reduce the risk.
Knowledge cutoff
The date after which a model has no training data. Unless it can search the web, it will not know about later events.
Prompt structure
Role prompting
Telling the model who to be, for example Act as an experienced tax accountant. A role sets vocabulary, depth and point of view.
Instruction
The core task, written as a direct verb: summarize, compare, rewrite, list. One clear instruction works better than several vague ones.
Context
Background the model needs to do the task well: audience, purpose, constraints, prior decisions. Missing context is the most common reason for generic answers.
Constraints
Limits on the answer, such as length, reading level, words to avoid or facts that must be included. Example: Maximum 150 words, no jargon.
Output format
The shape of the answer: a table, bullet list, JSON object, email or code block. Naming the format saves a round of editing.
Delimiters
Markers that separate instructions from data, such as triple quotes, Markdown headings or XML-style tags like <document>. They help the model tell your text apart from your instructions.
Placeholder
A slot in a template, usually written in square brackets, that you replace with real details: [product name], [audience].
Prompt template
A reusable prompt with placeholders for the parts that change. The prompt library is a collection of such templates.
Techniques
Zero-shot prompting
Asking for a task without giving any examples. It works well for common tasks that the model already understands.
Few-shot prompting
Including a few input-and-output examples so the model copies the pattern. Useful for a specific tone, label set or format.
Chain-of-thought
Asking the model to reason step by step before giving the final answer. It can improve accuracy on maths, logic and planning tasks.
Reasoning model
A model designed to work through a problem internally before replying. These models often need less step-by-step instruction and benefit more from a clear goal and success criteria.
Task decomposition
Breaking a large request into smaller steps, such as outline first, then draft each section, then edit.
Prompt chaining
Feeding the output of one prompt into the next. Example: extract key points from a report, then turn those points into a slide outline.
Iterative refinement
Improving a result through follow-up messages: shorter, more formal, add an example for beginners. Most good outputs take two or three rounds.
Self-consistency
Generating several answers to the same question and choosing the one that appears most often or holds up best. Helpful when a single answer may be unreliable.
Meta-prompting
Asking a model to write or improve a prompt for you. Enhance with AI and the prompt rewriter are forms of meta-prompting.
Retrieval-augmented generation (RAG)
A setup in which relevant documents are retrieved and added to the prompt so the model answers from them rather than from memory alone.
Grounding
Tying an answer to supplied sources. Example: Answer only from the text below; if the answer is not there, say so.
Structured output
Requesting data in a strict format, often JSON with named fields, so another program can read it without manual cleanup.
Tool use (function calling)
A feature that lets a model request an external action, such as searching, running code or calling an API, and then use the result in its reply.
Persona consistency
Keeping the same voice, rules and facts across a long conversation, usually by stating them in the system prompt instead of repeating them in each message.
Image and video generation
Text-to-image
Creating an image from a written description. Good prompts cover subject, setting, lighting, composition and style.
Diffusion model
A type of generator that starts from random noise and removes it step by step until an image matching the prompt appears. Stable Diffusion and many other image tools work this way.
Negative prompt
A list of things you do not want in the result, such as blurry, extra fingers, watermark. Supported directly by some tools; others expect you to describe what you want instead. See the negative prompt generator.
Aspect ratio
The width-to-height shape of the image or video, such as 16:9 for widescreen or 9:16 for vertical social video. In Midjourney it is set with --ar 16:9.
Seed
A number that fixes the starting noise. Reusing the same seed with the same prompt and settings gives similar results, which is useful for testing small changes.
Prompt weighting
Giving some words more or less influence. In Stable Diffusion interfaces this is often written as (golden hour:1.3).
Guidance scale (CFG)
How strictly a diffusion model follows the prompt. Higher values stick closer to the text but can look harsh; lower values are looser and more natural.
Style reference
An image supplied to guide the look of a new image without copying its content.
Image-to-image
Generating a new image from an existing one plus a prompt, keeping some of the original's layout or colors.
Inpainting and outpainting
Inpainting regenerates a selected area inside an image, for example to replace an object. Outpainting extends the image beyond its original borders.
Upscaling
Increasing an image's resolution, often adding detail in the process.
Image-to-prompt
Describing an existing picture as a prompt so you can recreate its style or composition. Read more on the image to prompt page.
Text-to-video and image-to-video
Generating a clip from a description, or animating a still image as the first frame. Video prompts add motion, timing and sound to the usual image details.
Shot type
How close the camera is to the subject: wide shot, medium shot, close-up, extreme close-up. Naming it gives you control over framing.
Camera movement
How the virtual camera moves during a clip: pan, tilt, dolly in, tracking shot, handheld, static. Example: slow dolly in toward the singer.
Style and structure tags (music)
In music generators, a style description sets genre, mood and instruments, while section tags such as [Verse] and [Chorus] organize the lyrics you write.
Evaluation and safety
Evaluation (eval)
A repeatable test of how well a prompt performs, usually by running it on a set of sample inputs and checking the outputs against expectations.
Rubric
A list of criteria used to judge outputs, such as accuracy, completeness, tone and format. You can include a rubric in the prompt so the model checks its own work.
Prompt injection
A security risk where text inside a document, web page or email contains hidden instructions that try to override the original prompt. Treat external text as data and keep instructions separate.
Guardrails
Rules and filters that keep a model's behavior safe and on topic, set by the provider, the developer or the system prompt.
Bias
Systematic skew in outputs that reflects patterns in training data, for example stereotyped job descriptions. Reviewing outputs and asking for balanced perspectives help.
Human in the loop
A workflow in which a person reviews, edits or approves AI output before it is used. Essential for anything published, legal, medical or financial.
AI text detector
A tool that estimates how likely a text is to be machine-generated, based on patterns such as predictability and sentence uniformity. Results are probabilities, never proof of authorship.
Watermarking
A hidden signal some providers add to generated images, audio or text to help identify AI content later. Not every model uses it, and it can be weakened by editing.
Prompt score
A quick quality rating based on checks such as clarity, context, constraints and format. The prompt checker gives a score from 0 to 100 with suggestions.
Updated: