大模型网摘deepseek.wang

Prompt Tutorials · 2026-11-04

DeepSeek Prompts: How to Divide System and User Prompt Duties

Many people dump all their requirements into a single user message, and DeepSeek's output quality becomes inconsistent. The issue usually traces back to not separating the roles of system and user prompts: the former sets rules, the latter delivers the task. This division matters even more for the R-series reasoning models — reasoning models don't respond to role-play flourishes like "you are a seasoned expert"; they respond to clear constraints and structured requirements. Let's break it down by real-world usage.

1. What Goes in the System Prompt: Rules, Boundaries, Formats

The system prompt is the "constitution" of the entire conversation — ideal for content that stays constant across turns: output format requirements, prohibitions, response style, terminology conventions. For example: always output Markdown tables, code must include comments, explicitly say "uncertain" instead of fabricating when unsure. These are stable constraints; placing them at the system level keeps the model compliant in every turn without repeated reminders.

Worth noting: both DeepSeek's V-series and R-series respond to system prompts quite "pragmatically." Write "do not exceed 300 words" and it will likely comply. Write "you are a master copywriter with 20 years of experience" and the improvement is limited. Constraints beat personas — that's the first principle of writing system prompts.

2. What Goes in the User Prompt: Specific Tasks and Per-Turn Input

User prompts carry everything that changes per turn: the text to translate this time, the code to analyze, the math problem to solve. A good user prompt = task description + input material + output example (optional). Don't repeat rules already written in the system prompt — repetition can dilute their weight.

Another practical tip: the R-series supports toggling deep thinking mode. Simple tasks (fixing typos, format conversion, small talk) don't need deep thinking — enabling it just makes things slower for no gain. Save the reasoning budget for genuinely hard problems: math proofs, multi-step code debugging, logical analysis.

3. Common Pitfalls: Don't Blend the Two into One Mess

Three frequent mistakes:

1. Rules written in user messages: they work in turn one, but by turn five the model has forgotten them. Cross-turn rules belong at the system level. 2. Persona adjectives piled into the system prompt: words like "brilliant, experienced, meticulous" are largely ineffective for reasoning models. Replace them with actionable criteria instead. 3. Deep thinking enabled for trivial tasks: even a grammar question triggers long chains of thought, doubling wait time. Task complexity should decide whether to enable thinking mode.

4. Two Ready-to-Copy Templates

Template 1: Code review scenario (system prompt)

You are a code review assistant. Follow these rules:
1. Only flag issues that genuinely exist; mark uncertain ones as "to be confirmed."
2. For each issue, output in three parts: location / problem / suggested fix.
3. Fix suggestions must include runnable code snippets, not just descriptions.
4. Don't comment on subjective style issues unless they affect correctness or performance.
5. If there are no issues, simply reply "No issues found" — don't manufacture findings.

Template 2: Matching user prompt

Please review the following Python code:

python (paste your code here)

Review focus: null-pointer risks and missing exception handling.
Follow the output format defined in the system rules.

The key to this pairing: the system layer defines "how to answer," while the user layer only states "what to answer and where to focus" — zero overlap between the two.

5. One Tip for Local Deployment Users

DeepSeek's open weights allow local deployment, and many people call it through their own services. In local deployments, the system prompt typically goes into the request's system field and the user prompt into the user field — they're physically separated, so there's even less reason to mix them. Check the official documentation for exact field names and parameters, but the logic of "system holds rules, user holds tasks" holds true under any integration method.

The essence of this division is information layering: stable content goes in the system layer, variable content in the user layer, constraints replace personas, and deep thinking activates only for complex tasks. Before writing your next prompt, ask yourself one question — does this sentence stay the same every turn? If yes, move it into the system prompt.