LLM plugin for verifying academic citations against Crossref
Project description
LLM Citation Verifier
An LLM plugin that verifies academic citations against the Crossref database to catch hallucinated references in AI-generated content.
The Problem
AI research tools sometimes hallucinate citations - generating plausible-looking DOIs for papers that don't exist.
The Solution
This plugin automatically verifies citations in real-time, flagging fake DOIs and validating real papers with full metadata.
Installation
llm install llm-citation-verifier
Usage Examples
Real-Time Citation Verification
# Verify citations as the LLM generates content
llm -T verify_citation "What's new in dye sensitized solar cells? Check all the references." --td
# Single breakthrough with verification
llm -T verify_citation "What's one recent breakthrough in cancer immunotherapy? Cite just one paper and verify it." --td
Quality Control for AI Content
# Review suspicious AI-generated content
llm -T verify_citation "This AI tool cited these papers: 10.1038/nature12373 and 10.1234/fake.doi.2024. Check if they're real." --td
# Batch verification
llm -T verify_citation "Verify these DOIs from an AI summary: 10.1038/nature12373, 10.1126/science.abc123, 10.1234/fake.journal.2024" --td
Research Integrity
# Audit AI research tools
llm -T verify_citation "Tell me about recent AI alignment breakthroughs. Verify any papers you cite." --td
# Fact-check literature reviews
llm -T verify_citation "What are the latest developments in quantum computing? Make sure all citations are real." --td
What It Does
- ✅ Catches fake citations - Flags DOIs that don't exist in Crossref
- ✅ Validates real papers - Returns title, authors, journal, year
- ✅ Real-time verification - Works during content generation
- ✅ Prevents hallucination - Stops fake references from appearing
Example Output
Tool call: verify_citation({'doi': '10.1038/s41591-023-02452-7'})
{
"verified": false,
"doi": "10.1038/s41591-023-02452-7",
"error": "DOI not found in Crossref database - likely hallucinated"
}
Tool call: verify_citation({'doi': '10.1016/j.cell.2023.02.029'})
{
"verified": true,
"doi": "10.1016/j.cell.2023.02.029",
"title": "Discovery of phage determinants that confer sensitivity to bacterial immune systems",
"authors": "Avigail Stokar-Avihail, Taya Fedorenko, Jens Hör, et al.",
"journal": "Cell",
"year": "2023"
}
Use Cases
- Publishing workflows - Verify citations before publication
- AI content review - Quality control for AI writing assistants
- Research integrity - Audit AI-generated literature reviews
- Fact-checking - Validate suspicious citation claims
Development
git clone https://github.com/your-org/llm-citation-verifier
cd llm-citation-verifier
uv sync
uv pip install -e .
uv run pytest
Pro Tips
- Use
--tdflag to see verification calls in real-time - Chain limits prevent infinite verification loops
- Works with any topic - just add "verify citations" to your prompt
- Catches both completely fake DOIs and real DOIs used in wrong context
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_citation_verifier-0.1.2.tar.gz.
File metadata
- Download URL: llm_citation_verifier-0.1.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b5d9bd1c8511976f3a52bdf4276d027ff317438fafdaab87141d55c2ffa06f8
|
|
| MD5 |
a8b38c7eac8f95ea5d36619601fe5dfa
|
|
| BLAKE2b-256 |
8370349e81b35388547ecb395035133df759487d009e0fee0c2c4677c355d801
|
File details
Details for the file llm_citation_verifier-0.1.2-py3-none-any.whl.
File metadata
- Download URL: llm_citation_verifier-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a867b18048e383ea95bb2d9dc530900674a46f9fe95f13758308e189bc7c092e
|
|
| MD5 |
754b4a104cc33c215cc39bd2eb32037a
|
|
| BLAKE2b-256 |
e01ef3c83c6943407384413b471e1c0fb319706880df5efb7288ebef7b7bc596
|