Nearby lessons
36 of 49Prompt Engineering - System vs User Messages
Prompt Serialization
Prompt serialization means structuring prompts in an organized format before sending them to AI — instead of one plain sentence, you use structured roles:
- System — behaviour.
- User — task.
- Assistant — response.
Structured prompts give control; plain prompts are simple but weak.
In simple words: Structured prompts give controlled output. Clarity in structure creates power in output.
| Plain Prompt | Structured Prompt |
|---|---|
| Simple text | Role-based |
| No behaviour control | Controlled behaviour |
| Weak output | Strong output |
| Less clarity | High clarity |
Example01
System vs User Messages
The system message controls behaviour (how AI should act); the user message gives the task (what AI should do). System = how, User = what.
- And remember: the system message has higher priority.
In simple words: System controls behaviour, user controls task. Control behaviour, control output.
| System Message | User Message |
|---|---|
| Behaviour | Task |
| Personality | Request |
| Rules | Work |
| High priority | Lower priority |
The school example:
- A friendly teacher gives a soft explanation.
- A strict teacher gives a direct one.
Same question, different answers — because the behaviour changed. Change the system message and the whole output changes.
Example02
📝 Key Takeaways
- Prompt serialization = structuring prompts with roles.
- Plain prompts are simple but weak; structured prompts give control.
- System message controls behaviour; user message gives the task.
- System = how, User = what.
- The system message has higher priority.
- Change the system message and the whole output changes.
🧠 Test Your Knowledge
4 QuestionsProgress: 0 / 4