Skip to main content

bibsleuth

Citation verification and analysis for LaTeX papers. Given .tex + .bib files, bibsleuth checks whether citations exist, detects mis-citations, suggests relevant papers for uncited claims, and surfaces contradicting evidence.

Install

uv pip install bibsleuth           # core (existence checking)
uv pip install 'bibsleuth[llm]'    # with LLM features (mis-citation, suggestions, contradictions)

Or as a tool:

uvx bibsleuth check paper.tex

Usage

bibsleuth check paper.tex                    # auto-discovers .bib
bibsleuth check paper.tex --bib refs.bib     # explicit .bib
bibsleuth check paper.tex --bib refs.bib,supplement.bib
bibsleuth check refs.bib                     # bib-only mode
bibsleuth check paper.tex --no-llm           # existence checking only
bibsleuth check paper.tex -o report          # write report.json + report.md
bibsleuth check paper.tex -o report --format json

TeX project discovery follows \input{} and \include{} recursively and loads all referenced \bibliography{} and \addbibresource{} files. Include cycles, missing files, conflicting bibliography keys, and cited keys missing from the bibliography are reported as errors.

System library

bibsleuth library add refs.bib       # add verified entries to ~/.bibsleuth/library.bib
bibsleuth library search "networks"  # search your accumulated citations

Quick start: checking your paper before submission

You have a LaTeX paper (paper.tex) and its bibliography (refs.bib) and want to make sure all references are real and correctly used before submitting.

Step 1. Check that all cited papers exist.

bibsleuth check paper.tex --no-llm

This parses your .bib file, queries 6 academic databases, and reports which entries are verified, likely matches, or not found. Each result includes a clickable DOI/URL so you can verify yourself. A not-found result doesn't necessarily mean the paper is fake — it may just be missing from the databases — but it's worth double-checking.

Step 2. Look at the report.

bibsleuth check paper.tex --no-llm -o report

This writes report.json (machine-readable) and report.md (human-readable). Open report.md to see a summary table and per-entry details. Any entries marked unverified or likely deserve a closer look. The report also suggests patches — missing DOIs or URLs that bibsleuth found in the databases.

Step 3. Run the full analysis (requires LLM).

export ANTHROPIC_API_KEY=sk-...
bibsleuth check paper.tex -o report

The default model is claude-sonnet-4-20250514. To use a different provider (e.g. OpenAI), set BIBSLEUTH_LLM_MODEL or pass --llm-model:

export OPENAI_API_KEY=sk-...
bibsleuth check paper.tex --llm-model openai/gpt-4o-mini -o report

Use --llm-concurrency to bound simultaneous model calls, --max-llm-citations to cap citation-support checks, and --max-llm-claims to cap suggestion and contradiction analysis. Individual LLM failures are recorded in the report without discarding completed citation verification or other successful analyses.

The model string is passed to litellm, which routes to the matching provider and API key.

This adds three LLM-powered checks on top of existence verification:

  • Mis-citation detection: for each \cite{}, does the cited paper's abstract actually support the claim you're making? Flags cases where a citation doesn't match the surrounding text.
  • Missing citation suggestions: finds claims that could use stronger citations and suggests real papers (verified against databases, not hallucinated).
  • Contradicting evidence: surfaces well-known papers that argue the opposite of your claims — better to address these proactively than have a reviewer bring them up.

Step 4. Save verified references to your personal library.

bibsleuth library add refs.bib

Over time this builds up a personal citation knowledge base at ~/.bibsleuth/library.bib that you can search across projects:

bibsleuth library search "network centrality"

Features

  1. Citation existence verification — queries OpenAlex, Semantic Scholar, CrossRef, arXiv, DBLP, PubMed
  2. Mis-citation detection (LLM) — checks if cited papers actually support the claims
  3. Missing citation suggestions (LLM + DB) — suggests papers for uncited claims, verified against databases
  4. Contradicting evidence (LLM + DB) — surfaces counterarguments from the literature
  5. System-wide BibTeX library — accumulates verified citations across projects

Design

LLM as scout, databases as ground truth. The LLM suggests directions (papers, contradictions); databases verify they exist. This avoids hallucinated references while leveraging broad literature knowledge.

Acknowledgments

Citation existence checking patterns adapted from CiteSleuth (MIT). Title normalization and verification strategies inspired by hallucinator.

License

MIT

Metadata

Release files for bibsleuth 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bibsleuth 0.3.0
File Size Uploaded
bibsleuth-0.3.0.tar.gz 41.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bibsleuth 0.3.0
File Interpreter ABI Platform
bibsleuth-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 85.8 kB

Release files / bibsleuth-0.3.0.tar.gz

Download URL bibsleuth-0.3.0.tar.gz
Size 41.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2d781d0f6a8f16180e1d7c0808ece520bcf4d8806029eb33ee3e0ef12c9a63e6
BLAKE2b-256 checksum
How to use checksums
d250cb85c5b429c5b9cdff5b15c016c7807e67a85e97cdfa17d786f11b8a9444
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / bibsleuth-0.3.0-py3-none-any.whl

Download URL bibsleuth-0.3.0-py3-none-any.whl
Size 44.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b67d661ebcf616ac35ac99fadf2a9b85718d88c778efe6b17a3fcf1199d765a8
BLAKE2b-256 checksum
How to use checksums
e8fba1f40fef88fe1ac2b7aee6200b75b2f64fb11e6be715b847201a5e0ea034
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page