Skip to content
atlas

Prompt

The text you give a language model - a question, an order, pasted files - that it treats as its starting point for an answer.

Draft - this entry has not been reviewed yet.

Formal

The full input sent to a language model for one answer, often made of hidden instructions from the service owner (a "system prompt") plus the user's text and any added documents.

In plain English

Like the brief you hand a new temp - the clearer and fuller it is, the better the work, but they will follow whatever the note says.

In practice

A buyer in a region pastes a supplier contract into an approved chat assistant and writes “list the risky clauses” - the contract and the request together form the prompt.

Why it matters

Whatever goes into a prompt leaves the organisation's control and may be stored by the provider; and because the model cannot tell data from orders, text inside a prompt can steer it.

Technical deep dive

What a user types is rarely what the model receives. Chat APIs accept a structured list of messages with roles - system (or developer), user, assistant and tool - plus tool definitions and parameters. The serving stack renders this list through the model's chat template into one flat token sequence, inserting special delimiter tokens around each turn (ChatML-style markers such as im_start and im_end, or model-specific equivalents), and appends the opening of an assistant turn so that next-token prediction continues as the assistant. Tool schemas, retrieved documents, images, the current date and safety instructions added by the platform all end up in that same sequence. Using the wrong template with an open-weight model is a common cause of degraded or bizarre output.

Role markers are learned conventions, not access controls. Instruction and preference training teach the model to treat system text as higher-priority and tool output as data, and OpenAI's instruction-hierarchy work (Wallace et al., 2024) trains this explicitly, but at inference everything is tokens attending to tokens. That is the structural reason prompt injection exists: an instruction embedded in a pasted document, an email or a web page is processed by the same mechanism as a legitimate instruction. Greshake et al. (2023) named the case where the attacker never talks to the model directly indirect prompt injection; OWASP lists prompt injection as LLM01 in its 2025 Top 10 for LLM applications.

Prompt structure affects cost and latency. Input tokens are billed per request, so a long static prefix (system prompt, tool definitions, reference documents) is paid again on every call unless the provider's prompt caching reuses the precomputed KV state for an identical prefix; caching works only if the stable content comes first and the variable content last. Many assistants also support prefilling the start of the assistant turn to force a format, and stop sequences to end generation. The prompt plus the maximum requested output must fit in the context window.

From a data-protection perspective the prompt is the data flow. Everything in it is transmitted to the model operator, may be logged for abuse monitoring or debugging for a period set in the provider's terms, and may appear in the provider's telemetry. Where the prompt contains personal data the provider is typically a data processor under GDPR Art. 28, requiring a data processing agreement, and retention, training-use and region settings must be verified rather than assumed. Logging prompts on the application side is useful for audit and incident response but creates a new store of sensitive text that needs its own access control.

What to learn first

Everything this builds on, foundations first.

  1. Token
  2. →Transformer
  3. →Large language model (LLM)
  4. →Prompt

Relationships

Sources & further reading

Standards & official texts

  • NIST AI 600-1 - Artificial Intelligence Risk Management Framework, Generative AI Profile · NIST

Reference works

  • OWASP Top 10 for Large Language Model Applications · OWASP

Where this data comes from

This entry was drafted by an AI from the sources above and has not yet been checked by a person. Treat it as a starting point, and check anything important against the sources.

See the review queueSuggest a correction on GitHubThis term as JSON

Mentioned in

Check yourself

Loading…

Atlas is in beta.