How User, Assistant, and System Roles Shape Large Language Model Interactions

The article explains the three core roles—user, assistant, and system—in large language model conversations, detailing their definitions, functions, characteristics, and how proper role prompting clarifies dialogue structure, controls AI behavior, and improves task handling, illustrated with JSON examples and a full simulated exchange.

Subtle Storm
Subtle Storm
Subtle Storm
How User, Assistant, and System Roles Shape Large Language Model Interactions

When developing large language models, the interaction can be viewed as a play with three distinct roles: user , assistant , and system . Each role has a specific purpose that together determines how the model understands, responds, and controls the dialogue.

User – the human who asks questions or issues commands. Definition: the end‑user of the AI, represented as “you”. Function: pose queries, request information, or give tasks. Characteristics: diverse content, varied style, can be casual or task‑oriented. Example:

{"role": "user", "content": "帮我写一封求职信,职位是Python工程师。"}

Assistant – the AI model itself, represented as “I”. Definition: the model that generates natural, accurate responses based on the user’s input and conversation history. Function: analyse input and produce replies or execute tasks. Characteristics: answers aim to match user intent, with a gentle, professional, objective tone, maintaining consistent personality. Example:

{"role": "assistant", "content": "当然可以,以下是一封针对Python工程师职位的求职信草稿..."}

System – the “director” set by the developer or platform. Definition: a role that establishes the AI’s behavior, tone, and expertise. Function: before the conversation starts, it tells the AI what persona to adopt and how to speak. Characteristics: controls overall dialogue style, appears only once at the beginning, does not interact directly with the user but influences the assistant’s responses. Example:

{"role": "system", "content": "你是一位经验丰富的职业指导顾问,语气要专业但亲切,帮助用户写简历和求职信。"}

The main benefit of this role separation is a clearer dialogue structure, easier control of the assistant’s behavior, and more natural, human‑like interactions, which also facilitate subsequent training and improvement.

Key differences and connections among the three roles can be summarised as:

User : initiates requests (questions, commands, casual chat).

Assistant : generates answers, writes code, offers advice.

System : sets the AI’s identity, tone, and boundaries for the entire session.

A complete simulated conversation illustrates the workflow:

[
  {"role": "system", "content": "你是一位懂Python和求职技巧的职业顾问,语气专业但不生硬。"},
  {"role": "user", "content": "我想申请Python工程师岗位,能帮我写封求职信吗?"},
  {"role": "assistant", "content": "当然可以,以下是一封针对Python工程师职位的求职信草稿..."}
]

In this dialogue the system sets the AI’s identity and tone, the user issues a concrete request, and the assistant produces a professional response. Designing appropriate role prompts, especially for the system and assistant, can markedly improve the model’s ability to handle complex tasks and maintain multi‑turn coherence.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Prompt EngineeringLarge Language ModelAI conversationsystem rolerole prompting
Subtle Storm
Written by

Subtle Storm

The micro era's marvels are boundlessly subtle.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.