System Prompt Conflicts
Part of the Fundamentals section of Coddy's AI Prompts journey. Lesson 21 of 23.
What happens when your system prompt says one thing, but your user prompt says another? This is a conflict, and understanding how the AI resolves it helps you write better prompts.
Imagine this system prompt:
Always respond in formal English. Never use contractions.
Then you send this user prompt:
Reply casually, like you're texting a friend. What's the weather like today?
Now the AI is stuck.
The system prompt demands formality. The user prompt demands casual language. Which wins?
Generally, the system prompt takes priority, but not always absolutely. How firmly it holds depends on the model: large models usually side with the system prompt, while small models often follow whichever instruction came last. The AI tries to balance both, which can produce awkward, inconsistent results. It might respond formally but attempt a friendly tone, creating a strange hybrid.
Conflicts also happen within a system prompt. Consider:
Keep responses under 50 words. Always provide detailed, thorough explanations.
These rules contradict each other. The AI can't be both brief and thorough, so it compromises, often satisfying neither requirement well.
To avoid conflicts, review your system prompt before adding new rules. Ask yourself: do any of these instructions pull in opposite directions? If you want the AI to follow a rule consistently, make sure nothing else undermines it. Clear, non-contradictory instructions produce reliable behavior.
Challenge
The system prompt for this task is already set, and you cannot change it:
Everything you say must be uppercased.
Write a user prompt that conflicts with it: ask the AI to name a favorite fruit using only lowercase letters. Your message can be at most 10 words.
The AI's response must:
- Be entirely in lowercase
What to notice: large models usually side with the system prompt. Small models like the one here often follow the most recent instruction instead. That is why conflicting instructions make behavior unpredictable, and why a system prompt alone is not a guarantee.
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