bibguard

One command to detect hallucinated, broken, and retracted citations in your paper.

$ pip install bibguard
bibguard paper.bib
  bibguard v0.2.0
  paper.bib — 42 entries

  [ 1/42] vaswani2017attention                  crossref, dblp
  [ 2/42] he2016resnet                          crossref, s2
  [ 3/42] fake_quantum_paper                    no match
  [ 4/42] wakefield1998mmr                     ⚠️  crossref
   ...
  [42/42] brown2020gpt3                         s2, openalex

  ──────────────────────────────────────────────────
  ✅ 38  ⚠️  2  ❌ 2  (42 entries in 67.3s)

  FAIL entries:
     fake_quantum_paper — phantom_doi
     halluc_gpt_ref_7 — verification
  ──────────────────────────────────────────────────

Features

🔍

5-Source Cascade

Queries arXiv, Crossref, DBLP, Semantic Scholar, and OpenAlex. Falls back gracefully across sources.

🚨

Phantom ID Detection

Catches DOIs and arXiv IDs that look valid but don't resolve — the strongest hallucination signal.

💥

Kill-Shot Logic

A phantom ID cannot be overridden by a similar search result. No false negatives on fabricated identifiers.

📝

TeX Cross-Audit

Find \cite{key} with no .bib entry, and orphan entries that are never cited.

🔧

Auto-Fix

Generates a corrected .bib with missing DOIs and eprint IDs filled in from API results.

📦

Minimal Dependencies

Core needs only requests + bibtexparser. Optional RapidFuzz for better matching.

Benchmark

58-case golden test set with known hallucinated, retracted, chimera, and real papers. Reproduce it yourself.

CategoryMetricResult
Hallucinated (14 fabricated)Detected as FAIL14/14 (100%)
Chimera (5 mixed-metadata)Detected as ≥ WARN5/5 (100%)
Real papers (10 legitimate)False positive (FAIL)1/10 (10%)
Retracted (28 retractions)Any issue flagged19/28 (68%)
Runtime58 entries95s (~1.6s/entry)

API Sources

No API keys required. All queries respect rate limits.

arXiv
ID resolution
Crossref
DOI resolution
DBLP
CS gold standard
Semantic Scholar
200M+ papers
OpenAlex
250M+ works

AI Assistant Integration

Ships with skill definitions for major AI coding assistants.

Claude Code
/bibguard paper.bib
OpenAI Codex
/bibguard paper.bib
Cursor
auto-triggered on .bib
Any CLI agent
bibguard --json

Need deeper verification?

bibguard handles L0 (existence & metadata verification). For semantic NLI, citation intent classification, graph anomaly detection, and Bayesian risk scoring, see IntegriRef — the full L0-L4 verification stack.