Skip to main content

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

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.16.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for check_hallucinations-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59f3df86308b46fc2e096a5699e1b6c9ad0175974d8f3e05ec7a0f68d2f61543
MD5 b66878a6cd29340882f4af3df2f2db1a
BLAKE2b-256 25e17f024c44bb43437a31bc3a0e861c01ff75748386d56e44d2df1c365decd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for check_hallucinations-0.16.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.

Release history Release notifications | RSS feed

0.19.0

1 file

0.18.0

1 file

0.17.0

1 file

This release

0.16.0 This release

1 file

0.15.0

1 file

0.14.0

1 file

0.13.0

1 file

0.12.0

1 file

0.11.0

1 file

0.10.0

1 file

0.9.0

1 file

0.8.0

1 file

0.7.0

1 file

0.6.0

1 file

0.5.0

1 file

0.4.0

1 file

0.3.0

1 file

0.2.0

1 file

Supported by

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