Rightshold™ Sign up

Answers · AI evidence

How do I check AI-generated citations for hallucinations?

Last updated

TL;DR: Check every citation against the primary source, not against the AI: first confirm it exists in an authoritative database, then open it and confirm it says what the text claims. The existence step can be automated (CourtListener's Citation Lookup API for US case law, Crossref's REST API for DOIs), but it only catches invented sources. Damien Charlotin's AI Hallucination Cases database, which listed 2,246 decisions on October 31, 2026, also tracks false quotes and misrepresented real cases, and only a person reading the source catches those.

What should I check, step by step?

1. Pull every citation out of the draft: cases, statutes, DOIs, URLs and quoted passages.

  1. US case law: POST the text to CourtListener's /api/rest/v4/citation-lookup/ with an API token. Status 200 means the citation was found; 404 means it parsed as a valid citation but wasn't found; 400 means the reporter isn't recognized; 300 means it matched more than one case.
  2. Treat a 404 as 'find it by hand', not automatic proof of fabrication, since it only means CourtListener couldn't match it.
  3. Scholarly references: look up each DOI at api.crossref.org/works/{doi}. If Crossref has no record, check /works/{doi}/agency or resolve it at doi.org, since some DOIs are registered with other agencies such as DataCite.
  4. Compare the title, authors, year and journal the lookup returns with what the AI wrote. A real DOI attached to the wrong paper is still a bad citation.
  5. Open every source you rely on and check that quoted text appears in it word for word and that it supports the point. No lookup API does that part.
  6. Keep a record: the AI draft, the model that wrote it, the lookup results and who checked what, with the date.

Why this matters

In Mata v. Avianca (S.D.N.Y., June 22, 2023), Judge P. Kevin Castel sanctioned two lawyers and their firm for submitting non-existent judicial opinions with fake quotes and citations created by ChatGPT, then standing by them after the court questioned them. The court imposed a $5,000 penalty and ordered letters to each judge falsely named as the author of a fake opinion.

What automated checks catch, and what they miss

CourtListener's Citation Lookup API, launched by Free Law Project in April 2024 as a guardrail against hallucinated citations, parses citations with Eyecite and matches them to its database. It looks up at most 250 citations per request, accepts up to 64,000 characters of text (about 50 pages) and is throttled to 60 valid citations per minute.

Building it into a pipeline

Run the existence checks on every AI draft automatically and hold publishing or filing while any citation is unresolved (404, 400 or 300 from CourtListener, or no DOI record).

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Record a signed receipt for this AI-drafted brief: the model, hashes of my prompt and the draft, and my citation-check results, so I can show later what was checked and when.”

One-click setup

{
  "tool": "record_ai_run",
  "arguments": {
    "model": "gpt-4o-2024-08-06",
    "provider": "openai",
    "prompt_sha256": "<sha256 of the prompt and sources you gave the model>",
    "output_sha256": "<sha256 of the AI draft>",
    "params": {
      "citations_found": 14,
      "citations_unresolved": 1,
      "lookup": "CourtListener citation-lookup v4",
      "reviewer": "<role or initials>"
    },
    "ran_at": "2026-10-30T14:00:00Z"
  }
}

Rightshold doesn't check citations, query CourtListener or Crossref, or judge whether a source supports a claim. The receipt records the hashes and results you send and when they were recorded, not that they're correct. Not legal advice; follow your court's rules on AI use and certification.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'