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.
pip install check-hallucinationscheck-hallucinations references.bibEntries that cannot be found on Semantic Scholar are printed in red as potential hallucinations.
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.
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.bibMIT