System Prompt vs. User Prompt
Part of the Fundamentals section of Coddy's AI Prompts journey — lesson 20 of 23.
You've now seen both the system prompt and the user prompt in action. But when should you use which? Understanding the difference helps you structure your prompts more effectively.
The system prompt is for things that should persist across the entire conversation—identity, rules, and baseline behavior. The user prompt is for specific requests, questions, and task-by-task instructions.
| System Prompt | User Prompt |
|---|---|
| Who the AI is | What you're asking right now |
| Rules that always apply | One-time instructions |
| Set once, affects everything | Changes with each message |
Here's a practical example. Imagine you want a friendly tutor who explains things simply. You could put this in your user prompt every single time:
You're a friendly tutor. Explain photosynthesis simply.
Or you could put "You are a friendly tutor who explains concepts simply" in the system prompt once, then just ask:
Explain photosynthesis.
The result is the same, but the second approach is cleaner. You don't repeat yourself, and every future question automatically gets the friendly tutor treatment.
Use the system prompt for the "always" stuff. Use the user prompt for the "right now" stuff. When you separate persistent context from immediate requests, your prompts become shorter and your conversations stay consistent.
Challenge
Use the system prompt to establish that the AI always speaks like a cheerful robot (using words like "beep" or "boop"). Then, in your user prompt, ask it to list exactly 2 colors — keeping your user prompt short and simple since the personality is already set.
The AI's response must:
- Contain
beeporboop(robot personality from system prompt) - Contain exactly 2 color words (choose from here:
red,blue,green,yellow,black,pink,green,purple) - Your user prompt must be under 10 words (proving the system prompt handles the personality)
Cheat sheet
The system prompt defines persistent behavior across the entire conversation—identity, rules, and baseline behavior. The user prompt contains specific requests and task-by-task instructions.
| System Prompt | User Prompt |
|---|---|
| Who the AI is | What you're asking right now |
| Rules that always apply | One-time instructions |
| Set once, affects everything | Changes with each message |
Example: Instead of repeating "You're a friendly tutor" in every user prompt, set it once in the system prompt. Then your user prompts can be shorter and more focused on the actual question.
System prompt: You are a friendly tutor who explains concepts simply
User prompt: Explain photosynthesis.
This approach keeps prompts cleaner and conversations consistent by separating persistent context from immediate requests.
Start this challenge with Coddy's AI tutor
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
1Welcome to the AI Era
What Even Is AI?AI Is Not GoogleAI Is Not a HumanYour First Real TaskThe AI Can Be WrongWhat Is a "Model"?4The System Prompt
What Is the System Prompt?Setting Personality and RoleSetting Rules and ConstraintsSystem Prompt vs. User PromptSystem Prompt ConflictsCrafting a System PromptSystem Prompt Injection3Writing Your First Prompts
AI Talks Markdown (By Default)Controlling the Output FormatControlling Tone and StyleWhen the AI Ignores You