cf-reference-audit
Invoke when the user asks to audit, check, or verify the references, bibliography, or citations of a paper (.bib with optional .tex, a PDF, or a Word .docx), to screen for hallucinated or fabricated references, or to check that citations say what the cited work says. Also invoke after you add or edit bibliography entries yourself, before reporting the paper as done.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-26
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- cf-reference-audit
- description
- Invoke when the user asks to audit, check, or verify the references, bibliography, or citations of a paper (.bib with optional .tex, a PDF, or a Word .docx), to screen for hallucinated or fabricated references, or to check that citations say what the cited work says. Also invoke after you add or edit bibliography entries yourself, before reporting the paper as done.
03 SKILL.md 正文
Reference Audit
Audit a paper's references with the reference-audit
CLI. It decides which real-world document each reference points to and flags references that match
nothing real. Report what the tool found. Never fill a gap with your own guess.
1. Prerequisites (resolve before auditing)
-
The CLI. Run
reference-audit --help. If the command is missing, tell the user and offeruv tool install reference-audit(it needsuv). Install only with the user's approval. In a clone of the reference-audit repository,uv run reference-auditworks without installing. -
The input. Pick one form. The forms cannot be mixed:
reference-audit audit <main.tex> <refs.bib>: the manuscript adds cited/uncited bookkeeping and the citing sentences that--check-citationsneeds. The main.texis the one with\documentclass. The tool follows its\input/\includeitself.reference-audit audit <refs.bib>: every entry is still checked, but citedness is unknown.reference-audit audit <paper.pdf>: by default a language model on the OpenAI API reads the reference list, so the PDF is sent to OpenAI. Say so before running it on an unpublished paper.--pdf-extractor grobiduses a local GROBID service instead.reference-audit audit <paper.docx>: only Word's native structured bibliography is checked. Typed-in references are not checked. Pass this warning on to the user.
If several
.texor.bibfiles could be the input, ask the user which one to use. -
Keys. Settings and API keys live in
~/.config/reference-audit/config.toml. Never ask the user to paste a key into the chat. Never write a key into the project and never print one. A run without keys still works. Without an LLM key, the entries that need LLM adjudication end up unresolved, and the reason says so. Report that as it is.
2. Run the audit
reference-audit audit paper.tex refs.bib --format json > audit.json
- Write the JSON to a scratch location outside the paper's sources. Stdout carries only the JSON report. Progress, logs and the Word warning go to stderr. Read stderr when the exit code is non-zero.
- A networked audit can take minutes on a long bibliography. Use a generous timeout or run it in the background. Do not cut it short and report a partial result.
- Results are cached in
.reference_audit/cache.dbbeside the input. A re-run after edits only re-checks entries that changed or failed before. Use--freshonly when the user asks for it. - Useful options:
--check-citationschecks each citing sentence against the cited work's abstract (needs the LLM and citing sentences).--no-llmgives a deterministic run.--no-networkparses only, with no verdicts.--fail-on hallucinated|multiple|contradiction|unresolvedexits non-zero for gating.reference-audit audit --helplists the rest.
3. Read the report
Top level: entries, cited_but_missing (\cite keys with no entry), uncited, unparsed
(entries the tool could not read, with the reason), notes (input caveats), and summary.
Per entry (entries[i]), the key is entry.key, and verdict holds the outcome:
verdict |
Meaning | What to tell the user |
|---|---|---|
kind: "none" |
Matches no real document: a likely hallucination. | List it first, as a likely fabricated reference. |
kind: "contradiction" |
A DOI/arXiv id resolves, but the cited fields disagree with that work (contradiction_findings). |
Show the conflicting fields and the resolved work. |
kind: "multiple" |
Several distinct works fit. | Ask the user which one is meant. |
kind: "exactly_one" |
Resolved to one work (artifacts[0].best_record). |
Report its field_findings with status error or uncertain. |
null |
The tool could not check it. unresolved_reasons says why. |
List it as unable to verify, with the reasons. It is neither a pass nor a hallucination. |
issues holds per-entry problems such as backfilled or normalized identifiers. With
--check-citations, alignment_findings[].status is one of the following:
supportedcontradicted: the citation may misrepresent the source. Quoteevidence_quote.not_in_abstract: an advisory only. An abstract is a summary.unverifiable
4. Report and fix
- Report likely hallucinations first, then the entries the tool could not verify, then the
remaining issues. Give the counts from
summary. Point to the full report file. - Never delete or rewrite a reference flagged
noneon your own. Show it to the user. If you wrote that reference yourself, say so plainly. - Change a
.bibonly with values the report supplies: a backfilled DOI, a corrected field'scanonical_value, orcanonical_bibtex. Ask before you edit, unless the user already asked for fixes. Never invent a DOI, author, venue or year to make an entry pass. - After you edit, re-run the audit and report the new result.