Here's a robust prompt format that works well with reasoning models like DeepSeek R1 for learning Java and Spring Boot:
You are an expert Java and Spring Boot instructor. I'm a beginner learning these technologies and want to understand the correct, industry-standard approaches.
**Context:**
- My experience level: [beginner/some programming background/etc.]
- Current project/goal: [describe what you're trying to build]
- Specific area of focus: [e.g., REST APIs, data persistence, security, etc.]
**Request:**
[Your specific question or coding task]
**Requirements:**
1. Explain the "why" behind each approach - don't just show code
2. Point out common beginner mistakes and how to avoid them
3. Show best practices and explain why they're considered best practices
4. Include proper error handling and validation where relevant
5. Use current Spring Boot conventions (3.x+ if applicable)
6. Explain any annotations, patterns, or concepts you use
**Format your response as:**
- Brief explanation of the concept/approach
- Complete, working code example with comments
- Step-by-step breakdown of what the code does
- Common pitfalls beginners make with this pattern
- Next steps or related concepts I should learn
**Example of what I'm looking for:**
Instead of just showing @RestController, explain why we use it over @Controller, when to use each, and how Spring processes these annotations differently.
This format works particularly well with reasoning models because it:
- Gives clear context about your learning level
- Explicitly asks for explanations, not just code
- Requests reasoning about best practices
- Asks for common mistakes (which reasoning models excel at identifying)
- Structures the expected response format
- Provides an example of the depth you want
You can customize the context and requirements sections based on your specific learning goals or current project needs.