beginnerChatClient, Messages & Prompts
What's the difference between a system message and a user message in a chat prompt?
The system message sets persistent behavior/persona/constraints for the whole conversation (e.g. 'You are a customer support agent, only answer questions about billing') and is typically not shown to the end user. The user message is the actual per-turn input from whoever is chatting — mixing instructions into user messages instead of the system message makes them easy for a user to override or ignore in later turns.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.
What's the difference between a system message and a user message in a chat prompt?