Prompt Engineering
Master the art and science of crafting effective prompts to get the best results from AI language models.
1. Be Specific and Clear
Provide clear, detailed instructions. Vague prompts lead to unpredictable results.
✅ `Write a 200-word product description for wireless Bluetooth headphones targeting fitness enthusiasts`2. Provide Context
Give the AI relevant background information and specify your target audience or use case.
3. Use Examples
Show the AI what you want by providing examples of desired output format or style.
4. Set Constraints
Specify length limits, tone requirements, or format constraints to guide the output.
Ask the AI to think step-by-step through complex problems.
Provide multiple examples to establish a pattern for the AI to follow.
Ask the AI to assume a specific role or persona for contextual responses.
Build on previous responses to refine and improve outputs.
Explicitly tell the AI what NOT to do or include in the response.
📝 Content Creation Template
You are a [ROLE] writing for [AUDIENCE].
Task: [SPECIFIC TASK]
Context: [BACKGROUND INFORMATION]
Tone: [DESIRED TONE]
Length: [WORD/CHARACTER COUNT]
Format: [STRUCTURE REQUIREMENTS]
Include:
- [REQUIREMENT 1]
- [REQUIREMENT 2]
- [REQUIREMENT 3]
Avoid:
- [RESTRICTION 1]
- [RESTRICTION 2]
Example output style:
[PROVIDE EXAMPLE]🤔 Problem Solving Template
I need help solving: [PROBLEM STATEMENT]
Context:
- [RELEVANT DETAIL 1]
- [RELEVANT DETAIL 2]
- [CONSTRAINTS OR LIMITATIONS]
Please:
1. Break down the problem into smaller parts
2. Suggest 3 possible approaches
3. Explain the pros and cons of each
4. Recommend the best solution and why
Think step by step and show your reasoning.📊 Analysis Template
Analyze the following [DATA TYPE/TOPIC]:
[INSERT DATA OR TOPIC]
Please provide:
1. Key insights and patterns
2. Strengths and weaknesses
3. Recommendations for improvement
4. Potential risks or considerations
Structure your analysis with:
- Executive summary
- Detailed findings
- Actionable recommendations
Use data and evidence to support your conclusions.🌡️ Temperature
Controls randomness
Range: 0.0 - 2.0
0.0-0.3: Very focused, deterministic0.4-0.7: Balanced creativity0.8-1.2: Creative, varied outputs
🎯 Top-p (Nucleus)
Cumulative probability
Range: 0.0 - 1.0
0.1-0.5: Very focused selection0.8-0.9: Balanced diversity0.95+: Maximum token variety
How it works:
Selects from the smallest set of tokens whose cumulative probability exceeds the top-p value.
🔢 Top-k
Limits vocabulary
Common Values:
1-10: Very constrained20-40: Moderate selection50-100: Broader vocabulary
How it works:
Restricts the model to choose from only the top-k most likely tokens at each step.
🎯 Start Simple
Begin with basic prompts and gradually add complexity.
🔄 Iterate
Refine prompts based on output quality. Small changes can make big differences.
📋 Document Patterns
Keep track of what works well for different types of tasks.