A text input given to a language model to elicit a desired response.
A prompt is the input text provided to a large language model (LLM) or other generative AI system to guide its output. It serves as the primary interface between a user and the model, encoding the task, context, constraints, and any examples the user wants the model to consider. Because modern LLMs are trained to predict and generate text conditioned on prior context, the prompt effectively steers the model's behavior without modifying its underlying weights — making it a lightweight but powerful mechanism for directing AI systems toward specific goals.
Prompts can range from a single question to elaborate multi-paragraph instructions that include background information, formatting requirements, and few-shot examples. The model processes the entire prompt as context and generates a continuation or response that is statistically consistent with both its training distribution and the specific framing provided. This means subtle changes in wording, ordering, or structure can meaningfully shift the model's output, which is why prompt design has become a discipline in its own right. Techniques such as chain-of-thought prompting — where the user asks the model to reason step by step — have been shown to substantially improve performance on complex reasoning tasks.
Prompt engineering emerged as a practical field around 2020–2021, coinciding with the release of GPT-3 and the broader availability of instruction-following models. Practitioners discovered that carefully crafted prompts could unlock capabilities that appeared absent with naive inputs, effectively allowing users to adapt a single general-purpose model to diverse applications — from code generation and summarization to creative writing and data extraction — without any fine-tuning.
The centrality of prompts to modern AI workflows has significant implications for both usability and safety. Well-designed prompts improve reliability and reduce harmful outputs, while poorly constructed or adversarially crafted prompts can cause models to behave unexpectedly. As LLMs are deployed in high-stakes settings, understanding how prompts shape model behavior has become essential for developers, researchers, and end users alike.