verify
Original:🇺🇸 English
Translated
Verify AI claims against source documents using the DeepCitation API
2installs
Sourcedeepcitation/skills
Added on
NPX Install
npx skill4agent add deepcitation/skills verifyTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →/verify — DeepCitation Verification
Verify claims against source documents using the DeepCitation API, saving JSON artifacts at each step.
Prerequisites
- environment variable must be set. If not set, try loading saved credentials:
DEEPCITATION_API_KEYIf that also fails, tell the user to runbasheval "$(npx -y deepcitation env 2>/dev/null)"first, then retry.npx -y deepcitation login - Source files (PDF, DOCX, images, etc.) must be accessible on disk or via URL
- Accepted file types: PDF, images (JPG, PNG), Office files (DOCX, XLSX, PPTX), CSV, TSV, ODF
Key Rules
- and
page_idMUST come from theline_ids— see rules/line-ids.md for details.deepTextPromptPortion - Coverage audit: After generating citations, spawn a subagent to audit the report/chat and confirm all facts, sources, names, dates, and values have deepcitations. The subagent should flag any uncited claims.
Workflow
Step 0: Analyze input
Load rules/analyze-input.md to determine which path to follow (A–F) based on what's in the conversation, arguments, and working directory.
Step 1: Prepare sources
Load rules/prepare-sources.md for CLI usage and what to retain from each prepare response.
Step 2: Build citations
Load rules/build-citations.md for the full citation-building workflow:
- Path A: Existing — skip to Step 3
<<<CITATION_DATA>>> - Path B: Existing HTML with claims — identify claims, build citation data, generate keys, annotate HTML
- Path C: Generate new cited response from scratch using the canonical citation format spec
Step 3–5: Verify, inject, validate
Load rules/verify-and-inject.md for verification, HTML injection, and pre-delivery validation.
When building citations
When dealing with and values, load rules/line-ids.md for how sparse line IDs work and how to find the right one.
lineIdspageNumberWhen annotating HTML with attributes, load rules/annotate-html.md for placement rules, key-map building, and citation drawer triggers.
data-citation-keyOutput artifacts
All artifacts are saved in . Use naming so re-runs don't clobber each other:
.deepcitation/{topic}-{timestamp}| File | Contents |
|---|---|
| Upload response with |
| Full LLM response including |
| Extracted |
| Re-keyed citations with hashed keys (from |
| Human-readable key → hashed key mapping |
| HTML with |
| Verification results with statuses and evidence |
| Injected HTML with CDN runtime (Path B output) |
Important rules
- Product name: Always "DeepCitation" (never "DeepCite")
- Track attachmentId: Always retain the from Step 1 — it's the key for verification lookups
attachmentId - Strip before display: Use to remove
extractVisibleText()before showing text to user<<<CITATION_DATA>>> - CitationRecord is an object: Check emptiness with
Object.keys(citations).length === 0 - API key security: Never log or display
DEEPCITATION_API_KEY - Verbatim quotes: must be copied exactly from the source — do not paraphrase
fullPhrase
References
- Citation format spec: (resolve
$DC_ROOT/docs/prompts/citation-format.mdwithDC_ROOTas shown in Path C)node -e "..." - SDK prompt:
$DC_ROOT/src/prompts/citationPrompts.ts - Citation parser: https://github.com/DeepCitation/deepcitation/blob/main/src/parsing/parseCitation.ts
- API docs: https://deepcitation.com/docs
ARGUMENTS: $ARGUMENTS