How-ToGuides.com

Prompt Engineering Cheat Sheet

Quick reference guide for crafting effective prompts across different AI tools
Role-Based Prompting

Assign a specific role to the AI to get responses from a particular perspective.

Template:
Act as a [role] and [task].
Example:
Act as a financial advisor and help me create a budget for a family of four with a monthly income of $6,000.
Tips:
  • Be specific about the role (e.g., "senior financial advisor with 20 years experience" rather than just "financial advisor")
  • Include relevant qualifications or expertise in the role description
  • Combine with other techniques for more powerful results
Chain-of-Thought Prompting

Guide the AI to break down complex problems into step-by-step reasoning.

Template:
Think through this step-by-step: [problem]
Example:
Think through this step-by-step: If I have 5 apples and give 2 to my friend, then buy 3 more and eat 1, how many apples do I have left?
Tips:
  • Works best for logical, mathematical, or reasoning tasks
  • Explicitly ask for intermediate steps and reasoning
  • Can be combined with role-based prompting for expert reasoning
Few-Shot Prompting

Provide examples of the desired input-output pairs to guide the AI's responses.

Template:
I want you to respond in the following format:
Input: [example input 1]
Output: [example output 1]
Input: [example input 2]
Output: [example output 2]
Input: [actual input]
Output:
Example:
I want you to respond in the following format:
Input: Convert 10 miles to kilometers
Output: 10 miles = 16.09 kilometers
Input: Convert 25 celsius to fahrenheit
Output: 25°C = 77°F
Input: Convert 5 kilograms to pounds
Output:
Tips:
  • Use 2-3 examples for best results
  • Make sure examples clearly demonstrate the pattern you want
  • Examples should be diverse enough to show the range of expected inputs
Output Format Specification

Explicitly define the format you want the AI to use in its response.

Template:
Respond in the following format: [format details]
Example:
Create a weekly meal plan. Respond in the following format:

# Monday
- Breakfast: [meal]
- Lunch: [meal]
- Dinner: [meal]

# Tuesday
...
Tips:
  • Be very specific about formatting, including headings, bullet points, etc.
  • Use markdown formatting for structured outputs
  • Consider including a short example of the desired format
Persona-Based Prompting

Ask the AI to adopt a specific persona with defined characteristics.

Template:
I want you to act as [persona] with the following characteristics: [traits]. Now [task].
Example:
I want you to act as a tech-savvy grandmother with the following characteristics: patient, slightly confused by modern slang, loves to explain things simply. Now explain how to create a secure password.
Tips:
  • Define 3-5 specific traits for the persona
  • Include communication style preferences
  • Consider adding background or context for the persona

Related Resources

AI Terminology Glossary

Comprehensive definitions of key AI terms and concepts

View Glossary
AI Model Comparison

Compare different AI models and their capabilities

View Comparison
Prompt Engineering Guides

In-depth guides for mastering prompt engineering

Browse Guides