A system prompt is the persistent instruction block placed before a conversation that tells a language model which role to play, which rules to obey, and which style to use.
How it works
Providers slot these instructions above every user message, so they frame the whole exchange while staying invisible to the reader. A good block names the role, states the hard constraints, fixes the output shape, and lists what to refuse, in that order of importance. Because the block consumes context on every call, long preambles cost tokens and can crowd out retrieved evidence, which is why teams keep it short and move examples into the conversation or tools. It steers strongly but never guarantees obedience: hostile user text can still pull the model off script, so refusal rules get tested against injection attempts rather than trusted on paper.
Builders treat the system prompt as versioned configuration: shortest sufficient instructions, reviewed like code, and evaluated against the behaviors each release must keep.