What is a system prompt?
A system prompt is a set of instructions given to an AI before the conversation starts. It’s how you tell the model who it is, what it should do, and how it should behave. The user never sees it, but it shapes every response.
When you use an AI product, there’s usually a system prompt running behind the scenes. When you chat with a customer support bot that only talks about software products and refuses to go off-topic, that behavior is defined in a system prompt. When Claude introduces itself a certain way or follows specific formatting rules, that’s the system prompt at work.
Developers who build with AI APIs set the system prompt themselves. It might define a persona, constrain the model to a topic, specify a response format, or provide context the model needs to do its job. A well-written system prompt is the difference between a generic AI response and one that feels purpose-built for your product.
System prompts are also where RAG content gets injected. When a retrieval system finds relevant documents, it typically inserts them into the system prompt or alongside it so the model has that context before generating a response.
Writing good system prompts has become a real skill. Too vague and the model wanders. Too rigid and it becomes brittle. The best ones are clear about the goal, give the model enough context to make good decisions, and leave room for it to be useful in ways you didn’t anticipate.
I write system prompts constantly. Every AI tool I build starts with one. Getting them right takes iteration, and reading the model’s responses carefully to understand where the instructions are landing versus where they’re being ignored.