跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

fact-check-and-citation

Verify every statistical claim by fetching cited URLs + checking the data appears on the page. Crossref-first for academic; Tavily-fallback for industry. Replaces fabricated/unsourced stats. Builds APA 7 References block, ≤10 entries, all link-resolvable. The single most important anti-hallucination gate in the pipeline. Use after section-drafter (before humanizer if humanizer might break citations) or after humanizer (preferred — humanizer doesn't touch quoted material).

XuanRanL · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add XuanRanL/loamwright-SEO-Skill --skill fact-check-and-citation

技能说明


name: fact-check-and-citation description: Verify every statistical claim by fetching cited URLs + checking the data appears on the page. Crossref-first for academic; Tavily-fallback for industry. Replaces fabricated/unsourced stats. Builds APA 7 References block, ≤10 entries, all link-resolvable. The single most important anti-hallucination gate in the pipeline. Use after section-drafter (before humanizer if humanizer might break citations) or after humanizer (preferred — humanizer doesn't touch quoted material). allowed-tools: [Read, Write, Edit, Bash, Task, WebFetch] disable-model-invocation: false user-invocable: true

Fact-Check and Citation

The single most important anti-hallucination step. Without it, LLM-fabricated statistics make it to publication. With it, every cited fact is real and verifiable. Without exception.

When to invoke

  • After section-drafter completes (Stage: humanizer-complete OR section-drafted)
  • Before assembly (final draft.md assembly)
  • Auto-triggered by repair-orchestrator when any C01 (fabricated citation) veto fires
  • User can manually invoke /factcheck workspace/{task_id}/draft.md

Inputs

  • workspace/{task_id}/sections/*.json — each has claims[] array
  • workspace/{task_id}/research.json — Tier-1 source candidates already discovered
  • references/apa-citation-rules.md

Workflow

Step 1: Extract all statistical claims

Scan the draft for every claim that includes a number, percentage, dollar amount, or named source. Build claims list:

FieldDescription
claim_textThe exact sentence or phrase containing the statistic
valueThe numeric value (e.g., "42%", "$1.2M", "3x")
attributionNamed source if present (e.g., "HubSpot", "Gartner 2025")
urlCited URL if present (markdown link or parenthetical)
locationHeading or line number where the claim appears

Step 2: Spawn fact-checker agent

# Internal — fact-checker is the agent that does the actual verification work

Invoke agents/fact-checker.md with:

  • sections_dir = workspace/{task}/sections/
  • mode = "fact-check"
  • max_refs = 10 (or 15 for case-study / data-research formats)

The fact-checker has the tool whitelist: Read, Write, WebFetch, Bash.

Step 3: Per-claim verification pipeline

For each claim with needs_source=true:

  1. Crossref lookup (academic preference, free, fast)

    python -m scripts.fetch.crossref_lookup "{hint_query}" --rows 5 --apa
    

    If hit + DOI → step 4.

  2. Link resolver check on DOI URL

    python -m scripts.validate.link_resolver "https://doi.org/{doi}"
    

    If 200 OK → USE IT.

  3. Tavily advanced fallback (for industry, news, recent statistics)

    python -m scripts.fetch.tavily_search "{hint_query}" --depth advanced
    

    For top-3 results → run link_resolver. First passing → USE IT.

  4. If nothing resolves → mark claim as deleted. Surface to writer to rewrite the paragraph without the unsupportable claim.

Step 4: Verification scoring (per claim)

ScoreStatusCriteria
1.0VERIFIEDExact number found on cited page in matching context
0.7-0.9PARAPHRASESimilar data with different wording, rounding, or timeframe
0.3-0.6WEAKSource page covers topic but specific stat not visible
0.0NOT FOUNDCited page does not contain the claimed data anywhere
N/AUNVERIFIEDNo source URL provided for the claim

Scoring guidance:

  • "43%" when source says "nearly half" → 0.8
  • "2024" data when source has "2023" → 0.7
  • Citation to homepage when stat lives on subpage → 0.3
  • 404 / unreachable URL → 0.0

Step 5: Claim extraction patterns (regex hints)

Fully cited (highest confidence):

  • [Number]% [claim] ([Source], [Year]) — parenthetical citation
  • [claim] [Number]% ... [markdown link to source] — inline link
  • According to [Source], [Number]... — attribution lead

Uncited statistics (flag for sourcing):

  • [Number]% of [noun phrase] — standalone percentage
  • [Number]x more/less/higher/lower — multiplier claims
  • $[Number] [claim] — dollar figures without attribution

Weak signals (check context before extracting):

  • "studies show", "research indicates", "data suggests" + nearby number
  • "survey found", "report reveals", "analysis shows" + nearby number
  • Round numbers in isolation ("millions of users") — skip unless specific

Step 6: Build References section

Output workspace/{task_id}/citations.json per schemas/citations.schema.json, AND workspace/{task_id}/fact-check.json per schemas/fact-check.schema.json — its verdict is EXACTLY one of CLEAN | CLEAN_WITH_NOTES | FIX_REQUIRED | BLOCK_PUBLISH (any other string fails closed at the orchestrator gate and pre_publish_gate; CLEAN_WITH_NOTES is the canonical "issues found and fixed in place" verdict — 2026-08-02, scripts/pipeline/fc_verdict.py).

Canonical top-level key is citations (matches wp_publisher._load_citation_entries canonical reader path). Legacy/alternate keys also accepted by the publisher: refs, references, items, or bare top-level list — but new emitters should write citations for clarity and forward-compat.

URL-resolution recording (v3.38.3, mandatory): a ref that is REAL but bot-walled (Taylor & Francis / MDPI / ASTM return HEAD 403 to script UAs) gets url_verified: true + resolved_status: "bot-403" (the STRING — never the bare int 403, which reads as a broken ref and fires the C01 fabricated-citation veto) + a resolution_note naming how it was verified (Crossref masthead / browser UA). url_verified: true is authoritative for the C01 scorer. A ref you could not verify anywhere gets url_verified: false. Full contract: agents/fact-checker.md §"URL resolution recording".

{
  "task_id": "abc123",
  "citations": [
    {
      "id": 1,
      "apa_7": "Smith, J. (2024). Title of work. Publisher. https://doi.o
阅读完整来源 ↗