@ckelsoe/prompt-architect 3.2.2 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +135 -5
- package/MIGRATION.md +1 -1
- package/README.md +32 -47
- package/adapters/README.md +1 -1
- package/adapters/system-prompt.md +115 -59
- package/package.json +5 -4
- package/scripts/install.js +52 -22
- package/scripts/test.js +88 -40
- package/scripts/validate-skill.js +184 -56
- package/skills/prompt-architect/SKILL.md +94 -79
- package/skills/prompt-architect/assets/templates/ape_template.txt +14 -3
- package/skills/prompt-architect/assets/templates/bab_template.txt +23 -10
- package/skills/prompt-architect/assets/templates/broke_template.txt +31 -6
- package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +16 -8
- package/skills/prompt-architect/assets/templates/care_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +64 -35
- package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/co-star_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/crispe_template.txt +6 -0
- package/skills/prompt-architect/assets/templates/ctf_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +7 -0
- package/skills/prompt-architect/assets/templates/hybrid_template.txt +44 -24
- package/skills/prompt-architect/assets/templates/iterative-compression_template.txt +74 -0
- package/skills/prompt-architect/assets/templates/least-to-most_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +24 -14
- package/skills/prompt-architect/assets/templates/race_template.txt +9 -0
- package/skills/prompt-architect/assets/templates/rcot_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/react_template.txt +38 -16
- package/skills/prompt-architect/assets/templates/rise-ie_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/rise-ix_template.txt +3 -3
- package/skills/prompt-architect/assets/templates/risen_template.txt +7 -0
- package/skills/prompt-architect/assets/templates/rpef_template.txt +16 -11
- package/skills/prompt-architect/assets/templates/rtf_template.txt +9 -0
- package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +18 -10
- package/skills/prompt-architect/assets/templates/step-back_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +54 -31
- package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +37 -21
- package/skills/prompt-architect/references/frameworks/ape.md +145 -57
- package/skills/prompt-architect/references/frameworks/bab.md +139 -58
- package/skills/prompt-architect/references/frameworks/broke.md +157 -57
- package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +184 -76
- package/skills/prompt-architect/references/frameworks/care.md +67 -36
- package/skills/prompt-architect/references/frameworks/chain-of-density.md +111 -417
- package/skills/prompt-architect/references/frameworks/chain-of-thought.md +45 -19
- package/skills/prompt-architect/references/frameworks/co-star.md +102 -44
- package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
- package/skills/prompt-architect/references/frameworks/ctf.md +75 -37
- package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
- package/skills/prompt-architect/references/frameworks/iterative-compression.md +448 -0
- package/skills/prompt-architect/references/frameworks/least-to-most.md +35 -13
- package/skills/prompt-architect/references/frameworks/plan-and-solve.md +38 -9
- package/skills/prompt-architect/references/frameworks/pre-mortem.md +182 -72
- package/skills/prompt-architect/references/frameworks/race.md +93 -38
- package/skills/prompt-architect/references/frameworks/rcot.md +1 -1
- package/skills/prompt-architect/references/frameworks/react.md +230 -97
- package/skills/prompt-architect/references/frameworks/reverse-role.md +23 -16
- package/skills/prompt-architect/references/frameworks/rise.md +120 -77
- package/skills/prompt-architect/references/frameworks/risen.md +82 -28
- package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
- package/skills/prompt-architect/references/frameworks/rtf.md +4 -2
- package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
- package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +68 -22
- package/skills/prompt-architect/references/frameworks/step-back.md +48 -16
- package/skills/prompt-architect/references/frameworks/tidd-ec.md +129 -51
- package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
- package/skills/prompt-architect/scripts/framework_analyzer.py +0 -807
- package/skills/prompt-architect/scripts/prompt_evaluator.py +0 -336
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
CAI Critique-Revise is a two-phase output improvement pattern derived from Anthropic's Constitutional AI methodology. A model generates an initial response, explicitly critiques it against a stated principle or standard, then revises the response to align with that principle. Unlike Self-Refine (which uses multi-dimensional quality feedback), CAI Critique-Revise is principle-driven: the critique is always measured against a specific, explicitly stated standard — a "constitution" of one or more principles.
|
|
6
6
|
|
|
7
|
-
**Research basis:** "Constitutional AI: Harmlessness from AI Feedback" (Bai et al., Anthropic, arXiv 2212.08073, 2022). Originally a training methodology; the critique-revise loop is directly usable as a prompting pattern. Key finding: generating an explicit critique before revising produces better alignment than asking for direct revision without a critique step.
|
|
7
|
+
**Research basis:** "Constitutional AI: Harmlessness from AI Feedback" (Bai et al., Anthropic, arXiv 2212.08073, 2022). Originally a training methodology; the critique-revise loop is directly usable as a prompting pattern. Key finding: generating an explicit critique before revising produces better alignment than asking for direct revision without a critique step. The effect is strongest for smaller models; the authors found no noticeable difference at 52B and retained critiques primarily for transparency into the model's reasoning.
|
|
8
8
|
|
|
9
9
|
## The Key Insight
|
|
10
10
|
|
|
@@ -27,151 +27,259 @@ The intermediate critique step is load-bearing — it forces the model to identi
|
|
|
27
27
|
- "No hedging language ('might', 'could', 'perhaps') unless genuine uncertainty exists"
|
|
28
28
|
|
|
29
29
|
### Initial Generation
|
|
30
|
-
**Purpose:** The output to evaluate. Can be AI-generated or human-written.
|
|
30
|
+
**Purpose:** The output to evaluate. Can be AI-generated or human-written. This fills the template's `SOURCE MATERIAL` slot, and unlike in frameworks that generate from scratch, it is required — there is nothing to critique without it.
|
|
31
31
|
|
|
32
32
|
### Critique Step
|
|
33
|
-
**Purpose:** Explicit evaluation of the
|
|
33
|
+
**Purpose:** Explicit evaluation of the material against the principle. The critique must be specific and quote the problematic passages. It is the first of the template's two phases, and the framing paragraph exists to stop the model collapsing it into the rewrite.
|
|
34
34
|
|
|
35
|
-
**Critique trigger:** *"
|
|
35
|
+
**Critique trigger:** *"Before rewriting anything, identify the specific ways the material above violates or falls short of the principle. Quote the specific passages that are problematic. Explain precisely why each passage violates the principle."*
|
|
36
36
|
|
|
37
37
|
### Revision Step
|
|
38
|
-
**Purpose:** Rewrite the
|
|
38
|
+
**Purpose:** Rewrite the material to satisfy the principle. The revision should address every critique point.
|
|
39
39
|
|
|
40
|
-
**Revision trigger:** *"
|
|
40
|
+
**Revision trigger:** *"Then rewrite the material above so it fully satisfies the principle. Address every critique point identified above. Preserve all content that already satisfies the principle."*
|
|
41
41
|
|
|
42
42
|
### Iteration (optional)
|
|
43
43
|
**Purpose:** Run the critique-revise cycle again against the same principle (to catch remaining issues) or a different principle (multi-principle alignment).
|
|
44
44
|
|
|
45
45
|
## Template Structure
|
|
46
46
|
|
|
47
|
+
Section headers are stripped at emission, so every header's meaning is carried by
|
|
48
|
+
unbracketed prose that ships with the prompt. Do not reintroduce header-only structure.
|
|
49
|
+
|
|
50
|
+
The two-phase rule is stated once, in the opening framing paragraph, and the pasted
|
|
51
|
+
material is delimited by the `SOURCE MATERIAL:` block together with the anchor sentence
|
|
52
|
+
directly beneath it. That anchor sentence is what keeps the pasted text readable as
|
|
53
|
+
material to be critiqued rather than as instructions to follow — do not delete it while
|
|
54
|
+
keeping the block.
|
|
55
|
+
|
|
47
56
|
```
|
|
57
|
+
You are enforcing a stated principle against an existing piece of writing. This is a
|
|
58
|
+
two-phase task: write a critique, then write a revision. Do not skip the critique and go
|
|
59
|
+
straight to the rewrite, and do not merge the two.
|
|
60
|
+
|
|
48
61
|
PRINCIPLE:
|
|
49
|
-
|
|
62
|
+
The principle to enforce is this:
|
|
63
|
+
[State the standard the output must satisfy — one principle or a small set — as complete
|
|
64
|
+
sentences whose compliance a reader could check. Be precise and measurable.]
|
|
50
65
|
|
|
51
|
-
|
|
52
|
-
[
|
|
66
|
+
SOURCE MATERIAL:
|
|
67
|
+
[Paste the output to be critiqued here — AI-generated or human-written.]
|
|
68
|
+
Use the material above as the text to be critiqued and revised for the work described
|
|
69
|
+
below.
|
|
53
70
|
|
|
54
71
|
CRITIQUE:
|
|
55
|
-
|
|
56
|
-
the principle
|
|
72
|
+
Before rewriting anything, identify the specific ways the material above violates or falls
|
|
73
|
+
short of the principle.
|
|
57
74
|
- Quote the specific passages that are problematic
|
|
58
75
|
- Explain precisely why each passage violates the principle
|
|
59
|
-
-
|
|
76
|
+
- Focus only on failures against the principle, not general quality
|
|
60
77
|
|
|
61
78
|
REVISION:
|
|
62
|
-
|
|
79
|
+
Then rewrite the material above so it fully satisfies the principle.
|
|
63
80
|
- Address every critique point identified above
|
|
64
|
-
- Preserve all content that already
|
|
81
|
+
- Preserve all content that already satisfies the principle
|
|
65
82
|
- Do not introduce new violations
|
|
66
83
|
```
|
|
67
84
|
|
|
85
|
+
The slot is named `SOURCE MATERIAL`, not `INITIAL OUTPUT`, and it is not optional here —
|
|
86
|
+
unlike the same-named slot in frameworks that generate from scratch, this framework has
|
|
87
|
+
nothing to critique without it.
|
|
88
|
+
|
|
68
89
|
### Multi-Principle Version
|
|
69
|
-
```
|
|
70
|
-
PRINCIPLES:
|
|
71
|
-
P1: [First principle]
|
|
72
|
-
P2: [Second principle]
|
|
73
|
-
P3: [Third principle]
|
|
74
90
|
|
|
75
|
-
|
|
76
|
-
|
|
91
|
+
Same shape as above. The principles are enumerated in the single `PRINCIPLE` slot with
|
|
92
|
+
stable labels, and the critique phase is run once per principle in the order they were
|
|
93
|
+
listed. The framing paragraph, the `SOURCE MATERIAL` anchor sentence, and the revision
|
|
94
|
+
prose are unchanged.
|
|
77
95
|
|
|
78
|
-
|
|
79
|
-
|
|
96
|
+
```
|
|
97
|
+
You are enforcing a set of stated principles against an existing piece of writing. This is
|
|
98
|
+
a two-phase task: write a critique, then write a revision. Do not skip the critique and go
|
|
99
|
+
straight to the rewrite, and do not merge the two.
|
|
80
100
|
|
|
81
|
-
|
|
82
|
-
|
|
101
|
+
PRINCIPLE:
|
|
102
|
+
The principles to enforce are the following, and only the following:
|
|
103
|
+
P1: [State the first standard as complete, checkable sentences.]
|
|
104
|
+
P2: [State the second one the same way.]
|
|
105
|
+
P3: [State the third one the same way.]
|
|
106
|
+
"P1", "P2" and "P3" are literal labels used by the critique below — keep them exactly as
|
|
107
|
+
written. [Add or remove P lines, then delete this line.]
|
|
108
|
+
|
|
109
|
+
SOURCE MATERIAL:
|
|
110
|
+
[Paste the output to be critiqued here — AI-generated or human-written.]
|
|
111
|
+
Use the material above as the text to be critiqued and revised for the work described
|
|
112
|
+
below.
|
|
83
113
|
|
|
84
|
-
CRITIQUE
|
|
85
|
-
|
|
114
|
+
CRITIQUE:
|
|
115
|
+
Before rewriting anything, work through the principles in order and, for each one
|
|
116
|
+
separately, identify the specific ways the material above violates or falls short of it.
|
|
117
|
+
Label each group of findings with the principle it belongs to.
|
|
118
|
+
- Quote the specific passages that are problematic
|
|
119
|
+
- Explain precisely why each passage violates that principle
|
|
120
|
+
- Focus only on failures against the principles, not general quality
|
|
121
|
+
- Where one passage violates more than one principle, say so under each
|
|
86
122
|
|
|
87
123
|
REVISION:
|
|
88
|
-
|
|
124
|
+
Then rewrite the material above so it fully satisfies every principle.
|
|
125
|
+
- Address every critique point identified above, across all principles
|
|
126
|
+
- Preserve all content that already satisfies the principles
|
|
127
|
+
- Do not introduce new violations
|
|
128
|
+
- Where two principles pull against each other, satisfy the earlier-listed one and say
|
|
129
|
+
which trade-off you made
|
|
89
130
|
```
|
|
90
131
|
|
|
91
132
|
## Complete Examples
|
|
92
133
|
|
|
134
|
+
Every example below is shown in emitted form: the framing paragraph first, then each slot
|
|
135
|
+
carrying its own role in prose. Read the headers as scaffolding that will be deleted — the
|
|
136
|
+
examples are written so that nothing is lost when it is. Only the `SOURCE MATERIAL` block
|
|
137
|
+
keeps a `[...]` placeholder, because the text to be critiqued is the one thing the user
|
|
138
|
+
must supply.
|
|
139
|
+
|
|
93
140
|
### Example 1: Plain Language Compliance
|
|
94
141
|
|
|
95
142
|
```
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
definition. Maximum sentence length: 20 words.
|
|
143
|
+
You are enforcing a stated principle against an existing piece of writing. This is a
|
|
144
|
+
two-phase task: write a critique, then write a revision. Do not skip the critique and go
|
|
145
|
+
straight to the rewrite, and do not merge the two.
|
|
100
146
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
147
|
+
PRINCIPLE:
|
|
148
|
+
The principle to enforce is this:
|
|
149
|
+
Plain language only. Every sentence must be understandable by a reader with no technical
|
|
150
|
+
background. No jargon may appear without an immediate plain-language definition. No
|
|
151
|
+
sentence may exceed 20 words.
|
|
152
|
+
|
|
153
|
+
SOURCE MATERIAL:
|
|
154
|
+
Our API leverages asynchronous microservice orchestration to facilitate real-time
|
|
155
|
+
event-driven data synchronization across distributed endpoints, enabling seamless
|
|
156
|
+
interoperability between heterogeneous enterprise systems.
|
|
157
|
+
Use the material above as the text to be critiqued and revised for the work described
|
|
158
|
+
below.
|
|
105
159
|
|
|
106
160
|
CRITIQUE:
|
|
107
|
-
|
|
108
|
-
|
|
161
|
+
Before rewriting anything, identify the specific ways the material above violates or falls
|
|
162
|
+
short of the principle.
|
|
163
|
+
- Quote every phrase that is jargon, that stands undefined, or that carries a sentence
|
|
164
|
+
past 20 words
|
|
165
|
+
- Explain precisely which part of the principle each quoted phrase breaks
|
|
166
|
+
- Focus only on failures against the principle, not general quality
|
|
109
167
|
|
|
110
168
|
REVISION:
|
|
111
|
-
|
|
112
|
-
|
|
169
|
+
Then rewrite the material above so it fully satisfies the principle.
|
|
170
|
+
- Address every critique point identified above
|
|
171
|
+
- Preserve all content that already satisfies the principle
|
|
172
|
+
- Do not introduce new violations
|
|
173
|
+
- State plainly what the product does; do not compensate for lost jargon with new
|
|
174
|
+
abstraction
|
|
113
175
|
```
|
|
114
176
|
|
|
115
177
|
### Example 2: Evidence-Backed Claims
|
|
116
178
|
|
|
117
179
|
```
|
|
180
|
+
You are enforcing a stated principle against an existing piece of writing. This is a
|
|
181
|
+
two-phase task: write a critique, then write a revision. Do not skip the critique and go
|
|
182
|
+
straight to the rewrite, and do not merge the two.
|
|
183
|
+
|
|
118
184
|
PRINCIPLE:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"could"
|
|
185
|
+
The principle to enforce is this:
|
|
186
|
+
Every claim must be backed by reasoning, data, or an example. No assertion may stand
|
|
187
|
+
without support. Hedging language such as "might" or "could" is acceptable only where
|
|
188
|
+
genuine uncertainty exists, and the uncertainty must be named.
|
|
122
189
|
|
|
123
|
-
|
|
124
|
-
[Paste
|
|
190
|
+
SOURCE MATERIAL:
|
|
191
|
+
[Paste the analysis or recommendation to be critiqued here.]
|
|
192
|
+
Use the material above as the text to be critiqued and revised for the work described
|
|
193
|
+
below.
|
|
125
194
|
|
|
126
195
|
CRITIQUE:
|
|
127
|
-
|
|
128
|
-
|
|
196
|
+
Before rewriting anything, identify the specific ways the material above violates or falls
|
|
197
|
+
short of the principle.
|
|
198
|
+
- Quote each unsupported assertion in full
|
|
199
|
+
- For each one, name which type of support is missing: reasoning, data, or example
|
|
200
|
+
- Quote separately any hedge that stands in for evidence rather than marking real
|
|
201
|
+
uncertainty
|
|
202
|
+
- Focus only on failures against the principle, not general quality
|
|
129
203
|
|
|
130
204
|
REVISION:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
205
|
+
Then rewrite the material above so it fully satisfies the principle.
|
|
206
|
+
- Address every critique point identified above
|
|
207
|
+
- Preserve all content that already satisfies the principle
|
|
208
|
+
- Do not introduce new violations
|
|
209
|
+
- Where a claim cannot be supported from the material given, either cut it or mark it
|
|
210
|
+
explicitly as an assumption; do not invent supporting data
|
|
134
211
|
```
|
|
135
212
|
|
|
136
213
|
### Example 3: User Agency Preservation
|
|
137
214
|
|
|
138
215
|
```
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
should always be explicitly left to the user with clear reasoning
|
|
143
|
-
for each option.
|
|
216
|
+
You are enforcing a stated principle against an existing piece of writing. This is a
|
|
217
|
+
two-phase task: write a critique, then write a revision. Do not skip the critique and go
|
|
218
|
+
straight to the rewrite, and do not merge the two.
|
|
144
219
|
|
|
145
|
-
|
|
146
|
-
|
|
220
|
+
PRINCIPLE:
|
|
221
|
+
The principle to enforce is this:
|
|
222
|
+
The response must preserve the reader's agency. It may lay out options and their
|
|
223
|
+
trade-offs, but it must not make the decision for them. The final choice must be left to
|
|
224
|
+
the reader explicitly, with the reasoning for each option stated so the reader can weigh
|
|
225
|
+
them.
|
|
226
|
+
|
|
227
|
+
SOURCE MATERIAL:
|
|
228
|
+
[Paste the recommendation to be critiqued here — the one that made a firm choice on the
|
|
229
|
+
reader's behalf.]
|
|
230
|
+
Use the material above as the text to be critiqued and revised for the work described
|
|
231
|
+
below.
|
|
147
232
|
|
|
148
233
|
CRITIQUE:
|
|
149
|
-
|
|
150
|
-
|
|
234
|
+
Before rewriting anything, identify the specific ways the material above violates or falls
|
|
235
|
+
short of the principle.
|
|
236
|
+
- Quote every passage that settles the decision for the reader or narrows it to one option
|
|
237
|
+
- Explain precisely how each quoted passage removes the reader's choice
|
|
238
|
+
- Quote any option that is presented without the reasoning needed to weigh it
|
|
239
|
+
- Focus only on failures against the principle, not general quality
|
|
151
240
|
|
|
152
241
|
REVISION:
|
|
153
|
-
|
|
154
|
-
|
|
242
|
+
Then rewrite the material above so it fully satisfies the principle.
|
|
243
|
+
- Address every critique point identified above
|
|
244
|
+
- Preserve all content that already satisfies the principle
|
|
245
|
+
- Do not introduce new violations
|
|
246
|
+
- Keep every substantive recommendation intact as a stated option with its reasoning;
|
|
247
|
+
preserving agency means returning the choice, not withholding the analysis
|
|
155
248
|
```
|
|
156
249
|
|
|
157
250
|
### Example 4: Factual Precision
|
|
158
251
|
|
|
159
252
|
```
|
|
253
|
+
You are enforcing a stated principle against an existing piece of writing. This is a
|
|
254
|
+
two-phase task: write a critique, then write a revision. Do not skip the critique and go
|
|
255
|
+
straight to the rewrite, and do not merge the two.
|
|
256
|
+
|
|
160
257
|
PRINCIPLE:
|
|
161
|
-
The
|
|
162
|
-
|
|
163
|
-
must be labeled
|
|
258
|
+
The principle to enforce is this:
|
|
259
|
+
The response must distinguish established fact from evidence-based inference and from
|
|
260
|
+
speculation. Every claim must be labeled as one of those three. No sentence may blend
|
|
261
|
+
categories without labeling each part.
|
|
164
262
|
|
|
165
|
-
|
|
166
|
-
[Paste
|
|
263
|
+
SOURCE MATERIAL:
|
|
264
|
+
[Paste the technical or analytical response to be critiqued here.]
|
|
265
|
+
Use the material above as the text to be critiqued and revised for the work described
|
|
266
|
+
below.
|
|
167
267
|
|
|
168
268
|
CRITIQUE:
|
|
169
|
-
|
|
170
|
-
|
|
269
|
+
Before rewriting anything, identify the specific ways the material above violates or falls
|
|
270
|
+
short of the principle.
|
|
271
|
+
- Quote each claim that is unlabeled, mislabeled, or blends two categories in one sentence
|
|
272
|
+
- State which of the three categories each quoted claim actually belongs to, and why
|
|
273
|
+
- Focus only on failures against the principle, not general quality
|
|
171
274
|
|
|
172
275
|
REVISION:
|
|
173
|
-
|
|
174
|
-
|
|
276
|
+
Then rewrite the material above so it fully satisfies the principle.
|
|
277
|
+
- Address every critique point identified above
|
|
278
|
+
- Preserve all content that already satisfies the principle
|
|
279
|
+
- Do not introduce new violations
|
|
280
|
+
- Label every claim [FACT], [INFERENCE], or [SPECULATION], splitting any sentence that
|
|
281
|
+
carries more than one category
|
|
282
|
+
- Do not promote a claim to a stronger category to avoid an awkward label
|
|
175
283
|
```
|
|
176
284
|
|
|
177
285
|
## Best Use Cases
|
|
@@ -222,9 +330,9 @@ where appropriate.
|
|
|
222
330
|
|
|
223
331
|
## Quick Reference
|
|
224
332
|
|
|
225
|
-
| Component | Purpose |
|
|
226
|
-
|
|
227
|
-
| Principle | The specific standard to enforce |
|
|
228
|
-
| Initial
|
|
229
|
-
| Critique | Quote-specific violations of the principle |
|
|
230
|
-
| Revision | Rewrite satisfying all critique points |
|
|
333
|
+
| Component | Template slot | Purpose |
|
|
334
|
+
|-----------|---------------|---------|
|
|
335
|
+
| Principle | `PRINCIPLE` | The specific standard to enforce |
|
|
336
|
+
| Initial Generation | `SOURCE MATERIAL` | The output to evaluate (required) |
|
|
337
|
+
| Critique | `CRITIQUE` | Quote-specific violations of the principle |
|
|
338
|
+
| Revision | `REVISION` | Rewrite satisfying all critique points |
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
CARE (Context, Ask, Rules, Examples) is a practitioner framework from Nielsen Norman Group that adds an explicit **Rules** component to the standard context-task-examples pattern. This makes it particularly effective for tasks where constraints, guardrails, or quality standards need to be enforced — the Rules component directly addresses what the AI should and should not do, reducing the need for post-hoc correction.
|
|
5
|
+
CARE (Context, Ask, Rules, Examples) is a practitioner framework from Nielsen Norman Group that adds an explicit **Rules** component to the standard context-task-examples pattern. This makes it particularly effective for tasks where constraints, guardrails, or quality standards need to be enforced — the Rules component directly addresses what the AI should and should not do, reducing the need for post-hoc correction. Section headers are stripped at emission, so a CARE prompt lands as a flat block — a paragraph of context, a sentence naming the ask, a list of self-standing rules, and one or more labelled examples — preceded by an optional source-material block whenever the task works from a document or draft the user already has.
|
|
6
6
|
|
|
7
7
|
**Origin:** Nielsen Norman Group (nngroup.com) — a leading UX and AI research firm. The NNg formulation focuses on making prompts "CAREFUL" — ensuring AI outputs are constrained, targeted, and appropriately scoped.
|
|
8
8
|
|
|
9
9
|
## Components
|
|
10
10
|
|
|
11
11
|
### C — Context
|
|
12
|
-
**Purpose:** Provide the background and situation needed to understand the task — who you are, what the situation is, and why this task matters.
|
|
12
|
+
**Purpose:** Provide the background and situation needed to understand the task — who you are, what the situation is, and why this task matters. It fills as a self-contained paragraph and survives header stripping on its own, so long as it reads as description of a situation rather than a bare label.
|
|
13
13
|
|
|
14
14
|
**Questions to Ask:**
|
|
15
15
|
- Who are you in this situation?
|
|
@@ -17,24 +17,24 @@ CARE (Context, Ask, Rules, Examples) is a practitioner framework from Nielsen No
|
|
|
17
17
|
- Why is this task being done?
|
|
18
18
|
|
|
19
19
|
**Examples:**
|
|
20
|
-
- "I am a UX designer preparing for a usability study
|
|
21
|
-
- "We are a healthcare startup building a patient-facing mobile app
|
|
22
|
-
- "I am a manager writing a performance review for a direct report
|
|
20
|
+
- "I am a UX designer preparing for a usability study on our mobile banking app."
|
|
21
|
+
- "We are a healthcare startup building a patient-facing mobile app for people with low health literacy."
|
|
22
|
+
- "I am a manager writing a performance review for a direct report."
|
|
23
23
|
|
|
24
24
|
### A — Ask
|
|
25
|
-
**Purpose:** State the specific request — what you want the AI to produce or do.
|
|
25
|
+
**Purpose:** State the specific request — what you want the AI to produce or do — as one complete imperative sentence. When source material is supplied above, refer to it as "the … above," never "below," so the reference still points at the pasted artifact once the header is gone.
|
|
26
26
|
|
|
27
27
|
**Questions to Ask:**
|
|
28
28
|
- What is the exact deliverable?
|
|
29
29
|
- What should the output be?
|
|
30
30
|
|
|
31
31
|
**Examples:**
|
|
32
|
-
- "Write a set of 5 interview questions for testing navigation usability
|
|
33
|
-
- "Draft a 3-paragraph executive summary of
|
|
34
|
-
- "Create a rubric for evaluating onboarding email effectiveness
|
|
32
|
+
- "Write a set of 5 interview questions for testing navigation usability."
|
|
33
|
+
- "Draft a 3-paragraph executive summary of the technical report above."
|
|
34
|
+
- "Create a rubric for evaluating onboarding email effectiveness."
|
|
35
35
|
|
|
36
36
|
### R — Rules
|
|
37
|
-
**Purpose:** Define explicit constraints, guardrails, standards, and dos/don'ts that govern the output. This is the defining component of CARE — it makes requirements explicit rather than assumed.
|
|
37
|
+
**Purpose:** Define explicit constraints, guardrails, standards, and dos/don'ts that govern the output. This is the defining component of CARE — it makes requirements explicit rather than assumed. Each rule must be a complete, self-standing clause, and every prohibition must carry its own negation ("Do not…", "Never…", "No…"): the `RULES` header is stripped at emission, and a bare noun phrase left in its place reads as a thing to do rather than a thing to avoid.
|
|
38
38
|
|
|
39
39
|
**Questions to Ask:**
|
|
40
40
|
- What must be included?
|
|
@@ -44,12 +44,12 @@ CARE (Context, Ask, Rules, Examples) is a practitioner framework from Nielsen No
|
|
|
44
44
|
- What would make this output wrong or unusable?
|
|
45
45
|
|
|
46
46
|
**Examples:**
|
|
47
|
-
- "
|
|
48
|
-
- "
|
|
49
|
-
- "
|
|
47
|
+
- "Use plain language (max grade 8 reading level). Avoid medical jargon. Each question must be open-ended, not yes/no. Do not suggest answers in the question wording."
|
|
48
|
+
- "Keep it under 300 words. No bullet points — prose only. Include a clear recommendation. Do not mention competitor names."
|
|
49
|
+
- "Comply with ADA language guidelines. Use no deficit-based language. Use first-person framing only."
|
|
50
50
|
|
|
51
51
|
### E — Examples
|
|
52
|
-
**Purpose:** Provide 1-3 examples that demonstrate the desired output format, tone, style, or quality level.
|
|
52
|
+
**Purpose:** Provide 1-3 examples that demonstrate the desired output format, tone, style, or quality level. Label each example in prose — "Good:", "Bad:", or a short framing sentence — because the `EXAMPLES` header is stripped, and an unlabelled sample dropped into the flat block reads as part of the instructions rather than as a reference.
|
|
53
53
|
|
|
54
54
|
**Questions to Ask:**
|
|
55
55
|
- Is there an existing example of what good looks like?
|
|
@@ -57,36 +57,62 @@ CARE (Context, Ask, Rules, Examples) is a practitioner framework from Nielsen No
|
|
|
57
57
|
- What tone should it mirror?
|
|
58
58
|
|
|
59
59
|
**Examples:**
|
|
60
|
-
- "
|
|
61
|
-
- "
|
|
62
|
-
- "Example format: [show template]"
|
|
60
|
+
- "Good question: 'Walk me through how you would find the settings for your account.'"
|
|
61
|
+
- "Good summary paragraph: [paste existing example]"
|
|
62
|
+
- "Example format to match: [show template]"
|
|
63
63
|
|
|
64
64
|
## Template Structure
|
|
65
65
|
|
|
66
|
+
Section headers are stripped at emission, so every slot's meaning is carried by the prose
|
|
67
|
+
around and inside it rather than by the header above it. This matters most for the Rules
|
|
68
|
+
list: each rule must be a complete clause, and every prohibition must keep its own negation.
|
|
69
|
+
A bare noun phrase left where the `RULES` header used to be reads as an instruction to do
|
|
70
|
+
the very thing it was meant to forbid. Examples must be labelled in prose for the same
|
|
71
|
+
reason — an unlabelled sample reads as part of the ask once its header is gone.
|
|
72
|
+
|
|
66
73
|
```
|
|
74
|
+
SOURCE MATERIAL:
|
|
75
|
+
[Optional — include only if this task works from material you already have. Paste the source document, data, or draft this task operates on here. If you have nothing to paste, delete this bracketed block along with the sentence directly below it.]
|
|
76
|
+
Use the material above as the factual basis for the work described below.
|
|
77
|
+
|
|
67
78
|
CONTEXT:
|
|
68
|
-
[Who you are, the situation, why this task exists]
|
|
79
|
+
[Who you are, the situation you're in, and why this task exists]
|
|
69
80
|
|
|
70
81
|
ASK:
|
|
71
82
|
[The specific request and deliverable]
|
|
72
83
|
|
|
73
84
|
RULES:
|
|
74
|
-
[Explicit constraints
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
[Explicit constraints governing the output:
|
|
86
|
+
- What must be included
|
|
87
|
+
- What must be avoided
|
|
88
|
+
- Format and length requirements
|
|
89
|
+
- Tone and reading level standards
|
|
90
|
+
- Quality bar or compliance requirements]
|
|
77
91
|
|
|
78
92
|
EXAMPLES:
|
|
79
|
-
[1-3 examples
|
|
93
|
+
[1-3 examples showing the desired output format, tone, or quality standard]
|
|
80
94
|
```
|
|
81
95
|
|
|
96
|
+
`SOURCE MATERIAL` is a fifth block in a four-letter acronym, and it carries no letter
|
|
97
|
+
because it is optional. When a CARE task works from something that already exists — a
|
|
98
|
+
report to summarize, clinical guidance to translate, a draft to revise — that artifact is
|
|
99
|
+
pasted here and the Ask refers to it as "the … above." Delete the block and the sentence
|
|
100
|
+
beneath it whenever the task generates from scratch, which for constraint-driven CARE tasks
|
|
101
|
+
is common.
|
|
102
|
+
|
|
82
103
|
## Complete Examples
|
|
83
104
|
|
|
105
|
+
Every example below is shown in emitted form: each slot carries its own role in prose.
|
|
106
|
+
Read the headers as scaffolding that will be deleted — the examples are written so that
|
|
107
|
+
nothing is lost when it is.
|
|
108
|
+
|
|
84
109
|
### Example 1: UX Research
|
|
85
110
|
|
|
86
111
|
**Before CARE:**
|
|
87
112
|
"Write interview questions for our usability study."
|
|
88
113
|
|
|
89
|
-
**After CARE
|
|
114
|
+
**After CARE** (no source material — the questions are written from scratch, so the
|
|
115
|
+
`SOURCE MATERIAL` block and the sentence below it are both deleted):
|
|
90
116
|
```
|
|
91
117
|
CONTEXT:
|
|
92
118
|
I am a UX researcher preparing for a moderated usability study on our
|
|
@@ -102,9 +128,9 @@ RULES:
|
|
|
102
128
|
- All questions must be open-ended (no yes/no questions)
|
|
103
129
|
- Use plain, everyday language — no banking or UX jargon
|
|
104
130
|
- Do not suggest answers within the question (no leading questions)
|
|
105
|
-
- Each question should address one thing only (no double-barreled)
|
|
131
|
+
- Each question should address one thing only (no double-barreled questions)
|
|
106
132
|
- Avoid "why" questions (use "what made you..." instead)
|
|
107
|
-
-
|
|
133
|
+
- Each question should take no more than 3 minutes to answer
|
|
108
134
|
|
|
109
135
|
EXAMPLES:
|
|
110
136
|
Good: "What went through your mind when you reached the confirmation screen?"
|
|
@@ -116,24 +142,28 @@ Bad: "Was the confirmation screen clear and easy to understand?" (yes/no, leadin
|
|
|
116
142
|
**Before CARE:**
|
|
117
143
|
"Write patient education content about diabetes management."
|
|
118
144
|
|
|
119
|
-
**After CARE
|
|
145
|
+
**After CARE** (source material supplied):
|
|
120
146
|
```
|
|
147
|
+
SOURCE MATERIAL:
|
|
148
|
+
[Paste the clinical guidance on blood sugar monitoring here]
|
|
149
|
+
Use the material above as the factual basis for the work described below.
|
|
150
|
+
|
|
121
151
|
CONTEXT:
|
|
122
152
|
I am a health content writer for a patient portal used by adults with
|
|
123
153
|
Type 2 diabetes. Many patients have low health literacy. The content
|
|
124
154
|
will appear in a mobile app alongside their care plan.
|
|
125
155
|
|
|
126
156
|
ASK:
|
|
127
|
-
|
|
128
|
-
and how often to check.
|
|
157
|
+
Rewrite the clinical guidance above into a 200-word article explaining why
|
|
158
|
+
blood sugar monitoring matters and how often to check.
|
|
129
159
|
|
|
130
160
|
RULES:
|
|
131
161
|
- Maximum 6th grade reading level (use Flesch-Kincaid as guide)
|
|
132
|
-
- Avoid medical jargon; if medical term must be used, define it
|
|
162
|
+
- Avoid medical jargon; if a medical term must be used, define it
|
|
133
163
|
- Use active voice and second-person ("you") throughout
|
|
134
|
-
-
|
|
164
|
+
- Do not include numbers or statistics unless critical — prefer plain descriptions
|
|
135
165
|
- Must include a clear, simple call to action at the end
|
|
136
|
-
- Do not recommend specific monitoring frequency — use "as directed by your doctor"
|
|
166
|
+
- Do not recommend a specific monitoring frequency — use "as directed by your doctor"
|
|
137
167
|
- Comply with plain language guidelines (short sentences, common words)
|
|
138
168
|
|
|
139
169
|
EXAMPLES:
|
|
@@ -148,7 +178,8 @@ response to dietary and physical stimuli."
|
|
|
148
178
|
**Before CARE:**
|
|
149
179
|
"Write error messages for our app."
|
|
150
180
|
|
|
151
|
-
**After CARE
|
|
181
|
+
**After CARE** (no source material — the messages are written from scratch, so the
|
|
182
|
+
`SOURCE MATERIAL` block and the sentence below it are both deleted):
|
|
152
183
|
```
|
|
153
184
|
CONTEXT:
|
|
154
185
|
I am a product designer writing UI error messages for a B2B data analytics
|
|
@@ -161,12 +192,12 @@ Write error messages for these 3 error states: (1) file format not supported,
|
|
|
161
192
|
|
|
162
193
|
RULES:
|
|
163
194
|
- Maximum 2 sentences per error message
|
|
164
|
-
-
|
|
195
|
+
- Each message must include what happened and what the user can do about it
|
|
165
196
|
- Use plain language — no HTTP status codes, no stack traces, no internal IDs
|
|
166
|
-
-
|
|
197
|
+
- Use active voice and direct address ("You can..." not "The user can...")
|
|
167
198
|
- Do not blame the user ("You uploaded the wrong format" is bad)
|
|
168
|
-
-
|
|
169
|
-
-
|
|
199
|
+
- Each message must include a specific actionable next step, not just "try again"
|
|
200
|
+
- Keep the tone calm, helpful, and matter-of-fact — not apologetic or alarming
|
|
170
201
|
|
|
171
202
|
EXAMPLES:
|
|
172
203
|
Good: "This file type isn't supported. Try uploading a .CSV or .XLSX file."
|