Skip to main content

Check BibTeX references for hallucinations before submitting a paper to arXiv

Project description

check-hallucinations

A command-line tool to detect hallucinated references in BibTeX files before submitting a paper to arXiv.

It checks each reference against Semantic Scholar and flags any title that cannot be found.

Installation

pip install check-hallucinations

Usage

check-hallucinations references.bib

Entries that cannot be found on Semantic Scholar are printed in red as potential hallucinations.

How it works

For each entry in the BibTeX file, the tool queries Semantic Scholar by title. If no match is found, the entry is flagged as a likely hallucination (a reference invented by an LLM or a typo). misc entries without an eprint field are skipped unless they lack a howpublished URL.

API key

By default the tool uses the public Semantic Scholar API (rate-limited). For higher throughput, set the SEMANTICSCHOLAR_API_KEY environment variable:

export SEMANTICSCHOLAR_API_KEY=your-key-here
check-hallucinations references.bib

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

check_hallucinations-0.7.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file check_hallucinations-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for check_hallucinations-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dab7a4b66b59fb5d13dc9b6b523c1e081675c653d750c8109c2d8393ca5c2b3
MD5 2b7de6475437b612c0ff0bff373d36f2
BLAKE2b-256 aa416f99e851b48b0d02810b2a325c813e4c754f78c99ef40c32eb5247d028e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for check_hallucinations-0.7.0-py3-none-any.whl:

Publisher: pypi-publish.yml on ASSERT-KTH/check-hallucinations

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page