Sign in
Key Concepts

System Prompts

The instructions that shape how a model behaves before a user says anything

What it is

A system prompt is a special input provided to an LLM that sets context, instructions, and constraints for how it should behave throughout a conversation. It appears before the user's messages and typically has higher priority, models are trained to follow system prompt instructions even when user messages conflict.

System prompts can instruct the model to: respond only in a certain language, adopt a specific persona, limit discussion to certain topics, use a particular format, or be aware of available tools. They're the primary mechanism by which companies customize model behavior for their products.

System prompts are not foolproof, they can be undermined through jailbreaking, and they don't override safety training baked in during RLHF.

Why it matters

Every AI product you'll work on will have a system prompt. Writing effective system prompts is a core skill, it's the difference between a model that stays on-task and one that goes off the rails. It's also relevant to security: protecting secret instructions in system prompts (like API keys or business logic) is a real concern, since users can often extract them through careful prompting.

Related concepts

Resources

Deep Dive into LLMs like ChatGPT (section: post-training conversations ~1:01:00
youtube.com· Covers how system prompts shape assistant behavior during post-training. Shows the full message format (system → user → assistant) and why system prompts matter for controlling tone, rules, and tool access.
20 min
Anatomy of AI Agents: Inside LLMs, RAG Systems, & Generative AI
youtube.com· Breaks down the internal components of AI agents (LLMs, RAG systems, and generative AI) and how they work together. Good visual intro to agent architecture.
10 min
Prompt Engineering Guide, Prompting Examples
promptingguide.ai· Interactive guide with concrete examples of system prompts and role prompting. Side-by-side comparisons showing how different system messages change output.
10 min
Chatbots Are More Than Just Their Models (Claude's System Prompt analysis)
dbreunig.com· Fascinating breakdown of a real-world system prompt (Claude's 16,000+ word system prompt). Makes abstract concept very concrete by showing what's actually in production system prompts. Great "peek behind the curtain" for recruits.
12 min
PreviousBeginning of section
NextContext Windows