Core concepts
System prompt
Definition
A system prompt is a standing instruction that shapes a model's behaviour across an entire conversation, separate from individual user messages. It typically defines persona, rules, tone and output format.
Most chat APIs separate messages by role: a system message, then alternating user and assistant messages. The system prompt sits at the top and persists, which makes it the right place for anything that should hold for every turn.
Models weight system instructions more heavily than in-conversation requests, and are more resistant to overriding them. That is deliberate — it lets application developers set guardrails a user cannot casually talk their way around.
Good system prompts are specific about behaviour in edge cases. "If the documents don't contain the answer, say so rather than guessing" is worth more than several paragraphs describing personality.
Example
System: "You are a support assistant for Acme. Answer only from the provided documentation. Cite the document name for every claim. If the docs do not cover it, say so and suggest contacting support."
Related terms
Prompt
A prompt is the input you give an AI model to produce an output. Effective prompts specify five things: the role the model should adopt, relevant context, the specific task, the output format, and any constraints.
Temperature
Temperature controls how random a model's word choices are. Low values (0-0.3) make output focused and repeatable; high values (0.8-1.2) make it more varied and creative but less reliable.
Guardrails
Guardrails are the constraints that keep an AI system inside acceptable behaviour — input validation, output filtering, topic restrictions, action limits and human approval gates.
Token
A token is the unit of text an AI model reads and writes — roughly four characters or three-quarters of a word in English. Models price by the token and cap context by the token, so token count determines both what you pay and what fits.
Tokenizer
A tokenizer is the component that splits text into tokens before a model processes it. Different model families use different tokenizers, which is why the same text can have different token counts on GPT versus Claude.
Context window
The context window is the maximum number of tokens a model can consider at once — your prompt, any attached documents, the conversation history, and the response it generates. Exceed it and the earliest content gets dropped.
Put this into practice
Understanding the term is step one. Our free courses and tools let you actually use it.