Skip to content
Eldan.ai
Glossary

System prompt

A system prompt is the developer-written part of a prompt that sets the model's role, rules and output format for the whole conversation.

Models give it extra weight, but it is guidance, not enforcement. A determined user or a hostile document can still talk the model out of following it.

A good system prompt states the task, the audience, the allowed tools and the format of the answer, and says what to do when the input is out of scope. It is also the first place people look for secrets, so assume that its content can be extracted.

Common mistake. Relying on the system prompt as a security boundary, for example “never reveal the admin password”. A request in the prompt is not an access control.

In practice. Keep secrets and permissions in code. Use the system prompt for behaviour and style, and test it with adversarial inputs.

  • Prompt

    A prompt is everything you send to a model in one request: instructions, examples, the conversation so far, retrieved documents and the user's input. The model produces its reply from this text alone. Because outputs depend entirely on the prompt, it deserves the same version control and testing as code.

  • Prompt injection

    Prompt injection is an attack in which text the model reads, typed by a user or hidden in an email, web page or document, contains instructions that override the developer's intent. Indirect injection arrives through retrieved or tool-supplied content. It cannot be fully filtered out, so defences have to limit what a persuaded model can do.

Cite this page

Eldan Abdrashim. "System prompt." Eldan.ai, 23 November 2026. https://eldan.ai/glossary/system-prompt.

The date you read it is added when you copy.

BibTeX

@online{abdrashim2026system,
  author = {Eldan Abdrashim},
  title = {System prompt},
  organization = {Eldan.ai},
  date = {2026-11-23},
  year = {2026},
  month = nov,
  url = {https://eldan.ai/glossary/system-prompt},
  langid = {english}
}

All terms

Section: Models and context. Last updated 23 Nov 2026.