Skip to content

Commit 2d945b8

Browse files
Update prompting/prompt-engineering-guide.mdx
Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
1 parent 82ccbec commit 2d945b8

1 file changed

Lines changed: 36 additions & 38 deletions

File tree

prompting/prompt-engineering-guide.mdx

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -53,64 +53,62 @@ Build an online store dashboard with:
5353
- Mention if you need user login
5454
- Tell it how to check if data is correct
5555

56-
## Advanced AI prompting techniques for code generation
56+
## How to Ask Better Questions
5757

58-
### Contextual information for better LLM results
58+
### Give the AI Context
5959

60-
**Provide relevant context for AI code generation:**
60+
**Help the AI understand your situation:**
6161

62-
- Include existing code snippets when relevant for AI understanding
63-
- Reference specific files or components for LLM context
64-
- Mention current technology constraints for AI-powered development
65-
- Specify performance requirements for optimized code generation
62+
- Show it code you already have
63+
- Tell it which files you're working on
64+
- Mention any limits (like "needs to work on old phones")
65+
- Say if speed is important
6666

67-
**Progressive refinement with AI prompting:**
67+
**Start Simple, Then Add Details:**
6868

69-
- Start with high-level requirements for AI planning
70-
- Add implementation details iteratively for better LLM results
71-
- Use follow-up prompts for AI clarification
72-
- Build upon previous AI responses for iterative development
69+
- First, explain what you want in general
70+
- Then add more specific details
71+
- Ask follow-up questions if needed
72+
- Build on what the AI already created
7373

74-
### LLM-specific optimization for AI coding
74+
### Tips for Different AI Models
7575

76-
**Claude/Gemini AI models:**
76+
**For Claude or Gemini:**
7777

78-
- Provide comprehensive context upfront for better AI code generation
79-
- Use structured formats (numbered lists, sections) for LLM understanding
80-
- Include examples and edge cases for robust AI development
81-
- Specify output format preferences for consistent code generation
78+
- Give all the information at once
79+
- Use numbered lists to organize your thoughts
80+
- Include examples of what you want
81+
- Say how you want the answer formatted
8282

83-
**GPT AI models:**
83+
**For GPT:**
8484

85-
- Break complex requests into smaller parts for better LLM processing
86-
- Use clear, direct language for optimal AI code generation
87-
- Provide concrete examples for accurate LLM understanding
88-
- Specify desired output structure for consistent AI results
85+
- Break big requests into smaller pieces
86+
- Use simple, clear language
87+
- Show examples of what you mean
88+
- Be specific about what you want
8989

90-
### Error Prevention
90+
### Avoid Common Mistakes
9191

92-
**Common Pitfalls to Avoid:**
92+
**Don't do this:**
9393

94-
- Vague requirements that lead to assumptions
95-
- Missing technical specifications
96-
- Inconsistent naming conventions
97-
- Unspecified integration requirements
94+
- Be too vague ("make it better")
95+
- Forget to mention important details
96+
- Use different names for the same thing
97+
- Forget to say how things should connect
9898

99-
**Validation Techniques:**
99+
**Do this instead:**
100100

101-
- Include acceptance criteria
102-
- Specify testing requirements
103-
- Define success metrics
104-
- Request validation checkpoints
101+
- Include clear goals ("make the button blue and centered")
102+
- Specify what success looks like
103+
- Say how you'll test it
104+
- Ask for checkpoints along the way
105105

106106
<Callout type="info">
107-
**Version Specification**: When possible, specify framework versions to ensure compatibility and avoid deprecated
108-
features.
107+
**Version Numbers**: If you know which version of a tool you're using, tell the AI. This helps it give you code that works.
109108
</Callout>
110109

111110
<Callout type="tip">
112-
**Iterative Refinement**: Start with a clear prompt, then use follow-up messages to add details and make adjustments
113-
as needed.
111+
**Start Simple**: Begin with a clear request, then add more details in follow-up messages.
114112
</Callout>
115113

116114
## AI prompt engineering best practices summary

0 commit comments

Comments
 (0)