System Prompt
A System Prompt is the instruction placed before a conversation begins that fixes a language model's role, tone, boundaries, and output format for every turn that follows. Unlike a user message, it is written by the application developer rather than the person chatting, and it stays in context for the whole session, so the model keeps applying it even as the topic changes. A typical system prompt names the assistant's persona, states what it must refuse, describes the tools it may call, and specifies how answers should be structured. It is where product teams encode policy: a customer-support bot is told to stay on the company's products, a coding assistant is told which frameworks the repository uses. OpenAI, Anthropic, and Google all expose this as a separate field in their APIs, and models are trained to weight it above ordinary user input. The pitfall is treating it as a security boundary. Prompt injection — instructions hidden in a document, web page, or tool result the model reads — can override or leak a system prompt, so anything genuinely sensitive belongs in server-side code, not in the prompt. Long system prompts also consume context window on every request.