System Prompt
FundamentalsA special instruction given to an AI model before any user input that defines its behavior, personality, constraints, and role for the entire conversation.
A system prompt is a set of instructions provided to a language model at the beginning of an interaction that shapes how the model responds to all subsequent user messages. Unlike user messages, the system prompt is typically hidden from the end user and is set by the developer or application.
System prompts can define the model's persona ("You are a helpful coding assistant"), set boundaries ("Never provide medical advice"), specify output formats ("Always respond in JSON"), or provide context about the application. They act as persistent instructions that influence every response the model generates during a session.
In practice, system prompts are a critical part of building AI applications. They allow developers to customize a general-purpose model for specific use cases without fine-tuning. However, system prompts are not absolute constraints - they can sometimes be overridden through prompt injection attacks, which is why they should not be relied upon as a sole security mechanism.
Last updated: March 1, 2026