File size: 3,910 Bytes
af66d50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Prompt Engineering Prompts

## Chain of Thought (CoT) Reasoning

**Difficulty:** Advanced | **Best Model:** Claude 3.5 Sonnet / GPT-4o | **Use Case:** Complex problem solving

**Tags:** prompt-engineering, cot, reasoning

### Prompt:
```text
Solve the following problem. Before giving the final answer, show your step-by-step reasoning process. Think out loud, explain each deduction, and break down your logical steps clearly. Problem: [PROBLEM]
```

### Variables/Template Example:
```text
PROBLEM: If John has 5 apples and buys 3 more, then gives half his total to Mary, how many does he have?
```

### Example Output:
```text
Let's break this down step-by-step:
1. John starts with 5 apples.
2. He buys 3 more. 5 + 3 = 8 apples total.
3. He gives half of his total to Mary. Half of 8 is 4.
4. Therefore, John keeps 8 - 4 = 4 apples.

**Final Answer:** John has 4 apples left.
```

---

## System Prompt Creator

**Difficulty:** Expert | **Best Model:** Claude 3 Opus | **Use Case:** Creating AI Agents

**Tags:** prompt-engineering, system-prompt, agents

### Prompt:
```text
You are an expert AI Architect. Your task is to write a highly detailed 'System Prompt' that configures an AI to act as a [ROLE]. Include their persona, rules, constraints, and output formatting instructions.
```

### Variables/Template Example:
```text
ROLE: Senior Legal Tech Assistant
```

### Example Output:
```text
```text
**Role**: You are Lexi, a Senior Legal Tech Assistant.
**Persona**: Professional, precise, and highly analytical.
**Rules**:
1. NEVER provide definitive legal advice (always include a disclaimer).
2. Cite relevant case law jurisdiction when asked.
3. Keep responses under 3 paragraphs unless summarizing a document.
**Output Format**: Use markdown headers for 'Summary', 'Key Clauses', and 'Risk Analysis'.
```
```

---

## Self-Critique & Refinement (Reflection)

**Difficulty:** Advanced | **Best Model:** Claude 3.5 Sonnet | **Use Case:** High-quality content generation

**Tags:** prompt-engineering, reflection, self-critique

### Prompt:
```text
Generate a solution for [TASK]. Once generated, critique your own work by identifying at least 3 potential flaws, biases, or weaknesses. Finally, provide a revised version that addresses these criticisms.
```

### Variables/Template Example:
```text
TASK: Write a short cold email for a marketing agency.
```

### Example Output:
```text
**Initial Draft**: Hi, we are a marketing agency. We can boost your sales. Call us!

**Critique**:
1. Too generic, lacks personalization.
2. No clear value proposition or social proof.
3. The Call to Action is too aggressive.

**Revised Draft**: Hi [Name], noticed [Company] is launching a new product. We helped [Competitor/Similar Co] increase conversions by 20% using targeted ads. Open to a 5-min chat next Tuesday?
```

---

## ReAct (Reasoning and Acting)

**Difficulty:** Expert | **Best Model:** GPT-4o | **Use Case:** Agentic workflows

**Tags:** prompt-engineering, react, agents, logic

### Prompt:
```text
Answer the following question using the ReAct framework. Use the format:
Thought: [Your reasoning]
Action: [The tool or action to take, e.g., Search(query)]
Observation: [The result of the action]
... (Repeat until you have the answer)
Thought: I now know the answer.
Final Answer: [Answer]
Question: [QUESTION]
```

### Variables/Template Example:
```text
QUESTION: Who is the current CEO of Microsoft and how old is he?
```

### Example Output:
```text
Thought: I need to find out who the current CEO of Microsoft is.
Action: Search(Microsoft current CEO)
Observation: Satya Nadella is the CEO of Microsoft.
Thought: Now I need to find Satya Nadella's age.
Action: Search(Satya Nadella age)
Observation: Satya Nadella was born on August 19, 1967 (age 56 years).
Thought: I now know the answer.
Final Answer: The current CEO of Microsoft is Satya Nadella, and he is 56 years old.
```

---