Specialty Digest

Global English editionLearners’ Study Dashboard — in development
The Knowledge Library for All
Encyclopedia / Technology & Computing

Prompt Engineering

Specialty Knowledge entries in Prompt Engineering.

A staircase leading upward, a picture of chain-of-thought prompting, in which a model climbs to its answer one reasoning step at a time

Chain-of-Thought Prompting

Chain-of-thought prompting is a technique that encourages a language model to write out intermediate reasoning steps before giving a final answer. Instead of jumping directly to a result, the model produces a sequence of short statements that lead to it, much as a student shows their work. The method, often abbreviated CoT, markedly improves accuracy

Chain-of-Thought Prompting Read More »

Chain-of-thought prompting is a technique that encourages a language model to write out intermediate reasoning steps before giving a final answer, which improves accuracy on arithmetic, logic and multi-step problems.

Documents and notes spread on a desk, representing the background material supplied in contextual prompting

Contextual Prompting

Contextual prompting is the practice of supplying a language model with relevant background information, such as documents, data, conversation history or situational details, inside the prompt so that its answer fits the specific situation. A model cannot know the private facts of a user or an organization, or events after its training, unless they are

Contextual Prompting Read More »

Contextual prompting is the practice of supplying a language model with relevant background information, such as documents, data, conversation history or situational details, inside the prompt so that its answer fits the specific situation.

Flashcards laid out on a table, representing the few worked examples placed in a few-shot prompt to show a model the pattern

Few-Shot Prompting

Few-shot prompting is a technique in which a handful of worked examples of a task are included in the prompt so that a language model can infer the pattern and apply it to a new input. The examples, often called shots or demonstrations, show the format and the kind of judgment wanted. Unlike fine-tuning, the

Few-Shot Prompting Read More »

Few-shot prompting is a technique in which a handful of worked examples of a task are included in the prompt so that a language model can infer the pattern and apply it to a new input.

A red prohibition sign, a common symbol for a negative prompt, which tells an image generator what must not appear in the result

Negative Prompt

A negative prompt is an instruction to a generative model, most often an image generator, that describes what should not appear in the output. While an ordinary prompt says what to create, a negative prompt lists unwanted features, objects or styles, such as blurry, extra fingers or watermark, and nudges the model away from them.

Negative Prompt Read More »

A negative prompt is an instruction to a generative model, most often an image generator, that describes what should not appear in the output, steering the result away from unwanted features, styles or objects.

A computer terminal with a text cursor, representing the input prompt that a user gives to an artificial intelligence model

Prompt (Artificial Intelligence)

In artificial intelligence, a prompt is the input, usually text but sometimes an image, audio clip or other data, that a user or program gives a generative model to tell it what to produce. The model takes the prompt and generates a continuation or response. A prompt can be as short as a single question

Prompt (Artificial Intelligence) Read More »

In artificial intelligence, a prompt is the input, usually text but sometimes images, audio or other data, that a user or program gives a generative model to tell it what to produce.

Linked metal chain, an image for prompt chaining, where each prompt connects to the next so the output of one step becomes the input of another

Prompt Chaining

Prompt chaining is a technique in which a complex task is split into a sequence of smaller prompts, with the output of each step passed as input to the next, so that a language model handles one manageable job at a time. Instead of asking a model to research, analyze, write and format a report

Prompt Chaining Read More »

Prompt chaining is a technique in which a complex task is split into a sequence of smaller prompts, with the output of each step passed as input to the next, so that a language model handles one manageable job at a time.

A person typing on a laptop keyboard, representing the writing and refinement of prompts that guide an AI model

Prompt Engineering

Prompt engineering is the practice of designing and refining the inputs given to a generative artificial intelligence model so that it produces more accurate, useful and reliable outputs. A prompt may be a question, an instruction, a set of examples, a block of background material or a combination of these. Because large language models respond

Prompt Engineering Read More »

Prompt engineering is the practice of designing and refining the inputs given to a generative artificial intelligence model so that it produces more accurate, useful and reliable outputs.

A padlock on a keyboard, representing the security risk of prompt injection attacks against applications built on language models

Prompt Injection

Prompt injection is a security attack on applications built on language models in which crafted text, placed in a user message or hidden in content the model reads, causes the model to ignore its intended instructions and follow the attacker’s instead. It exploits a basic property of large language models: instructions and data arrive in

Prompt Injection Read More »

Prompt injection is a security attack on applications built on language models in which crafted text, placed in a user message or hidden in content the model reads, causes the model to ignore its intended instructions and follow the attacker's instead.

A mixing console with sliders and dials, a picture of prompt optimization, where wording and settings are adjusted and measured

Prompt Optimization

Prompt optimization is the systematic process of improving a prompt, by hand or with automated search, so that a language model produces better results on a defined set of test inputs according to a chosen metric. Where casual prompting relies on trial and error, optimization treats the prompt as something to be measured and improved:

Prompt Optimization Read More »

Prompt optimization is the systematic process of improving a prompt, by hand or with automated search, so that a language model produces better results on a defined set of test inputs according to a chosen metric.

A blank paper form, representing a prompt template with fixed structure and empty fields to be filled with specific data

Prompt Template

A prompt template is a reusable prompt with fixed instructions and placeholders that are filled with variable data, such as a customer name or a document, before the prompt is sent to a model. Instead of writing a new request every time, a developer or team writes the stable parts once, marks the variable parts

Prompt Template Read More »

A prompt template is a reusable prompt with fixed instructions and placeholders that are filled with variable data, such as a customer name or a document, before the prompt is sent to a model.