An AI prompt is the input supplied to an artificial-intelligence system to elicit a response, prediction, transformation or other model behaviour. In a generative AI system, a prompt commonly consists of natural-language instructions, questions, context, examples or constraints, but it can also contain images, audio, structured data, source code, documents or combinations of modalities. For a large language model, the prompt is generally transformed into tokens and incorporated into the model's context before inference.
The model then generates or predicts an output according to its learned parameters and runtime settings. A prompt is therefore not equivalent to a traditional program because it normally does not specify an exact deterministic sequence of machine instructions. It is an input to a learned probabilistic system whose behaviour depends on the model, its training, context, decoding configuration and surrounding system instructions or tools.
Prompts can serve several different functions. A direct question asks for information or an answer; an instruction requests a particular action such as summarising, translating or rewriting; contextual material provides information needed to perform the task; examples demonstrate a desired input-output relationship; and constraints specify requirements such as length, format, tone, audience or allowed sources. A prompt can combine these elements into a structured request.
For example, a user might provide a document, state that it should be summarised for a technical audience, specify a maximum length and request a particular output format. The prompt therefore acts as an interface between the user's intent and the model's inference process. More context can improve performance when it is relevant and accurate, but excessive or conflicting context can make the task harder by consuming context capacity or creating ambiguity.
In language models, prompts are converted into tokens rather than being processed as abstract concepts exactly as a human reader would interpret them. Tokenisation divides text into units determined by the model's tokenizer, which may correspond to words, word fragments, punctuation or other sequences. The resulting token sequence forms part of the model's context window. Context length limits how much information can be processed at once, although the precise limit depends on the model and system.
The model predicts subsequent tokens based on the context and its learned parameters. This explains why wording, ordering and formatting can influence outputs even when two prompts express similar human-level meanings. It also explains why long documents may require careful selection or summarisation before being supplied to a model. The prompt is thus both a semantic instruction and a concrete sequence of input tokens subject to technical constraints.
Prompt structure can significantly affect the reliability and usefulness of model outputs. Clear instructions generally reduce ambiguity, while explicit constraints can make the desired output easier for the model to infer. Examples can demonstrate a format or reasoning pattern without requiring the user to describe every rule abstractly; this is commonly called few-shot prompting. A single instruction without examples is often called zero-shot prompting, while one or several examples provide increasingly explicit demonstrations.
Prompts can also specify the intended audience, domain terminology, source material, output schema and criteria for success. However, prompt wording is not a formal guarantee of compliance. A language model can misinterpret an instruction, follow conflicting contextual information, produce unsupported claims or fail to respect a requested format. For reliable applications, prompt design is therefore usually combined with validation, tool constraints, retrieval, structured outputs and other engineering controls.
Modern AI systems frequently distinguish between different sources of contextual instructions. A system may receive system-level instructions, developer instructions, user prompts, retrieved documents, tool outputs and conversation history. The exact hierarchy depends on the AI product or API. This means that the visible user prompt may not constitute the entire context used during inference. A model can also receive hidden application state, retrieved information or tool results.
Prompt injection is a security problem in which untrusted content attempts to influence the model's instructions, particularly when a model is connected to tools or sensitive data. A malicious document might contain text instructing an AI agent to ignore its intended task and disclose information. Secure AI systems therefore distinguish trusted instructions from untrusted content and constrain tool permissions rather than assuming that a prompt alone can establish a security boundary.
A prompt can be used with both generative and non-generative AI systems. In a language model, it may request text generation, classification, extraction, reasoning or transformation. In an image-generation system, it may describe a desired scene or visual characteristics. Multimodal systems can accept combinations such as an image plus textual instructions. In an API, a prompt may be represented as structured messages rather than one plain string, and additional parameters can control output length, sampling and other behaviour.
Prompting can also supply demonstrations, schemas or retrieved reference material. The same natural-language prompt may produce different results across models because different models have different training distributions, capabilities, context handling and instruction-following behaviour. A prompt therefore cannot be considered independently from the model and application in which it is executed.
Effective prompting has practical limitations. It cannot reliably create knowledge that the model does not possess or provide access to information that is absent from its context unless the system has a retrieval or tool mechanism capable of obtaining it. Adding “be accurate” or “do not hallucinate” does not itself guarantee factual correctness. Highly detailed instructions can sometimes improve consistency, but unnecessary complexity can introduce contradictions or consume valuable context.
Prompts can also encode bias through their assumptions, framing or requested categories. For production systems, prompt evaluation should therefore involve representative test cases, adversarial examples, edge cases and regression tests. If exact output structure is important, structured-generation mechanisms or schema validation are generally more reliable than relying solely on natural-language instructions. Prompt security also requires treating external text as data rather than automatically as authoritative instructions.
An AI prompt is therefore best understood as an input specification for an AI inference process, particularly one involving a generative model. It can contain instructions, questions, examples, context, constraints and multimodal inputs, and its effect depends on the model and complete runtime context. Prompting differs from prompt engineering because a prompt is the individual input, whereas prompt engineering is the broader practice of designing, testing and refining prompts and associated interaction strategies.
Prompting also differs from programming: a program normally specifies executable logic under formal language semantics, whereas a natural-language prompt communicates desired behaviour to a learned model with probabilistic and context-dependent responses. In practical AI systems, prompts are most effective when they provide relevant context, clearly define the task, constrain the desired output and are tested against realistic examples. They remain one component of a larger system rather than a complete substitute for data, model capability, retrieval, validation or application logic.