@ckelsoe/prompt-architect 3.3.1 → 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 +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +19 -0
- package/adapters/system-prompt.md +77 -51
- package/package.json +2 -2
- package/scripts/test.js +26 -0
- package/skills/prompt-architect/SKILL.md +49 -36
- 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 +30 -31
- 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 +43 -28
- 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 +143 -57
- package/skills/prompt-architect/references/frameworks/bab.md +137 -58
- package/skills/prompt-architect/references/frameworks/broke.md +157 -57
- package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +183 -75
- package/skills/prompt-architect/references/frameworks/care.md +67 -36
- package/skills/prompt-architect/references/frameworks/chain-of-density.md +49 -27
- package/skills/prompt-architect/references/frameworks/chain-of-thought.md +28 -7
- package/skills/prompt-architect/references/frameworks/co-star.md +100 -44
- package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
- package/skills/prompt-architect/references/frameworks/ctf.md +73 -37
- package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
- package/skills/prompt-architect/references/frameworks/iterative-compression.md +236 -269
- 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 +176 -66
- package/skills/prompt-architect/references/frameworks/race.md +91 -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 +22 -15
- package/skills/prompt-architect/references/frameworks/rise.md +94 -70
- package/skills/prompt-architect/references/frameworks/risen.md +80 -28
- package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
- package/skills/prompt-architect/references/frameworks/rtf.md +2 -2
- package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
- package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +67 -21
- package/skills/prompt-architect/references/frameworks/step-back.md +47 -15
- package/skills/prompt-architect/references/frameworks/tidd-ec.md +110 -45
- package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
|
@@ -34,12 +34,12 @@ Entity identification is done by the model itself inside the loop — there is n
|
|
|
34
34
|
|
|
35
35
|
## The Method
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
`[N]` iterations, issued as a **single prompt** that returns all `[N]` summaries at once (not `[N]` separate turns). The paper uses five, and that is the template's default when the user gives no number:
|
|
38
38
|
|
|
39
|
-
1. **Write a deliberately sparse first summary.** Long (4-5 sentences,
|
|
39
|
+
1. **Write a deliberately sparse first summary.** Long (4-5 sentences, ~`[TARGET]` words) but highly non-specific, padded with filler like "this article discusses." The padding is intentional — it creates the slack that later steps convert into entities.
|
|
40
40
|
2. **Identify 1-3 missing entities** from the article that are absent from the current summary.
|
|
41
41
|
3. **Rewrite at identical length**, covering everything from the previous summary *plus* the new entities. Make room through fusion, compression, and removal of uninformative phrases.
|
|
42
|
-
4. **Repeat steps 2-3** until
|
|
42
|
+
4. **Repeat steps 2-3** until `[N]` summaries exist.
|
|
43
43
|
5. **Choose the step you want.** Later is not automatically better — human raters preferred steps 2-3.
|
|
44
44
|
|
|
45
45
|
**Never drop entities from the previous summary.** If space cannot be made, add fewer new entities. Under pressure, density yields — length and prior content do not.
|
|
@@ -57,49 +57,71 @@ Five iterations, issued as a **single prompt** that returns all five summaries a
|
|
|
57
57
|
- Progressive shortening to a target word count → use **Iterative Compression**
|
|
58
58
|
- Non-summarization tasks. CoD is summarization-specific; the paper evaluates it only on news articles (CNN/DailyMail).
|
|
59
59
|
|
|
60
|
-
##
|
|
60
|
+
## Template Structure
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
The block below is the template's prompt region as authored — what you fill in, not what you send. (Its divider rules are omitted; they mark the guidance/prompt boundary inside the template file and never ship.) Section headers are stripped at emission, so every slot's meaning is carried by the prose around and inside it rather than by the header above it. `SOURCE MATERIAL:` is such a header — it goes, and the unbracketed sentence below it is what tells the model the pasted text is the article to summarize. `Step 1.`, `Step 2.` and `Guidelines:` are the exception: they are literal labels inside the paper's protocol, not document structure, and they ship verbatim.
|
|
63
|
+
|
|
64
|
+
`[TARGET]` is the fixed word budget and `[N]` the number of summaries, both as bare numerals. Substitute the same numeral at every occurrence of each — in the prompt body below, `[TARGET]` appears three times and `[N]` three times. (The template file names each twice more in its guidance region; those are descriptions of the fields, not slots, and never ship.) The paper's settings are `[TARGET]` = 80 and `[N]` = 5; use those if the user gave no numbers of their own.
|
|
63
65
|
|
|
64
66
|
```
|
|
65
|
-
|
|
67
|
+
SOURCE MATERIAL:
|
|
68
|
+
[Paste the full document to be summarized here.]
|
|
69
|
+
Use the material above as the article to be summarized for the work described below.
|
|
66
70
|
|
|
67
|
-
You will generate increasingly concise, entity-dense summaries of the above
|
|
71
|
+
You will generate increasingly concise, entity-dense summaries of the article above.
|
|
72
|
+
Produce [N] summaries in total, each denser than the last, all in a single response.
|
|
73
|
+
Every summary must be exactly [TARGET] words long.
|
|
68
74
|
|
|
69
|
-
Repeat the following 2 steps
|
|
75
|
+
Repeat the following 2 steps [N] times.
|
|
70
76
|
|
|
71
|
-
Step 1. Identify 1-3 informative
|
|
72
|
-
missing from the previously generated summary.
|
|
73
|
-
Step 2. Write a new, denser summary of identical length which covers every entity
|
|
74
|
-
detail from the previous summary plus the
|
|
77
|
+
Step 1. Identify 1-3 informative entities (";" delimited) from the article which
|
|
78
|
+
are missing from the previously generated summary.
|
|
79
|
+
Step 2. Write a new, denser summary of identical length which covers every entity
|
|
80
|
+
and detail from the previous summary plus the missing entities.
|
|
75
81
|
|
|
76
|
-
A
|
|
82
|
+
A missing entity is:
|
|
77
83
|
- Relevant: to the main story.
|
|
78
84
|
- Specific: descriptive yet concise (5 words or fewer).
|
|
79
85
|
- Novel: not in the previous summary.
|
|
80
|
-
- Faithful: present in the
|
|
81
|
-
- Anywhere: located anywhere in the
|
|
86
|
+
- Faithful: present in the article.
|
|
87
|
+
- Anywhere: located anywhere in the article.
|
|
82
88
|
|
|
83
89
|
Guidelines:
|
|
84
|
-
- The first summary should be long (4-5 sentences, ~
|
|
85
|
-
containing little information beyond the entities marked as missing.
|
|
86
|
-
language and fillers (e.g., "this article discusses") to reach
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
- The first summary should be long (4-5 sentences, ~[TARGET] words) yet highly
|
|
91
|
+
non-specific, containing little information beyond the entities marked as missing.
|
|
92
|
+
Use overly verbose language and fillers (e.g., "this article discusses") to reach
|
|
93
|
+
~[TARGET] words.
|
|
94
|
+
- Make every word count: re-write the previous summary to improve flow and make
|
|
95
|
+
space for additional entities.
|
|
96
|
+
- Make space with fusion, compression, and removal of uninformative phrases like
|
|
97
|
+
"the article discusses".
|
|
98
|
+
- The summaries should become highly dense and concise yet self-contained, e.g.,
|
|
99
|
+
easily understood without the article.
|
|
93
100
|
- Missing entities can appear anywhere in the new summary.
|
|
94
|
-
- Never drop entities from the previous summary. If space cannot be made, add
|
|
95
|
-
entities.
|
|
101
|
+
- Never drop entities from the previous summary. If space cannot be made, add
|
|
102
|
+
fewer new entities.
|
|
96
103
|
|
|
97
104
|
Remember, use the exact same number of words for each summary.
|
|
98
105
|
|
|
99
|
-
Answer in JSON. The JSON should be a list (length
|
|
106
|
+
Answer in JSON. The JSON should be a list (length [N]) of dictionaries whose keys are
|
|
100
107
|
"Missing_Entities" and "Denser_Summary".
|
|
108
|
+
|
|
109
|
+
After the JSON, and outside it, add one short paragraph naming which summary you
|
|
110
|
+
recommend and why. Do not default to the last one: in the paper's human evaluation,
|
|
111
|
+
summary 2 (30.8% of first-place votes) and summary 3 (23.0%) were preferred over the
|
|
112
|
+
sparse summary 1 (8.3%), because past a point density costs readability.
|
|
101
113
|
```
|
|
102
114
|
|
|
115
|
+
### Relationship to the paper's original prompt
|
|
116
|
+
|
|
117
|
+
The body above is the paper's prompt, reproduced closely on purpose — the specific wording, especially the fixed-length instruction and the entity criteria, is what makes the technique work. Three deliberate departures:
|
|
118
|
+
|
|
119
|
+
- **`SOURCE MATERIAL:` replaces the paper's `Article: {{ARTICLE}}` field.** Same job, house convention, and the trailing sentence survives header-stripping where a bare `Article:` label would not.
|
|
120
|
+
- **`[TARGET]` and `[N]` are parameterized** where the paper hardcodes 80 and 5, so the template serves a user-supplied budget and pass count.
|
|
121
|
+
- **The closing recommendation paragraph is an addition, not from the paper.** The paper reports the preference numbers; it does not instruct the model to act on them. This template does, so the user gets a pick rather than a default-to-last.
|
|
122
|
+
|
|
123
|
+
Sentence-case "missing entity" and "article" replace the paper's mid-sentence capitals. That is formatting only — no wording changed.
|
|
124
|
+
|
|
103
125
|
## Worked Example
|
|
104
126
|
|
|
105
127
|
**Source:** a 1,200-word news article about a municipal transit funding decision.
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Chain of Thought is a prompting technique that encourages step-by-step reasoning and makes the thinking process explicit. Instead of jumping to answers, it guides Claude to break down complex problems, show intermediate steps, and verify logic along the way.
|
|
6
6
|
|
|
7
|
+
When prompt-architect emits a Chain-of-Thought prompt, its framework section headers — `PROBLEM / QUESTION`, `SOURCE MATERIAL`, `REASONING INSTRUCTION` — are stripped and the model receives a flat block. The reasoning instruction is written as a complete sentence so it survives on its own, while the numbered step labels the prompt requests (`Step 1:`, `STEP 1 - REQUIREMENTS:`) are literal labels inside the reasoning protocol and stay in place. An optional `SOURCE MATERIAL` block holds the code, data, or document being reasoned over and is deleted when the problem is self-contained.
|
|
8
|
+
|
|
7
9
|
**Research basis:** "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models" (Wei et al., Google Research, arXiv 2201.11903, NeurIPS 2022). Prompting PaLM 540B with eight chain-of-thought exemplars raised GSM8K accuracy from 17.9% with standard prompting to 56.9%, beating the prior fine-tuned state of the art of 55% (GPT-3 plus a verifier, Cobbe et al. 2021).
|
|
8
10
|
|
|
9
11
|
## Core Concept
|
|
@@ -168,6 +170,16 @@ Poor:
|
|
|
168
170
|
|
|
169
171
|
## Complete Examples
|
|
170
172
|
|
|
173
|
+
Every example below is shown in emitted form. Two kinds of label appear, and they behave
|
|
174
|
+
differently at emission. The framework's own section headers — `SOURCE MATERIAL:`,
|
|
175
|
+
`PROBLEM / QUESTION:`, `REASONING INSTRUCTION:` — are scaffolding and are stripped, so each
|
|
176
|
+
is written so its instruction still reads once the header is gone. The numbered
|
|
177
|
+
reasoning-step labels the prompt asks for (`Step 1:`, `STEP 1 - REQUIREMENTS:`) are literal
|
|
178
|
+
labels inside the reasoning protocol, not section headers, and they survive into the emitted
|
|
179
|
+
prompt exactly as written — they are what the model is being told to produce. Where the
|
|
180
|
+
reasoning runs over an existing artifact, the `SOURCE MATERIAL` block carries it; where the
|
|
181
|
+
task starts from a blank page, that block is deleted.
|
|
182
|
+
|
|
171
183
|
### Example 1: Debugging
|
|
172
184
|
|
|
173
185
|
**Without CoT:**
|
|
@@ -176,14 +188,19 @@ Why isn't this code working?
|
|
|
176
188
|
[code snippet]
|
|
177
189
|
```
|
|
178
190
|
|
|
179
|
-
**With CoT
|
|
191
|
+
**With CoT** (source material supplied):
|
|
180
192
|
```
|
|
181
|
-
|
|
193
|
+
SOURCE MATERIAL:
|
|
194
|
+
[Paste the code you want debugged here]
|
|
195
|
+
The reasoning that follows must work from the material above, not from
|
|
196
|
+
assumptions about it.
|
|
182
197
|
|
|
183
|
-
|
|
198
|
+
PROBLEM / QUESTION:
|
|
199
|
+
Debug the code above by thinking through it step-by-step.
|
|
184
200
|
|
|
201
|
+
REASONING INSTRUCTION:
|
|
185
202
|
Use this process:
|
|
186
|
-
1. Read the code and state what it
|
|
203
|
+
1. Read the code and state what it is supposed to do
|
|
187
204
|
2. Identify the input and expected output
|
|
188
205
|
3. Trace through execution line by line
|
|
189
206
|
4. Note any suspicious patterns or red flags
|
|
@@ -201,7 +218,9 @@ Use this process:
|
|
|
201
218
|
Design a URL shortener.
|
|
202
219
|
```
|
|
203
220
|
|
|
204
|
-
**With CoT
|
|
221
|
+
**With CoT** (no source material — the design is worked out from scratch, so no
|
|
222
|
+
`SOURCE MATERIAL` block is needed; the `STEP N -` labels are literal protocol labels and
|
|
223
|
+
survive header stripping):
|
|
205
224
|
```
|
|
206
225
|
Design a URL shortener by working through these steps:
|
|
207
226
|
|
|
@@ -244,7 +263,9 @@ For each step, explain your reasoning.
|
|
|
244
263
|
Should we use MongoDB or PostgreSQL?
|
|
245
264
|
```
|
|
246
265
|
|
|
247
|
-
**With CoT
|
|
266
|
+
**With CoT** (no source material — the decision is reasoned out from scratch, so no
|
|
267
|
+
`SOURCE MATERIAL` block is needed; the `STEP N -` labels are literal protocol labels and
|
|
268
|
+
survive header stripping):
|
|
248
269
|
```
|
|
249
270
|
Decide between MongoDB and PostgreSQL by reasoning through:
|
|
250
271
|
|
|
@@ -306,7 +327,7 @@ STEPS:
|
|
|
306
327
|
...
|
|
307
328
|
```
|
|
308
329
|
|
|
309
|
-
### CoT + RISE
|
|
330
|
+
### CoT + RISE-IE
|
|
310
331
|
```
|
|
311
332
|
ROLE: [Analyst]
|
|
312
333
|
INPUT: [Data]
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
CO-STAR is a comprehensive prompting framework that emphasizes context, audience, and communication style. It's particularly effective for content creation, writing tasks, and scenarios where tone and audience considerations significantly impact output quality.
|
|
5
|
+
CO-STAR is a comprehensive prompting framework that emphasizes context, audience, and communication style. It's particularly effective for content creation, writing tasks, and scenarios where tone and audience considerations significantly impact output quality. Section headers are stripped at emission, so a CO-STAR prompt lands as a flat block of prose — a paragraph of context, a stated objective, and self-standing sentences for style, tone, audience, and response format — preceded by an optional source-material block whenever the content is built from an artifact the user already has. Because the `STYLE`, `TONE`, and `AUDIENCE` labels do not survive, those slots have to be written as complete sentences rather than the bare descriptors ("professional yet friendly," "senior executives") they would otherwise collapse to.
|
|
6
6
|
|
|
7
7
|
**Origin:** Developed by the Data Science & AI team at GovTech (Government Technology Agency of Singapore), and popularized by Sheila Teo, who won GovTech's "Prompt Royale" — Singapore's first GPT-4 prompt engineering competition, 400+ participants, finale 8 November 2023. Teo credits the framework to GovTech rather than to herself: "The CO-STAR framework, a brainchild of GovTech Singapore's Data Science & AI team, is a handy template for structuring prompts." Practitioner framework — no controlled evaluation of CO-STAR has been published.
|
|
8
8
|
|
|
9
9
|
## Components
|
|
10
10
|
|
|
11
11
|
### C - Context
|
|
12
|
-
**Purpose:** Provide background information, situational details, and constraints.
|
|
12
|
+
**Purpose:** Provide background information, situational details, and constraints. 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
|
- What's the background situation?
|
|
@@ -19,12 +19,12 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
|
|
|
19
19
|
- Are there any limitations or restrictions?
|
|
20
20
|
|
|
21
21
|
**Examples:**
|
|
22
|
-
- "You're working with a startup that has limited resources
|
|
23
|
-
- "This is for a formal government report
|
|
24
|
-
- "The user base is primarily non-technical
|
|
22
|
+
- "You're working with a startup that has limited resources."
|
|
23
|
+
- "This is for a formal government report."
|
|
24
|
+
- "The user base is primarily non-technical."
|
|
25
25
|
|
|
26
26
|
### O - Objective
|
|
27
|
-
**Purpose:** Define the clear, specific goal to be achieved.
|
|
27
|
+
**Purpose:** Define the clear, specific goal to be achieved, as one complete imperative sentence. Nothing else in the prompt states the task, so once the `OBJECTIVE` header is gone a bare goal fragment leaves the emitted prompt without an instruction.
|
|
28
28
|
|
|
29
29
|
**Questions to Ask:**
|
|
30
30
|
- What exactly do you want accomplished?
|
|
@@ -33,12 +33,12 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
|
|
|
33
33
|
- Are there secondary goals?
|
|
34
34
|
|
|
35
35
|
**Examples:**
|
|
36
|
-
- "Create a comprehensive product comparison
|
|
37
|
-
- "Generate ideas for reducing customer churn
|
|
38
|
-
- "Explain the concept in simple terms
|
|
36
|
+
- "Create a comprehensive product comparison of the three tools above."
|
|
37
|
+
- "Generate ideas for reducing customer churn."
|
|
38
|
+
- "Explain the concept in simple terms."
|
|
39
39
|
|
|
40
40
|
### S - Style
|
|
41
|
-
**Purpose:** Specify the writing style, format, and structural preferences.
|
|
41
|
+
**Purpose:** Specify the writing style, format, and structural preferences. Phrase it as an instruction ("Write in…", "Follow…"), not a bare descriptor, because the `STYLE` header is stripped and a fragment like "journalistic, short paragraphs" no longer reads as a directive on its own.
|
|
42
42
|
|
|
43
43
|
**Questions to Ask:**
|
|
44
44
|
- What writing style is appropriate?
|
|
@@ -48,12 +48,12 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
|
|
|
48
48
|
- Any style guides to follow?
|
|
49
49
|
|
|
50
50
|
**Examples:**
|
|
51
|
-
- "Use a journalistic style with short paragraphs
|
|
52
|
-
- "Follow AP style guidelines
|
|
53
|
-
- "Write in a conversational, blog-post style
|
|
51
|
+
- "Use a journalistic style with short paragraphs."
|
|
52
|
+
- "Follow AP style guidelines."
|
|
53
|
+
- "Write in a conversational, blog-post style."
|
|
54
54
|
|
|
55
55
|
### T - Tone
|
|
56
|
-
**Purpose:** Set the emotional quality and attitude of the response.
|
|
56
|
+
**Purpose:** Set the emotional quality and attitude of the response. Because the `TONE` header does not survive emission, write the slot as a complete sentence ("Keep the tone…", "Sound…") — a bare adjective phrase like "professional yet friendly" dangles once the label is deleted.
|
|
57
57
|
|
|
58
58
|
**Questions to Ask:**
|
|
59
59
|
- What emotional quality should it have?
|
|
@@ -62,13 +62,13 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
|
|
|
62
62
|
- Urgent or measured?
|
|
63
63
|
|
|
64
64
|
**Examples:**
|
|
65
|
-
- "
|
|
66
|
-
- "
|
|
67
|
-
- "
|
|
68
|
-
- "
|
|
65
|
+
- "Keep the tone professional yet friendly."
|
|
66
|
+
- "Make it urgent and action-oriented."
|
|
67
|
+
- "Keep it empathetic and supportive."
|
|
68
|
+
- "Sound confident and authoritative."
|
|
69
69
|
|
|
70
70
|
### A - Audience
|
|
71
|
-
**Purpose:** Identify who will consume the output and their characteristics.
|
|
71
|
+
**Purpose:** Identify who will consume the output and their characteristics. Name the audience in a complete sentence ("The audience is…"), because the `AUDIENCE` header is stripped and a bare noun phrase like "senior executives" would otherwise sit in the flat block with nothing marking it as the reader.
|
|
72
72
|
|
|
73
73
|
**Questions to Ask:**
|
|
74
74
|
- Who is the target audience?
|
|
@@ -78,12 +78,12 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
|
|
|
78
78
|
- What's their context?
|
|
79
79
|
|
|
80
80
|
**Examples:**
|
|
81
|
-
- "
|
|
82
|
-
- "
|
|
83
|
-
- "
|
|
81
|
+
- "The audience is senior executives with limited technical knowledge."
|
|
82
|
+
- "The audience is junior developers learning the framework."
|
|
83
|
+
- "The audience is parents of elementary school children."
|
|
84
84
|
|
|
85
85
|
### R - Response
|
|
86
|
-
**Purpose:** Define the expected output format and structure.
|
|
86
|
+
**Purpose:** Define the expected output format and structure. Phrase it as an instruction about the output ("Provide…", "Format the result as…") so it still reads as a directive once the `RESPONSE FORMAT` header is removed.
|
|
87
87
|
|
|
88
88
|
**Questions to Ask:**
|
|
89
89
|
- What format should the output take?
|
|
@@ -93,61 +93,117 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
|
|
|
93
93
|
- What level of detail is needed?
|
|
94
94
|
|
|
95
95
|
**Examples:**
|
|
96
|
-
- "Provide a 500-word article with 3 main sections
|
|
97
|
-
- "
|
|
98
|
-
- "Generate a table comparing features
|
|
96
|
+
- "Provide a 500-word article with 3 main sections."
|
|
97
|
+
- "Format the result as a bulleted list of 10 items."
|
|
98
|
+
- "Generate a table comparing features."
|
|
99
99
|
|
|
100
100
|
## Template Structure
|
|
101
101
|
|
|
102
|
+
Section headers are stripped at emission, so every slot's meaning is carried by the prose
|
|
103
|
+
around and inside it rather than by the header above it. Context is a self-contained
|
|
104
|
+
paragraph and survives on its own; Objective must be a complete imperative sentence; and
|
|
105
|
+
Style, Tone, Audience, and Response Format each have to be phrased as a full sentence,
|
|
106
|
+
because the labels that would otherwise mark them as style, tone, audience, or format are
|
|
107
|
+
the first thing deleted.
|
|
108
|
+
|
|
102
109
|
```
|
|
110
|
+
SOURCE MATERIAL:
|
|
111
|
+
[OPTIONAL — include only if the content is built from material the user already has.
|
|
112
|
+
If so, emit a literal paste instruction naming the specific artifact, e.g. "[Paste the Q3 revenue report here]"
|
|
113
|
+
or "[Paste the blog post whose voice should be matched here]" — never a generic word like "content" —
|
|
114
|
+
then one line of prose tying it to what follows, e.g. "Use the material above as the factual and stylistic
|
|
115
|
+
basis for what you produce; do not invent details it does not support."
|
|
116
|
+
If the content is written entirely from scratch, omit this section — do not emit an empty placeholder.]
|
|
117
|
+
|
|
103
118
|
CONTEXT:
|
|
104
|
-
[
|
|
119
|
+
[Provide background information, situation, and any relevant constraints. What's the setting? What's happened before? What limitations exist?]
|
|
105
120
|
|
|
106
121
|
OBJECTIVE:
|
|
107
|
-
[
|
|
122
|
+
[State the clear, specific goal you want to achieve. What exactly do you want accomplished? What does success look like?]
|
|
108
123
|
|
|
109
124
|
STYLE:
|
|
110
|
-
[
|
|
125
|
+
[Specify the writing style, format preferences, and structural approach. Should it follow a particular style guide? What format is needed?]
|
|
111
126
|
|
|
112
127
|
TONE:
|
|
113
|
-
[
|
|
128
|
+
[Define the emotional quality and attitude. Should it be professional, casual, urgent, friendly, authoritative, empathetic, etc.?]
|
|
114
129
|
|
|
115
130
|
AUDIENCE:
|
|
116
|
-
[
|
|
131
|
+
[Identify who will consume this output. What's their expertise level? What do they care about? What are their characteristics?]
|
|
117
132
|
|
|
118
133
|
RESPONSE FORMAT:
|
|
119
|
-
[
|
|
134
|
+
[Specify the expected output structure. How long? What sections? What level of detail? Any specific format requirements?]
|
|
120
135
|
```
|
|
121
136
|
|
|
122
|
-
|
|
137
|
+
`SOURCE MATERIAL` is a seventh block in a six-letter acronym, and it carries no letter
|
|
138
|
+
because it is optional. Much CO-STAR work rewrites, repurposes, or matches the voice of
|
|
139
|
+
something that already exists — a report to summarize, a press release to adapt, a post
|
|
140
|
+
whose style should be echoed — and that artifact is pasted here, named concretely (never
|
|
141
|
+
the generic word "content"), and referred to as "the … above" from inside the Objective.
|
|
142
|
+
Delete the block whenever the content is written entirely from scratch; do not leave an
|
|
143
|
+
empty placeholder.
|
|
144
|
+
|
|
145
|
+
## Complete Examples
|
|
123
146
|
|
|
124
|
-
|
|
147
|
+
Every example below is shown in emitted form: each slot carries its own role in prose.
|
|
148
|
+
Read the headers as scaffolding that will be deleted — the examples are written so that
|
|
149
|
+
nothing is lost when it is, which is why Style, Tone, Audience, and Response Format each
|
|
150
|
+
read as a complete sentence.
|
|
151
|
+
|
|
152
|
+
### Example 1: Health Blog Article
|
|
153
|
+
|
|
154
|
+
**Before CO-STAR:**
|
|
125
155
|
"Write about the benefits of exercise."
|
|
126
156
|
|
|
127
|
-
|
|
157
|
+
**After CO-STAR** (no source material — the article is written from scratch, so the
|
|
158
|
+
`SOURCE MATERIAL` block is omitted):
|
|
128
159
|
```
|
|
129
160
|
CONTEXT:
|
|
130
161
|
I'm creating content for a health blog aimed at busy professionals who struggle to find time for fitness. Previous articles have focused on nutrition, and this is part of a series on lifestyle improvements.
|
|
131
162
|
|
|
132
163
|
OBJECTIVE:
|
|
133
|
-
|
|
164
|
+
Write an engaging article that convinces time-pressed professionals that exercise is worth prioritizing, focusing on benefits beyond just physical health.
|
|
134
165
|
|
|
135
166
|
STYLE:
|
|
136
167
|
Use a conversational blog style with short paragraphs (2-3 sentences), subheadings every 150-200 words, and occasional bullet points for key takeaways. Include specific examples and avoid medical jargon.
|
|
137
168
|
|
|
138
169
|
TONE:
|
|
139
|
-
|
|
170
|
+
Keep the tone encouraging and motivating without being preachy. Acknowledge their time constraints and show empathy for their challenges, and stay practical and realistic rather than idealistic.
|
|
171
|
+
|
|
172
|
+
AUDIENCE:
|
|
173
|
+
The audience is professionals aged 30-50 who work 50+ hour weeks, have limited free time, may have families, and currently don't exercise regularly. They're skeptical of fitness advice that seems unrealistic for their lifestyle.
|
|
174
|
+
|
|
175
|
+
RESPONSE FORMAT:
|
|
176
|
+
Produce an 800-word article with an engaging headline, a brief 2-3 sentence introduction, 4-5 main sections with subheadings, bullet points highlighting key benefits, and a practical conclusion with next steps.
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Example 2: Executive Summary from a Report
|
|
180
|
+
|
|
181
|
+
**Before CO-STAR:**
|
|
182
|
+
"Summarize this report for the board."
|
|
183
|
+
|
|
184
|
+
**After CO-STAR** (source material supplied):
|
|
185
|
+
```
|
|
186
|
+
SOURCE MATERIAL:
|
|
187
|
+
[Paste the Q3 revenue report here]
|
|
188
|
+
Use the material above as the factual and stylistic basis for what you produce; do not invent details it does not support.
|
|
189
|
+
|
|
190
|
+
CONTEXT:
|
|
191
|
+
I'm the head of finance at a mid-size SaaS company, preparing a summary of our Q3 performance for the board's quarterly meeting. The full report above is 20 pages of financial detail, and the board sees dozens of documents per meeting.
|
|
192
|
+
|
|
193
|
+
OBJECTIVE:
|
|
194
|
+
Distill the Q3 revenue report above into a one-page summary the board can absorb in two minutes, surfacing the numbers and trends that bear on strategic decisions.
|
|
195
|
+
|
|
196
|
+
STYLE:
|
|
197
|
+
Write in a crisp executive-brief style: lead with the conclusion, use short declarative sentences, and support each claim with a figure drawn from the report above rather than a general statement.
|
|
198
|
+
|
|
199
|
+
TONE:
|
|
200
|
+
Keep the tone measured and factual — neither alarmist about the misses nor promotional about the wins.
|
|
140
201
|
|
|
141
202
|
AUDIENCE:
|
|
142
|
-
|
|
203
|
+
The audience is board members who are financially literate but not close to day-to-day operations; they care about growth, runway, and risk, not implementation detail.
|
|
143
204
|
|
|
144
205
|
RESPONSE FORMAT:
|
|
145
|
-
|
|
146
|
-
- Engaging headline
|
|
147
|
-
- Brief introduction (2-3 sentences)
|
|
148
|
-
- 4-5 main sections with subheadings
|
|
149
|
-
- Bullet points highlighting key benefits
|
|
150
|
-
- Practical conclusion with next steps
|
|
206
|
+
Produce a single page: three sentences of headline takeaways, then a short table of the key metrics with quarter-over-quarter change, then a four-item bulleted list of the decisions or risks that need the board's attention.
|
|
151
207
|
```
|
|
152
208
|
|
|
153
209
|
## Best Use Cases
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
CRISPE is a comprehensive general-purpose prompting framework covering six dimensions: Capacity and Role, Insight, Instructions, Personality, and Experiment. Its defining feature — the **Experiment** component — sets it apart from similar frameworks by explicitly asking the AI to produce multiple variants, approaches, or versions, enabling the user to compare and choose the best output rather than accepting a single answer.
|
|
6
6
|
|
|
7
|
-
**Origin:**
|
|
7
|
+
**Origin:** Community framework, commonly attributed to Matt Nigh (2022). No primary source for that attribution has been verified for this package. Practitioner framework — no controlled evaluation of CRISPE has been published.
|
|
8
|
+
|
|
9
|
+
*Correction:* an earlier version of this file stated that CRISPE was "cited in PMC peer-reviewed medical AI studies, 2024-2025" and in "educational technology research (Springer, 2025)." Those claims named no title, author, DOI, or PMCID and were not checkable as written, so they have been removed. Being *mentioned* in a paper would not constitute evaluation of the framework in any case.
|
|
8
10
|
|
|
9
11
|
## Components
|
|
10
12
|
|
|
11
|
-
### C — Capacity and Role
|
|
13
|
+
### C, R — Capacity and Role
|
|
12
14
|
**Purpose:** Define the expertise level and professional role the AI should embody. More specific than a simple "you are a..." — it combines the *type* of expertise with the *level* of sophistication expected.
|
|
13
15
|
|
|
14
16
|
**Questions to Ask:**
|
|
@@ -21,7 +23,7 @@ CRISPE is a comprehensive general-purpose prompting framework covering six dimen
|
|
|
21
23
|
- "You are a senior software architect specializing in distributed systems..."
|
|
22
24
|
- "Act as a world-class UX researcher who has run hundreds of user interviews..."
|
|
23
25
|
|
|
24
|
-
###
|
|
26
|
+
### I — Insight
|
|
25
27
|
**Purpose:** Provide the background context, data, or knowledge the AI needs to perform the task effectively. This is the "briefing" — what you'd tell a new consultant before they start work.
|
|
26
28
|
|
|
27
29
|
**Questions to Ask:**
|
|
@@ -34,7 +36,7 @@ CRISPE is a comprehensive general-purpose prompting framework covering six dimen
|
|
|
34
36
|
- "Context: our team uses Python exclusively, we have a 3-month deadline, and our infrastructure is AWS..."
|
|
35
37
|
- "Background: this is for a Series A startup pitching to enterprise buyers for the first time..."
|
|
36
38
|
|
|
37
|
-
###
|
|
39
|
+
### S — Instructions
|
|
38
40
|
**Purpose:** State clearly and specifically what the AI should do. The task itself, with enough detail to remove ambiguity.
|
|
39
41
|
|
|
40
42
|
**Questions to Ask:**
|
|
@@ -47,7 +49,7 @@ CRISPE is a comprehensive general-purpose prompting framework covering six dimen
|
|
|
47
49
|
- "Create a technical design document for this feature..."
|
|
48
50
|
- "Analyze this data and identify the top 3 risk factors..."
|
|
49
51
|
|
|
50
|
-
###
|
|
52
|
+
### P — Personality (Style)
|
|
51
53
|
**Purpose:** Define the tone, voice, and communication style of the response. Sets how the output should *feel* — the personality it should embody.
|
|
52
54
|
|
|
53
55
|
**Questions to Ask:**
|