doublecheck

doublecheck

Runs a three-layer verification pipeline on AI output: extracts claims, finds sources by web search, checks for hallucination patterns and writes a verification report.

Skill files2 files

assets/

SKILL.md278 lines
1
---
2
name: doublecheck
3
description: 'Three-layer verification pipeline for AI output. Extracts verifiable claims, finds supporting or contradicting sources via web search, runs adversarial review for hallucination patterns, and produces a structured verification report with source links for human review.'
4
---
5
6
# Doublecheck
7
8
Run a three-layer verification pipeline on AI-generated output. The goal is not to tell the user what is true -- it is to extract every verifiable claim, find sources the user can check independently, and flag anything that looks like a hallucination pattern.
9
10
## Activation
11
12
Doublecheck operates in two modes: **active mode** (persistent) and **one-shot mode** (on demand).
13
14
### Active Mode
15
16
When the user invokes this skill without providing specific text to verify, activate persistent doublecheck mode. Respond with:
17
18
> **Doublecheck is now active.** I'll verify factual claims in my responses before presenting them. You'll see an inline verification summary after each substantive response. Say "full report" on any response to get the complete three-layer verification with detailed sourcing. Turn it off anytime by saying "turn off doublecheck."
19
20
Then follow ALL of the rules below for the remainder of the conversation:
21
22
**Rule: Classify every response before sending it.**
23
24
Before producing any substantive response, determine whether it contains verifiable claims. Classify the response:
25
26
| Response type | Contains verifiable claims? | Action |
27
|--------------|---------------------------|--------|
28
| Factual analysis, legal guidance, regulatory interpretation, compliance guidance, or content with case citations or statutory references | Yes -- high density | Run full verification report (see high-stakes content rule below) |
29
| Summary of a document, research, or data | Yes -- moderate density | Run inline verification on key claims |
30
| Code generation, creative writing, brainstorming | Rarely | Skip verification; note that doublecheck mode doesn't apply to this type of content |
31
| Casual conversation, clarifying questions, status updates | No | Skip verification silently |
32
33
**Rule: Inline verification for active mode.**
34
35
When active mode applies, do NOT generate a separate full verification report for every response. Instead, embed verification directly into your response using this pattern:
36
37
1. Generate your response normally.
38
2. After the response, add a `Verification` section.
39
3. In that section, list each verifiable claim with its confidence rating and a source link where available.
40
41
Format:
42
43
```
44
---
45
**Verification (N claims checked)**
46
47
- [VERIFIED] "Claim text" -- Source: [URL]
48
- [VERIFIED] "Claim text" -- Source: [URL]
49
- [PLAUSIBLE] "Claim text" -- no specific source found
50
- [FABRICATION RISK] "Claim text" -- could not find this citation; verify before relying on it
51
```
52
53
For active mode, prioritize speed. Run web searches for citations, specific statistics, and any claim you have low confidence about. You do not need to search for claims that are common knowledge or that you have high confidence about -- just rate them PLAUSIBLE and move on.
54
55
If any claim rates DISPUTED or FABRICATION RISK, call it out prominently before the verification section so the user sees it immediately. When auto-escalation applies (see below), place this callout at the top of the full report, before the summary table:
56
57
```
58
**Heads up:** I'm not confident about [specific claim]. I couldn't find a supporting source. You should verify this independently before relying on it.
59
```
60
61
**Rule: Auto-escalate to full report for high-risk findings.**
62
63
If your inline verification identifies ANY claim rated DISPUTED or FABRICATION RISK, do not produce inline verification. Instead, place the "Heads up" callout at the top of your response and then produce the full three-layer verification report using the template in `assets/verification-report-template.md`. The user should not have to ask for the detailed report when something is clearly wrong.
64
65
**Rule: Full report for high-stakes content.**
66
67
If the response contains legal analysis, regulatory interpretation, compliance guidance, case citations, or statutory references, always produce the full verification report using the template in `assets/verification-report-template.md`. Do not use inline verification for these content types -- the stakes are too high for the abbreviated format.
68
69
**Rule: Discoverability footer for inline verification.**
70
71
When producing inline verification (not a full report), always append this line at the end of the verification section:
72
73
```
74
_Say "full report" for detailed three-layer verification with sources._
75
```
76
77
**Rule: Offer full verification on request.**
78
79
If the user says "full report," "run full verification," "verify that," "doublecheck that," or similar, run the complete three-layer pipeline (described below) and produce the full report using the template in `assets/verification-report-template.md`.
80
81
### One-Shot Mode
82
83
When the user invokes this skill and provides specific text to verify (or references previous output), run the complete three-layer pipeline and produce a full verification report using the template in `assets/verification-report-template.md`.
84
85
### Deactivation
86
87
When the user says "turn off doublecheck," "stop doublecheck," or similar, respond with:
88
89
> **Doublecheck is now off.** I'll respond normally without inline verification. You can reactivate it anytime.
90
91
---
92
93
## Layer 1: Self-Audit
94
95
Re-read the target text with a critical lens. Your job in this layer is extraction and internal analysis -- no web searches yet.
96
97
### Step 1: Extract Claims
98
99
Go through the target text sentence by sentence and pull out every statement that asserts something verifiable. Categorize each claim:
100
101
| Category | What to look for | Examples |
102
|----------|-----------------|---------|
103
| **Factual** | Assertions about how things are or were | "Python was created in 1991", "The GPL requires derivative works to be open-sourced" |
104
| **Statistical** | Numbers, percentages, quantities | "95% of enterprises use cloud services", "The contract has a 30-day termination clause" |
105
| **Citation** | References to specific documents, cases, laws, papers, or standards | "Under Section 230 of the CDA...", "In *Mayo v. Prometheus* (2012)..." |
106
| **Entity** | Claims about specific people, organizations, products, or places | "OpenAI was founded by Sam Altman and Elon Musk", "GDPR applies to EU residents" |
107
| **Causal** | Claims that X caused Y or X leads to Y | "This vulnerability allows remote code execution", "The regulation was passed in response to the 2008 financial crisis" |
108
| **Temporal** | Dates, timelines, sequences of events | "The deadline is March 15", "Version 2.0 was released before the security patch" |
109
110
Assign each claim a temporary ID (C1, C2, C3...) for tracking through subsequent layers.
111
112
### Step 2: Check Internal Consistency
113
114
Review the extracted claims against each other:
115
- Does the text contradict itself anywhere? (e.g., states two different dates for the same event)
116
- Are there claims that are logically incompatible?
117
- Does the text make assumptions in one section that it contradicts in another?
118
119
Flag any internal contradictions immediately -- these don't need external verification to identify as problems.
120
121
### Step 3: Initial Confidence Assessment
122
123
For each claim, make an initial assessment based only on your own knowledge:
124
- Do you recall this being accurate?
125
- Is this the kind of claim where models frequently hallucinate? (Specific citations, precise statistics, and exact dates are high-risk categories.)
126
- Is the claim specific enough to verify, or is it vague enough to be unfalsifiable?
127
128
Record your initial confidence but do NOT report it as a finding yet. This is input for Layer 2, not output.
129
130
---
131
132
## Layer 2: Source Verification
133
134
For each extracted claim, search for external evidence. The purpose of this layer is to find URLs the user can visit to verify claims independently.
135
136
### Search Strategy
137
138
For each claim:
139
140
1. **Formulate a search query** that would surface the primary source. For citations, search for the exact title or case name. For statistics, search for the specific number and topic. For factual claims, search for the key entities and relationships.
141
142
2. **Run the search** using `web_search`. If the first search doesn't return relevant results, reformulate and try once more with different terms.
143
144
3. **Evaluate what you find:**
145
- Did you find a primary or authoritative source that directly addresses the claim?
146
- Did you find contradicting information from a credible source?
147
- Did you find nothing relevant? (This is itself a signal -- real things usually have a web footprint.)
148
149
4. **Record the result** with the source URL. Always provide the URL even if you also summarize what the source says.
150
151
### What Counts as a Source
152
153
Prefer primary and authoritative sources:
154
- Official documentation, specifications, and standards
155
- Court records, legislative texts, regulatory filings
156
- Peer-reviewed publications
157
- Official organizational websites and press releases
158
- Established reference works (encyclopedias, legal databases)
159
160
Note when a source is secondary (news article, blog post, wiki page) vs. primary. The user can weigh accordingly.
161
162
### Handling Citations Specifically
163
164
Citations are the highest-risk category for hallucinations. For any claim that cites a specific case, statute, paper, standard, or document:
165
166
1. Search for the exact citation (case name, title, section number).
167
2. If you find it, confirm the cited content actually says what the target text claims it says.
168
3. If you cannot find it at all, flag it as FABRICATION RISK. Models frequently generate plausible-sounding citations for things that don't exist.
169
170
---
171
172
## Layer 3: Adversarial Review
173
174
Switch your posture entirely. In Layers 1 and 2, you were trying to understand and verify the output. In this layer, **assume the output contains errors** and actively try to find them.
175
176
### Hallucination Pattern Checklist
177
178
Check for these common patterns:
179
180
1. **Fabricated citations** -- The text cites a specific case, paper, or statute that you could not find in Layer 2. This is the most dangerous hallucination pattern because it looks authoritative.
181
182
2. **Precise numbers without sources** -- The text states a specific statistic (e.g., "78% of companies...") without indicating where the number comes from. Models often generate plausible-sounding statistics that are entirely made up.
183
184
3. **Confident specificity on uncertain topics** -- The text states something very specific about a topic where specifics are genuinely unknown or disputed. Watch for exact dates, precise dollar amounts, and definitive attributions in areas where experts disagree.
185
186
4. **Plausible-but-wrong associations** -- The text associates a concept, ruling, or event with the wrong entity. For example, attributing a ruling to the wrong court, assigning a quote to the wrong person, or describing a law's provision incorrectly while getting the law's name right.
187
188
5. **Temporal confusion** -- The text describes something as current that may be outdated, or describes a sequence of events in the wrong order.
189
190
6. **Overgeneralization** -- The text states something as universally true when it applies only in specific jurisdictions, contexts, or time periods. Common in legal and regulatory content.
191
192
7. **Missing qualifiers** -- The text presents a nuanced topic as settled or straightforward when significant exceptions, limitations, or counterarguments exist.
193
194
### Adversarial Questions
195
196
For each major claim that passed Layers 1 and 2, ask:
197
- What would make this claim wrong?
198
- Is there a common misconception in this area that the model might have picked up?
199
- If I were a subject matter expert, would I object to how this is stated?
200
- Is this claim from before or after my training data cutoff, and might it be outdated?
201
202
### Red Flags to Escalate
203
204
If you find any of these, flag them prominently in the report:
205
- A specific citation that cannot be found anywhere
206
- A statistic with no identifiable source
207
- A legal or regulatory claim that contradicts what authoritative sources say
208
- A claim that has been stated with high confidence but is actually disputed or uncertain
209
210
---
211
212
## Producing the Verification Report
213
214
After completing all three layers, produce the report using the template in `assets/verification-report-template.md`.
215
216
### Confidence Ratings
217
218
Assign each claim a final rating:
219
220
| Rating | Meaning | What the user should do |
221
|--------|---------|------------------------|
222
| **VERIFIED** | Supporting source found and linked | Spot-check the source link if the claim is critical to your work |
223
| **PLAUSIBLE** | Consistent with general knowledge, no specific source found | Treat as reasonable but unconfirmed; verify independently if relying on it for decisions |
224
| **UNVERIFIED** | Could not find supporting or contradicting evidence | Do not rely on this claim without independent verification |
225
| **DISPUTED** | Found contradicting evidence from a credible source | Review the contradicting source; this claim may be wrong |
226
| **FABRICATION RISK** | Matches hallucination patterns (e.g., unfindable citation, unsourced precise statistic) | Assume this is wrong until you can confirm it from a primary source |
227
228
### Report Principles
229
230
- Provide links, not verdicts. The user decides what's true, not you.
231
- When you found contradicting information, present both sides with sources. Don't pick a winner.
232
- If a claim is unfalsifiable (too vague or subjective to verify), say so. "Unfalsifiable" is useful information.
233
- Be explicit about what you could not check. "I could not verify this" is different from "this is wrong."
234
- Group findings by severity. Lead with the items that need the most attention.
235
236
### Limitations Disclosure
237
238
Always include this at the end of the report:
239
240
> **Limitations of this verification:**
241
> - This tool accelerates human verification; it does not replace it.
242
> - Web search results may not include the most recent information or paywalled sources.
243
> - The adversarial review uses the same underlying model that may have produced the original output. It catches many issues but cannot catch all of them.
244
> - A claim rated VERIFIED means a supporting source was found, not that the claim is definitely correct. Sources can be wrong too.
245
> - Claims rated PLAUSIBLE may still be wrong. The absence of contradicting evidence is not proof of accuracy.
246
247
---
248
249
## Domain-Specific Guidance
250
251
### Legal Content
252
253
Legal content carries elevated hallucination risk because:
254
- Case names, citations, and holdings are frequently fabricated by models
255
- Jurisdictional nuances are often flattened or omitted
256
- Statutory language may be paraphrased in ways that change the legal meaning
257
- "Majority rule" and "minority rule" distinctions are often lost
258
259
For legal content, give extra scrutiny to: case citations, statutory references, regulatory interpretations, and jurisdictional claims. Search legal databases when possible.
260
261
### Medical and Scientific Content
262
263
- Check that cited studies actually exist and that the results are accurately described
264
- Watch for outdated guidelines being presented as current
265
- Flag dosages, treatment protocols, or diagnostic criteria -- these change and errors can be dangerous
266
267
### Financial and Regulatory Content
268
269
- Verify specific dollar amounts, dates, and thresholds
270
- Check that regulatory requirements are attributed to the correct jurisdiction and are current
271
- Watch for tax law claims that may be outdated after recent legislative changes
272
273
### Technical and Security Content
274
275
- Verify CVE numbers, vulnerability descriptions, and affected versions
276
- Check that API specifications and configuration instructions match current documentation
277
- Watch for version-specific information that may be outdated
278

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

Reviews

Loading reviews…

Discussion

Loading comments…