Prompt Templates for Common Tasks
For Code Generation
Section titled “For Code Generation”Create a [language] function that [specific functionality].
Requirements:- [Requirement 1]- [Requirement 2]- [Requirement 3]
The function should handle edge cases like [edge case].Include comments explaining your approach.
For Design Tasks
Section titled “For Design Tasks”Design a [component/page] for [specific purpose].
Style guidelines:- Color scheme: [colors]- Typography: [font details]- Design system: [Material/Fluent/etc.]
The design should be responsive and accessible.
For Data Analysis
Section titled “For Data Analysis”Analyze this dataset about [topic]:[data sample or description]
Questions to answer:1. What are the key trends in [metric]?2. How does [variable A] correlate with [variable B]?3. What recommendations can be made based on this data?
Include your reasoning for each conclusion.
Common Pitfalls to Avoid
Section titled “Common Pitfalls to Avoid”- Vague instructions - Be specific about what you want
- Overloading with information - Focus on what’s essential
- Contradictory requirements - Ensure consistency in your requests
- Missing constraints - Specify limitations and boundaries
- Assuming domain knowledge - Provide necessary background information
By following these best practices, you’ll be able to craft prompts that consistently produce high-quality, relevant responses from AI models.