关于 citation-check-skill
citation-check-skill 用于核查任意语言文档中的说法,可对照权威网络来源或用户提供的文档。其固定的两阶段流程将提取说法与核查分开,并严格检查数字和图表数据。
主要功能
- 01网络搜索和仅限文档两种模式
- 02两阶段提取说法并逐项核查
- 03检查引用是否存在及是否支持说法
- 04严格核对数字精度
- 05检查图表数据与呈现
适用场景
- 01核查报告或论文中的引用
- 02仅依据指定文档审计说法
- 03核验幻灯片中的数字和图表
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ serenakeyitan/ citation-check-skill --skill citation-check-skill安装后在 Claude Code 中输入/citation-check-skill确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
README.mdLICENSEreferences/citation_schema.json详细介绍
引用与幻觉检查器 v2
具备视觉与网络搜索功能的验证工具。根据权威来源或提供的文档验证每项声明。适用于任何语言的内容。
设计原则: 确定性验证。相同输入 → 相同输出。
两种验证模式
模式 1:搜索验证(默认)
- 搜索网络以查找权威来源
- 验证引用是否真实存在
- 检查引用来源是否支持相应声明
- 查找统计数据的原始数据
模式 2:仅文档验证
- 用户提供源文档
- 所有内容都必须能追溯到这些文档
- 标记任何看起来来自外部知识的内容
- 触发语句:"only use this document" / "verify against the PDF only" / "don't search the web"
两轮架构
关键: 始终分两轮进行。绝不交错执行提取与验证。
第 1 轮:仅提取
- 阅读整篇文档、幻灯片和图片
- 使用下方的声明提取规则提取所有声明
- 输出编号列表:
[claim_id] | [claim_text] | [claim_type] | [location] - 本轮不进行验证
- 继续之前,先向用户展示提取结果并征求确认
第 2 轮:仅验证
- 将第 1 轮的输出作为固定输入
- 按顺序逐条验证每个 claim_id
- 不得重新提取——仅处理第 1 轮中的声明
- 对每项声明应用状态判定树
- 生成最终报告
这样可以避免在验证过程中“发现新声明”,并确保一致性。
声明提取规则(完整)
仅提取以下类型的声明。严格遵循规则,不得自行判断。
将以下内容提取为声明:
| 类型 | 模式 | 示例 |
|---|---|---|
| 统计数据 | 带有单位或语境的任何数字(%、$、计数、比率、小数) | "92.3% accuracy", "$4.7B market" |
| 比较 | X 比 Y 更 [比较级] | "3x faster than baseline" |
| 时间 | 有时间限定的断言 | "In 2024, adoption reached..." |
| 归属 | 与来源相关联的声明 | "According to WHO...", "Smith et al. found..." |
| 因果 | X 导致/引发/造成 Y | "This reduces latency by..." |
| 存在 | 断言某事物存在或为真 | "There are 500M users", "The model supports..." |
| 排名 | 排名或位置声明 | "largest", "first", "top 3" |
| 引语 | 直接引用 | 任何归属于某来源、置于引号中的文本 |
不要提取为事实性陈述:
| 类型 | 示例 | 原因 |
|---|---|---|
| 定义 | "Machine learning is a subset of AI" | 属于定义,而非事实性陈述 |
| 明确标注的观点 | "We believe...", "In our view..." | 明确属于主观观点 |
| 假设 | "If adoption continues...", "Could potentially..." | 属于推测 |
| 问题 | "What drives growth?" | 不属于陈述 |
| 无来源的未来预测 | "Will reach $10B by 2030" | 除非引用预测报告 |
| 方法说明 | "We used PyTorch 2.0" | 属于流程,而非事实性陈述 |
| 致谢 | "Thanks to our collaborators" | 无法验证 |
提取结果格式
[C01] | "Model achieves 96.555% accuracy on ImageNet" | Statistic | Slide 3, bullet 2
[C02] | "Outperforms GPT-4 by 12% on reasoning tasks" | Comparative | Slide 3, bullet 3
[C03] | "According to Chen et al. (2024), transformers scale linearly" | Attribution | Slide 5, para 1
[C04] | "Market size reached $4.7B in 2024" | Statistic + Temporal | Slide 7, chart title
状态判定树
将此判定树应用于每一条陈述。严格遵循,不得走捷径。
START
│
├─ Is this a CITATION claim (references a paper/report/source)?
│ ├─ YES → Go to CITATION VALIDATION
│ └─ NO → Go to STATISTIC/FACT VALIDATION
│
│
CITATION VALIDATION
│
├─ Step 1: Does the cited source exist?
│ │ Run ALL mandatory search queries (see Search Templates)
│ │
│ ├─ NO → Status: "Citation Not Found"
│ │ Issue: "Cannot locate [citation] in any database"
│ │ STOP
│ │
│ └─ YES → Step 2: Does source contain the claimed topic?
│ │
│ ├─ NO → Status: "Misquoted"
│ │ Issue: "Source exists but does not discuss [topic]"
│ │ STOP
│ │
│ └─ YES → Step 3: Does source support the exact claim?
│ │
│ ├─ YES (exact match) → Status: "Verified"
│ │ Confidence: "exact"
│ │
│ ├─ YES (paraphrase, same meaning) → Status: "Verified"
│ │ Confidence: "paraphrase"
│ │
│ ├─ PARTIALLY (missing context) → Status: "Misleading"
│ │ Issue: "Claim omits critical context: [what's missing]"
│ │
│ └─ NO (contradicts) → Status: "Hallucination"
│ Issue: "Source says [X], claim says [Y]"
│
│
STATISTIC/FACT VALIDATION
│
├─ Step 1: Can you find an authoritative source?
│ │ Run ALL mandatory search queries (see Search Templates)
│ │
│ ├─ NO (no source found) → Status: "Unverified"
│ │ Issue: "No authoritative source found"
│ │ STOP
│ │
│ └─ YES → Step 2: Do values match EXACTLY?
│ │
│ ├─ YES → Status: "Verified"
│ │ Confidence: "exact"
│ │ STOP
│ │
│ └─ NO → Status: "Numerical Error"
│ Go to NUMERICAL ERROR DETAILS
│
│
NUMERICAL ERROR DETAILS (Academic Precision Mode)
│
├─ Record:
│ • Source value: [exact number from source]
│ • Claimed value: [number in document being checked]
│ • Deviation: [calculate exact difference]
│ • Source location: [page, table, section]
│
├─ Classification:
│ • ANY rounding → Numerical Error
│ • ANY truncation → Numerical Error
│ • Significant figures mismatch → Numerical Error
│ • Unit mismatch → Numerical Error
│ • Wrong direction (e.g., increase vs decrease) → Hallucination
│
└─ Exception: If source ITSELF provides rounded figure
• e.g., Source says "96.555% (approximately 97%)"
• Then claiming "97%" → Verified (cite the approximation)
数值精度规则(学术标准)
默认模式:严格的学术精度。仅使用精确数值。
| 规则 | 来源 | 陈述 | 状态 |
|---|---|---|---|
| 必须完全匹配 | 96.555% | 96.555% | ✓ 已验证 |
| 任何舍入均属错误 | 96.555% | 97% | ✗ 数值错误 |
| 任何舍入均属错误 | 96.555% | 96.6% | ✗ 数值错误 |
| 截断属于错误 | 96.555% | 96.5% | ✗ 数值错误 |
| 有效数字必须匹配 | 0.834 | 0.83 | ✗ 数值错误 |
| 单位必须匹配 | 96.555% | 0.96555 | ✗ 数值错误 |
| 方向很重要 | +12% growth | +15% growth | ✗ 幻觉 |
| 数量级 | $4.7B | $47B | ✗ 幻觉 |
数值错误输出格式
### Numerical Error: [Claim ID]
| Field | Value |
|-------|-------|
| Claim | "Model achieves 97% accuracy" |
| Location | Slide 4, bullet 2 |
| Source | Chen et al. (2024), Table 3, p.8 |
| Source value | 96.555% |
| Claimed value | 97% |
| Deviation | +0.445% (rounded up) |
| Status | Numerical Error |
| Fix | Replace with: "Model achieves 96.555% accuracy" |
置信度分类
| 级别 | 标准 | 适用情形 |
|---|---|---|
| exact | ≥95% 的词语重合度,或数值及单位完全相同 | 直接引用、精确统计数据 |
| paraphrase | 事实相同,措辞不同,未添加解释 | 重述研究发现 |
| interpretation | 从来源数据中推断 | 根据来源计算、综合分析 |
规则: 如果无法确定级别,请采用更保守的选项,并标记为待审核。
强制搜索模板
运行所有适用的模板。找到首个结果后不要停止。
学术引用
Query 1: "[first author last name] [year] [first 3 words of title]"
Query 2: "[full paper title]" site:semanticscholar.org OR site:arxiv.org
Query 3: "[first author] [year] [venue/journal name]"
Query 4: "doi:[DOI]" (if DOI provided)
Query 5: "arxiv:[arxiv_id]" (if arXiv ID provided)
统计数据(市场规模、使用量等)
Query 1: "[exact number with unit] [topic] [year]"
Query 2: "[topic] [year] statistics report site:statista.com"
Query 3: "[topic] [year] report site:mckinsey.com OR site:gartner.com"
Query 4: "[topic] market size [year] site:gov OR site:edu"
Query 5: "[topic] [number] original source"
公司/产品相关陈述
Query 1: "[company name] [claim topic] press release [year]"
Query 2: site:[company domain] [claim topic]
Query 3: "[company name] [metric] official announcement"
Query 4: "[company name] [claim] SEC filing" (for public companies)
健康/医疗相关陈述
Query 1: "[claim topic] site:who.int OR site:cdc.gov OR site:nih.gov"
Query 2: "[claim] systematic review site:cochrane.org"
Query 3: "[claim] meta-analysis pubmed"
政府/政策相关陈述
Query 1: "[policy/law name] site:gov"
Query 2: "[statistic] official statistics [country]"
Query 3: "[claim] [agency name] report"
来源权威性层级
找到多个来源时,按以下顺序优先选择:
| 排名 | 来源类型 | 示例 |
|---|---|---|
| 1 | 一手来源 | 原始研究、官方报告、原始数据 |
| 2 | 政府/机构来源 | WHO、CDC、World Bank、国家统计局 |
| 3 | 同行评审出版物 | Nature、Science、IEEE、ACM |
| 4 | 行业报告(具名) | Gartner、McKinsey、Statista(附方法说明) |
| 5 | 引用一手来源的信誉良好新闻 | NYT、Reuters(引用原始来源) |
| 6 | 二手汇编 | Wikipedia(检查其来源) |
规则: 如果只找到排名为 5–6 的来源,状态 =“Unverified”,并注明“仅找到二手来源”
多来源核验(搜索模式)
只有满足以下条件,声明才可标记为“Verified”:
| 条件 | 所需来源 |
|---|---|
| 找到一手来源 | 1 个(若来源权威:.gov、同行评审或官方来源) |
| 只有二手来源 | ≥2 个相互独立且结论一致的来源 |
| 来源相互冲突 | 状态 =“Unverified”,并注明冲突 |
决胜规则
存在不确定情况时,应用以下规则。不得自行判断。
| 情况 | 规则 |
|---|---|
| 声明缺少日期 | 假设指最近可获取的年份;标记“需要日期” |
| 来源相互冲突 | 使用最新的权威来源;引用双方;注明冲突 |
| 穷尽所有查询后仍未找到来源 | 状态 =“Unverified”(而非“Hallucination”) |
| 数字因货币换算而不同 | 标记为“需要澄清:货币/单位” |
| 同一机构有多份报告 | 使用最新报告;引用时注明日期 |
| 声明使用“约”或“大约” | 仍需核验基础数字是否在有效范围内(与来源相差 ±10%) |
| 来源设有付费墙 | 注明“来源设有付费墙,无法核验确切文本” |
| 来源使用其他语言 | 翻译并核验;注明翻译情况 |
可视化数据核验
对于每张图表、图形、表格或示意图:
步骤 1:提取数据点
- 读取图中所有数值
- 记录:坐标轴标签、单位、刻度、图例
- 注意任何视觉失真(截断坐标轴、3D 效果等)
步骤 2:查找来源
- 搜索模式:使用数据搜索模板
- 仅文档模式:在源文档中定位
步骤 3:逐项比较数值
| Visual Element | Extracted Value | Source Value | Status |
|----------------|-----------------|--------------|--------|
| Bar 1 (2022) | 45% | 45.0% | ✓ Verified |
| Bar 2 (2023) | 62% | 58.3% | ✗ Numerical Error |
| Bar 3 (2024) | 78% | Not in source | ✗ Hallucination |
步骤 4:检查可视化完整性
| 检查项 | 问题类型 |
|---|---|
| Y 轴起点不为零 | “视觉失真:坐标轴操控” |
| 3D 效果扭曲比例 | “视觉失真:3D 夸大” |
| 来源包含误差线,但图中缺失 | “误导:未显示不确定性” |
| 时间范围与来源不同 | “误导:挑选时间范围” |
仅文档模式工作流
触发短语:
- “仅使用此文档”
- “不要搜索网络”
- “仅根据 PDF 核验”
- “所有内容都应来自该来源”
步骤 1:为源文档建立索引
在开始任何核验前,建立完整索引:
SOURCE INDEX
Document: [filename]
Pages: [count]
Page 1:
- Text: [summary of content]
- Statistics: [list all numbers with context]
- Tables: [Table 1: columns X, Y, Z]
- Figures: [Figure 1: shows X]
Page 2:
...
步骤 2:应用双遍架构
与搜索模式相同,但核验时仅使用源索引。
步骤 3:追溯每项声明
Claim: [C01] "Model achieves 92% accuracy"
Search index for: "92", "accuracy", "performance"
├─ Found: Section 4.2, p.8 — "Our model achieves 92.1% accuracy"
│ └─ Status: Numerical Error (92% vs 92.1%)
│
OR
│
├─ Not found in index
│ └─ Status: "Not in Source"
│ Issue: "This claim cannot be traced to the provided document"
│ Likely: External knowledge / hallucination
第 4 步:标记所有外部知识
在仅依据文档的模式下,任何无法追溯至来源的说法都是问题
### External Knowledge Detected
These claims are NOT in the provided document:
| Claim ID | Claim | Status | Issue |
|----------|-------|--------|-------|
| C07 | "This method is widely adopted in industry" | Not in Source | Appears to be from model training data |
| C12 | "Published in Nature 2024" | Not in Source | Publication venue not mentioned in source |
输出格式
摘要区块(始终置于首位)
## Verification Report
**Mode:** [Search / Doc-Only]
**Document:** [filename or description]
**Generated:** [timestamp]
### Summary
| Metric | Count |
|--------|-------|
| Total claims extracted | X |
| Verified | Y |
| Numerical Error | Z |
| Unverified | A |
| Hallucination | B |
| Misleading | C |
| Not in Source (doc-only) | D |
**Overall Status:** [PASS: All verified / FAIL: Issues found]
详细发现(按状态分组)
### ✓ Verified Claims (N)
| ID | Claim | Source | Location | Confidence |
|----|-------|--------|----------|------------|
| C01 | "92.1% accuracy" | Chen et al. 2024 | Table 3, p.8 | exact |
### ✗ Numerical Errors (N)
| ID | Claim | Source Value | Claimed Value | Deviation | Fix |
|----|-------|--------------|---------------|-----------|-----|
| C03 | "97% accuracy" | 96.555% | 97% | +0.445% | Use 96.555% |
### ✗ Hallucinations (N)
| ID | Claim | Issue | Source Says |
|----|-------|-------|-------------|
| C05 | "3x faster" | Contradicts source | Source: 2.1x faster |
### ⚠ Unverified (N)
| ID | Claim | Issue |
|----|-------|-------|
| C08 | "$50B market" | No authoritative source found |
### ⚠ Misleading (N)
| ID | Claim | Issue | Missing Context |
|----|-------|-------|-----------------|
| C10 | "Best performance" | Cherry-picked metric | Only on subset; overall performance lower |
已查阅的来源
### Sources
| ID | Citation | Type | URL | Used For |
|----|----------|------|-----|----------|
| S1 | Chen et al. (2024) | arxiv | https://arxiv.org/... | C01, C02, C03 |
| S2 | Statista Market Report | report | https://statista.com/... | C08 |
关键规则
- 始终分两轮处理——先提取,再核验。绝不交叉进行。
- 核查每一项说法——没有例外,不跳过任何“显而易见”的说法。
- 只使用精确数字——在学术模式下,96.555% ≠ 97%。
- 查找原始来源——不要接受引用了未知原始来源的二手来源。
- 运行所有搜索模板——不要在找到第一个结果后就停止。
- 引用必须真实存在——搜索并确认论文或报告确实存在。
- 核查来源的实际表述——真实论文也可能被错误引用。
- 在仅依据文档的模式下,标记所有外部知识——即使它属实也不例外。
- 不确定时,采取保守做法——“未核实”比错误地标记为“已核实”更安全。
- 遵循平局判定规则——不凭个人判断临时决定。
语言支持
- 接受任何语言的内容
- 使用适合来源语言的语言搜索来源
- 使用用户请求所用的语言生成报告
- 支持跨语言核验(例如,中文幻灯片引用英文论文)
- 为核验而翻译时,请注明:“译自[语言]”
输出格式选项
**快速:**仅包含摘要和关键问题(数字错误、幻觉、未核实) **完整:**包含所有说法的完整可追溯性报告 **JSON:**机器可读的审计结果(参见 references/citation_schema.json)
更新日志
v2.0 — 一致性更新
- 添加双轮架构(提取 → 核验分离)
- 添加详尽的说法提取规则
- 添加状态判定树(确定性分类)
- 添加严格的数字精度规则(学术模式)
- 添加强制搜索模板
- 添加多来源核验要求
- 添加边缘情况的平局判定规则
- 添加置信度分类阈值
评论
支持 Markdown