Inspiration

In 2023, a New York lawyer filed a federal brief citing six cases that did not exist — an AI chatbot had invented them, complete with fake quotes and docket numbers. He was sanctioned. Since then, courts on multiple continents have caught the same thing again and again; a public tracker now lists 2,000+ filings built on hallucinated citations. The uncomfortable truth: as AI writes more of our legal text, a citation can no longer be trusted just because it looks real. I wanted a tool that answers one question fast — is this case actually real, and does it say what the writer claims it says?

What it does

Vera verifies legal citations against the real court record and flags the ones AI made up. It is a verifier, not a generator — it never uses an LLM to decide what is true.

Two ways to use it:

  • Verify my text — paste a brief or memo, or upload a PDF filing, and Vera checks every citation in it.
  • Ask AI & catch its mistakes — ask a legal question; Vera sends it to an LLM, then verifies every case the AI cites, live. The AI generates; Vera checks.

Every citation gets one of five verdicts:

  • 🟢 Verified — real case, and the cited name matches the record
  • 🟣 Not good law — real case, but overruled (e.g. Roe v. Wade → Dobbs)
  • 🟠 Questionable — wrong case name, or a fabricated quote
  • 🔴 No such case — fabricated; no case by that name exists in the record
  • 🟡 Unverified — could not confirm (deliberately never flagged as fake)

How I built it

The intelligence is in the pipeline, not a model:

  1. Extract — eyecite, a formal citation parser, pulls structured citations from the text. Deterministic and offline.
  2. Verify — each citation is looked up in the CourtListener database of real U.S. cases to confirm the case exists, the cited name matches, and any quoted language actually appears in the opinion.
  3. Good-law check — a curated map of landmark reversals flags precedents that are real but no longer good law.

The backend is Python + FastAPI, the UI is a single static page in Tailwind CSS, and the whole thing runs serverless on Vercel.

Challenges I ran into

The hardest design rule was precision over recall: Vera must never call a real case fake. So a network hiccup or an unusual citation format degrades to a 🟡 unverified verdict, never a false 🔴 fabricated. Telling "does not exist" apart from "exists but is formatted unusually" took careful handling. Overruled-but-real cases like Roe and Plessy also needed their own verdict — they are not fake, but citing them as good law is its own kind of error.

What I learned

The trustworthy move in an AI tool is often to say "I am not sure" instead of guessing — the 🟡 verdict turned out to be the most important one. Grounding every claim in a checkable source is what separates verification from just another confident hallucination.

Tech stack & credits

  • Language: Python 3.12
  • Backend: FastAPI, Uvicorn
  • Citation parsing: eyecite (Free Law Project)
  • Ground-truth data: CourtListener REST API (Free Law Project)
  • AI (Ask mode + deep grounding check): Google Gemini (gemini-flash-lite-latest)
  • PDF extraction: pypdf
  • Frontend: HTML, Tailwind CSS, vanilla JavaScript
  • Hosting: Vercel

Case data via the CourtListener API by the nonprofit Free Law Project. Real-world hallucination statistics from the public AI-hallucinations legal database maintained by Damien Charlotin.

What's next

Broader statute coverage, more jurisdictions, batch review for long PDFs, and a browser extension so lawyers can verify citations right inside the tools they already draft in.

Built With

Share this project:

Updates

Submission history