You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: prompting/prompt-engineering-guide.mdx
+30-31Lines changed: 30 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,49 +111,48 @@ Build an online store dashboard with:
111
111
**Start Simple**: Begin with a clear request, then add more details in follow-up messages.
112
112
</Callout>
113
113
114
-
## AI prompt engineering best practices summary
114
+
## Quick Tips Summary
115
115
116
-
### Essential AI prompting principles for code generation
116
+
### The Main Rules
117
117
118
-
1.**Clarity first**: Be specific about what you want to build with AI code generation and how it should work
119
-
2.**Technology specification**: Clearly state your preferred frameworks and libraries for LLM understanding
120
-
3.**Context provision**: Include relevant background information and constraints for better AI results
121
-
4.**Iterative AI approach**: Start simple, then add complexity through follow-up prompts for optimal code generation
118
+
1.**Be clear**: Say exactly what you want and how it should work
119
+
2.**Name your tools**: Tell the AI which technologies to use
120
+
3.**Give context**: Share relevant information and any limits
121
+
4.**Start simple**: Begin with basics, then add details
122
122
123
-
### AI code generation quality checklist
123
+
### Checklist Before You Ask
124
124
125
-
**Before submitting AI prompts:**
125
+
**Before you send your request:**
126
126
127
-
- ✅ Goal is clearly defined for LLM understanding
128
-
- ✅ Technology stack is specified for AI code generation
129
-
- ✅ Key features are listed for comprehensive AI development
130
-
- ✅ User requirements are outlined for accurate LLM results
131
-
- ✅ Success criteria are defined for measurable AI outcomes
127
+
- ✅ You clearly explained your goal
128
+
- ✅ You listed the tools you want to use
129
+
- ✅ You mentioned the main features you need
130
+
- ✅ You described what success looks like
132
131
133
-
**During AI-powered development:**
132
+
**While building:**
134
133
135
-
- 🔄 Provide feedback on AI-generated code for improvement
136
-
- 🔄 Request specific modifications from LLM for refinement
137
-
- 🔄 Ask for AI explanations when needed for understanding
138
-
- 🔄 Use AI discussion mode for architecture planning
134
+
- 🔄 Give feedback on what the AI creates
135
+
- 🔄 Ask for specific changes
136
+
- 🔄 Request explanations if confused
137
+
- 🔄 Use discussion mode to plan
139
138
140
-
### Common Success Patterns
139
+
### What Makes a Good Request
141
140
142
-
**Effective Prompts Include:**
141
+
**Good requests have:**
143
142
144
-
-Specific functionality requirements
145
-
-Technology stack preferences
146
-
-User experience considerations
147
-
-Performance and scalability needs
148
-
-Integration requirements
143
+
-Clear description of what you want
144
+
-List of tools to use
145
+
-How it should look and feel
146
+
-Any speed or size requirements
147
+
-How it connects to other things
149
148
150
-
**Ineffective Prompts Lack:**
149
+
**Bad requests are missing:**
151
150
152
-
-Clear objectives
153
-
- Technical specifications
154
-
-Implementation details
155
-
-Success criteria
151
+
-A clear goal
152
+
- Technical details
153
+
-Specific instructions
154
+
-Definition of "done"
156
155
157
156
<Callouttype="info">
158
-
**Remember**: LLMs can only generate code based on the information you provide in prompts. The more specific and complete your AI prompts, the better the code generation results and AI-powered development outcomes.
157
+
**Remember**: The AI can only work with what you tell it. The more details you give, the better the results.
0 commit comments