Q: What's the difference between a system prompt and a user prompt?
The system prompt is your instructions as the developer. The user prompt is whatever the person using your app types. The model reads both, but it's trained to treat the system prompt as the rules of the game.
The system prompt sets who the model is and how it behaves: "You are a customer support assistant for Acme. Only answer questions about Acme products. Be brief. If you don't know, say so." The user never sees it, and here's the mechanical part: your code appends the system prompt at the top of every single request. Remember, the API is stateless, so every call sends the full message list, and the system prompt rides along first, every time. The model never sees a request without your rules in it, it reads them before anything the user said, and it's trained to give them priority. The user prompt is the actual question: "How do I reset my password?"
This separation is what makes AI applications controllable. Your users can type anything, and your system prompt is the layer that keeps the model on task, in character, and inside the rules. Almost every behavior change you'll ever want (tone, format, restrictions, persona) starts with editing the system prompt.
One practical warning: the system prompt is strong guidance, not an unbreakable law. Users can sometimes talk a model out of its instructions (this is called prompt injection). For real protection, you add guardrails in code around the model, not just words inside it.