{
  "question": "How do I check AI-generated citations for hallucinations?",
  "slug": "how-to-check-ai-generated-citations-for-hallucinations",
  "url": "https://www.rightshold.com/answers/how-to-check-ai-generated-citations-for-hallucinations",
  "short_answer": "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.",
  "checklist": [
    "Pull every citation out of the draft: cases, statutes, DOIs, URLs and quoted passages.",
    "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.",
    "Treat a 404 as 'find it by hand', not automatic proof of fabrication, since it only means CourtListener couldn't match it.",
    "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.",
    "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.",
    "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.",
    "Keep a record: the AI draft, the model that wrote it, the lookup results and who checked what, with the date."
  ],
  "sections": [
    {
      "heading": "Why this matters",
      "points": [
        "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.",
        "The opinion said there's nothing inherently improper about using a reliable AI tool for assistance, but existing rules give lawyers a gatekeeping role to ensure their filings are accurate. Responsibility stayed with the people who filed.",
        "It keeps happening. Charlotin's database lists decisions from courts in many countries involving lawyers, self-represented litigants, experts and judges, and its categories include fabricated case law, false quotes and misrepresented case law. Some recent entries involve AI features in legal research tools, not just general chatbots."
      ]
    },
    {
      "heading": "What automated checks catch, and what they miss",
      "points": [
        "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.",
        "A 200 only tells you a case with that citation exists. It doesn't tell you the case says what the draft claims or that a quote is accurate.",
        "Crossref's REST API returns the metadata publishers deposit for a DOI, with no sign-up, and includes post-publication updates from trusted sources such as Retraction Watch. Matching that metadata to the AI's reference catches invented papers and mismatched DOIs; checking the claim still means reading the paper.",
        "Asking the same model whether its citations are real isn't a check. Free Law Project, writing about the sanctioned lawyer whose brief cited ChatGPT's invented cases, notes that when he asked ChatGPT whether it made things up, it insisted it did not."
      ]
    },
    {
      "heading": "Building it into a pipeline",
      "points": [
        "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).",
        "Send what's left to a person with a link to each source, and have them confirm quotes and the propositions they support.",
        "Store the draft, the check results and the reviewer's sign-off together with a timestamp, so you can show later what was checked before it went out."
      ]
    }
  ],
  "checks": [],
  "ask_rightshold": {
    "start": "https://www.rightshold.com/start?ref=seo",
    "mcp_endpoint": "https://www.rightshold.com/mcp",
    "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.",
    "mcp_call": {
      "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"
      }
    },
    "also": [
      "Needs an API key. You can send hashes only; if you send the draft as output, Rightshold stores only its SHA-256. The receipt is Ed25519-signed, timestamped by Rightshold's clock and written to its append-only ledger, whose blocks are also anchored to Bitcoin through OpenTimestamps.",
      "If you send the draft as output, deterministic text checks such as {\"type\": \"contains\", \"none\": [\"[citation needed]\", \"TODO\"]} are run and their pass or fail is signed into the receipt. Rightshold doesn't look citations up.",
      "verify_ai_run is free and needs no key: a reviewer, client or court can send the receipt id and the draft to check it's the version that was recorded."
    ],
    "scope": "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."
  },
  "sources": [
    {
      "title": "Mata v. Avianca, Inc., No. 22-cv-1461 (S.D.N.Y. June 22, 2023), Opinion and Order on Sanctions (Justia)",
      "url": "https://law.justia.com/cases/federal/district-courts/new-york/nysdce/1:2022cv01461/575368/54/"
    },
    {
      "title": "CourtListener docket: Mata v. Avianca, Inc.",
      "url": "https://www.courtlistener.com/docket/63107798/mata-v-avianca-inc/"
    },
    {
      "title": "CourtListener: Citation Lookup and Verification API (v4)",
      "url": "https://www.courtlistener.com/help/api/rest/v4/citation-lookup/"
    },
    {
      "title": "Free Law Project: Combat hallucinations and look up citations with our new API (April 16, 2024)",
      "url": "https://free.law/2024/04/16/citation-lookup-api/"
    },
    {
      "title": "Crossref: REST API",
      "url": "https://www.crossref.org/documentation/retrieve-metadata/rest-api/"
    },
    {
      "title": "Damien Charlotin: AI Hallucination Cases database",
      "url": "https://www.damiencharlotin.com/hallucinations/"
    }
  ],
  "related": [
    {
      "title": "Who is liable when an AI chatbot gives a customer wrong information?",
      "url": "https://www.rightshold.com/answers/who-is-responsible-when-an-ai-chatbot-gives-a-customer-wrong-information"
    },
    {
      "title": "How to prove what an AI model said at a specific time",
      "url": "https://www.rightshold.com/answers/how-to-prove-what-an-ai-model-said-at-a-specific-time"
    },
    {
      "title": "How to stop an AI coding agent from installing hallucinated packages (slopsquatting)",
      "url": "https://www.rightshold.com/answers/how-to-stop-an-ai-coding-agent-from-installing-hallucinated-packages-slopsquatting"
    },
    {
      "title": "How to make LLM eval results reproducible and tamper-evident",
      "url": "https://www.rightshold.com/answers/how-to-make-llm-eval-results-reproducible-and-tamper-evident"
    }
  ],
  "computed_from": "Curated guidance; license verdicts computed from Rightshold's license profiles at render time. Not legal advice.",
  "updated": "2026-10-31"
}