AI Development
The labels that mark who said what in a chat API request: typically system or developer for application instructions, user for end-user input, assistant for model output, and tool for tool results.
The labels that mark who said what in a chat API request: typically system or developer for application instructions, user for end-user input, assistant for model output, and tool for tool results. OpenAI documents developer messages as taking priority over user messages. Anthropic's Messages API takes instructions in a top-level system field and alternates user and assistant turns, and because these APIs are stateless, every request resends the full role-tagged history.
Primary source: platform.openai.com
Example
In practice, developers reach for Message Roles when they need the capability described above as part of an AI feature or workflow.
Hands-on guides, comparisons, and tutorials that cover AI Development.
FAQ
The labels that mark who said what in a chat API request: typically system or developer for application instructions, user for end-user input, assistant for model output, and tool for tool results.
Message Roles sits in the AI Development part of the AI stack. Understanding it helps you make better decisions when building, debugging, and shipping AI features.
Developers Digest publishes tutorials and videos that cover AI Development topics including Message Roles. Check the blog and YouTube channel for hands-on walkthroughs.
Related
A model card is a short document published with a trained machine learning model that explains its intended uses, its limitations, and how it performs across different conditions and groups.
The request parameter that sets a hard ceiling on how many tokens a model may generate in one response.
A phenomenon where AI models trained on AI-generated data progressively lose quality and diversity over generations.

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.