Opens in a new tab
3 4 5 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

What is Prompt

Definition:Prompt

A prompt is an input that communicates an instruction, question, context, or dataset to a system so that it produces a response or performs an action. In generative AI, it may combine text, images, audio, code, or other content supported by the model.

The prompt guides behavior during an interaction, but it does not by itself modify the parameters used to train the model. The result depends on the system’s capabilities, higher-level instructions, available context, and how the task is expressed.

Prompts in computing and AI

In computing, prompt also refers to the terminal indicator showing that a system is ready to receive a command. It may display the user, current directory, or a symbol such as `$` or `>`. This command prompt is an input interface, not a complete instruction.

In generative AI, the usual meaning is the content sent to the model. It may request an explanation, classification, translation, code generation, or document analysis. It can also include reference material that the answer should use.

A prompt does not train the base model with every request. Training and fine-tuning change parameters through separate datasets and processes; prompting conditions the output during inference.

How a model interprets it

The model processes the prompt together with system instructions, conversation history, tool results, and other available content. The system represents this content as AI tokens. All the material occupies part of the context window, whose limit determines how much can be considered in one interaction.

Models generate responses from learned patterns and the context received. Clear instructions can reduce ambiguity, but they do not make the output deterministic or guarantee factual accuracy. Different models or settings may interpret the same text differently.

In applications such as ChatGPT, several instruction layers may influence the result. Application and system rules take priority over a user request when they conflict. External data should be distinguished from instructions so that a document or webpage cannot improperly alter the task.

Components of a prompt

An effective prompt contains only the information needed to define the task and assess the response. Depending on the use case, it may combine these components:

  • Objective: The specific action the system should perform.
  • Context: Relevant background, data, or documents.
  • Constraints: Limits on scope, tone, length, or permitted sources.
  • Format: The expected structure, such as a list, table, JSON object, or code block.
  • Examples: Inputs and outputs that demonstrate the desired criterion.

Specific information is usually more useful than generic formulas. Identifying the audience, purpose, and available data helps bound the response. Adding a fictional persona or asking the model to act as an expert does not replace missing knowledge, sources, or criteria.

Prompting techniques

Prompting techniques organize instructions and context so that the task is easier to understand. Not every technique is needed for every request, and effectiveness varies by model and objective.

  • Zero-shot: The task is described without response examples.
  • Few-shot: One or more representative examples are included.
  • Grounding: Documents or data are provided as the basis for the output.
  • Decomposition: A complex task is divided into steps or chained requests.
  • Structured output: A schema is defined to make the result easier to validate or reuse.

Prompt engineering is the practice of designing, testing, and maintaining these instructions for a specific task. It includes comparing variants, retaining test cases, and reviewing behavior when the model, context, or application changes.

Evaluation and limits

Prompt quality is not measured by length but by the ability to produce suitable results across representative cases. An evaluation may assess accuracy, coverage, format, consistency, safety, cost, and latency according to the system’s purpose.

Prompts do not remove model limitations. A response may contain errors, invent facts, ignore part of the context, or reproduce biases. Tasks affecting important decisions need verifiable sources, additional controls, and human review when appropriate.

Prompt injection is another risk, in which untrusted content attempts to introduce instructions that conflict with the application’s objective. Protection requires separating data from instructions, limiting permissions, and validating actions rather than relying only on a sentence added to the prompt.

A sound process starts with a simple instruction and an expected result, adds context or examples when they provide value, and retests the exact version. This iterative evaluation distinguishes a reproducible improvement from a favorable response obtained by chance.