User Message

A user message is a message in a chat-style LLM API that represents input from the end user or calling application on the user's behalf. It usually contains the task request, question, provided data, constraints, or follow-up information.

In a conversation, user messages are distinct from:

  • a system message, which sets high-level behavior or policy;
  • a developer instruction, which may define application-specific behavior;
  • an assistant message, which represents the model's prior or generated response; and
  • tool messages, which return results from tool calls.

User messages are important for instruction hierarchy. A user can request a task, but the request should not override higher-priority system or developer constraints. This matters for safety, data access, and prompt injection attacks.

In context engineering, user messages should be preserved accurately when they contain task requirements, approvals, or corrections. They may be summarized during context compaction, but important constraints should remain explicit.

OpenAI's help article on moving from completions to chat messages explains that each message has a role and content, including the user role, in Moving from Completions to Chat Completions.

The LLM Knowledge Base is a collection of bite-sized explanations for commonly used terms and abbreviations related to Large Language Models and Generative AI.

It's an educational resource that helps you stay up-to-date with the latest developments in AI research and its applications.

© 2026 Promptmetheus