Official recommended settings for DeepSeek R1 models including temperature, system prompt handling, and thinking tag enforcement for best performance.
# DeepSeek R1 Optimal Configuration
## Official Recommendations (from DeepSeek)
- **No system prompt**: Leave the system prompt empty for R1 models. All instructions go in the user message.
- **Temperature**: Set to 0.6 (recommended range: 0.5-0.7). Prevents endless repetitions or incoherent outputs.
- **Top-p**: Use 0.95
- **Thinking enforcement**: Prefix model output with "<think>\n" to ensure thorough reasoning
## What NOT to Do
- Do NOT use few-shot examples — this consistently degrades R1 performance
- Do NOT add chain-of-thought instructions — R1 already reasons internally
- Do NOT use complex, lengthy system prompts — keep instructions minimal and explicit
- Do NOT set temperature below 0.5 or above 0.7
## For Math Problems
Add this directive: "Reason step by step, and put your final answer within \boxed{}"
## For Validation
Use majority voting: generate multiple responses and select the most frequent answer.
## Key Differences from V3
- R1: No system prompt, user-prompt-only instructions, built-in reasoning
- V3: Supports system prompts, few-shot examples, function calling, JSON modeSystem rules for designing inter-service communication in microservices architectures with DeepSeek Coder, covering sync/async patterns, error handling, and resilience.
System rules for generating content in multiple languages with DeepSeek V3, covering translation quality, cultural adaptation, locale-specific formatting, and quality assurance.
System rules for safe code refactoring with DeepSeek R1, requiring test coverage verification, incremental changes, and behavior preservation checks.
System rules for using DeepSeek V3 to generate clear, maintainable technical documentation including API docs, architecture docs, and onboarding guides.
System rules for DeepSeek Coder to generate optimized database queries, with requirements for EXPLAIN analysis, indexing recommendations, and performance targets.
System rules for using DeepSeek V3 to generate infrastructure code, CI/CD pipelines, and operational runbooks with security and reliability best practices.