Inspiration
On 2 July 2026 the Supreme Court of India held that it is misconduct for an advocate to cite AI-generated judgments without verifying them (Pooja Ramesh Singh v. Jammu and Kashmir Bank Ltd., para 7). Stanford researchers found that commercial legal AI tools hallucinate in 1 of every 6 or more benchmark queries. Indian advocates also have a second problem: since July 2024, every old IPC, CrPC and Evidence Act section has to be mapped to the new BNS, BNSS and BSA. A wrong mapping is as damaging as a fake case.
We did not want a model that is "more careful". We wanted a system where the model can only propose, and code decides what reaches the advocate.
What it does
Case brief. Paste an FIR and get a brief in which every point is checked against its source before you see it:
- Facts must be quoted word for word from the FIR.
- Section mappings (IPC→BNS, CrPC→BNSS, Evidence Act→BSA) come from the official MHA correspondence table, cross-checked with Indian Kanoon. They never come from model memory, and the offence date decides which code applies.
- Precedents must exist in our judgment library and quote it word for word. Nemotron Ultra then judges whether the passage really supports the point, and must quote its evidence, which is checked again.
- Later cases that followed or departed from each judgment come from a live Tavily search, with links.
- Strategy suggestions may only build on points that passed.
A final check removes any sentence that names a case, section or number not found in a verified source. Points that fail are listed separately with the reason, so nothing is hidden. If the library has nothing close enough, the brief says so instead of stretching.
Citation check. Paste any draft, including one written by another AI. Every citation gets a verdict: supports the point, does not support it, found online but not checked, or not found, possibly fabricated. For judgments outside our library, Tavily Search finds a trusted full-text copy and Tavily Extract reads it, so it goes through the same word-for-word and judge checks.
Both modes show every step live, with the model that ran it, and both export a PDF report.
How we built it
- NVIDIA Nemotron 3 on Nebius Token Factory, one model per job:
- Nano (thinking off) for fast extraction from FIRs and drafts.
- Super for drafting typed claims.
- Ultra as the judge, with quote-back.
- Every model call uses
response_format: json_schemaplus pydantic validation and one repair; anything that still fails is marked unverified, never passed. Fallbacks (Ultra→Super, Nano→Super) are recorded in the output. - LangGraph pipeline: intake → section mapping → hybrid retrieval → drafting → parallel verification → re-draft of failed points → Tavily later-case search → final check.
- Retrieval: BM25 + Chroma (bge-base-en-v1.5), reranked by a cross-encoder. Queries are built from the law (statute titles, new-code headings) as well as the facts, with a dev-tuned threshold to abstain.
- Data:
- 295 Supreme Court and High Court judgments (17,907 passages) from the Indian Kanoon API.
- The six Acts.
- 525 IPC→BNS rows from the official MHA (CAPT Bhopal) table, each citing its page.
- FastAPI with live server-sent events, a React + Tailwind frontend, and a backend on AWS EC2 (Docker + Caddy). Rate limits and a daily token cap protect the shared demo.
Results (26 test FIRs; every number generated from result files)
- A fake precedent was injected into every brief: caught 26/26.
- A fake citation was planted in every audit draft: caught 26/26. Real citations were matched to the right judgment 25/26 times.
- With verification off, 85 of 172 drafted points (49%) were unsupported. With it on, 0 unsupported points reached the advocate, and the final check found 0 leaked sentences.
- Median 50 seconds per verified brief; 0 errored runs.
Challenges we ran into
- Ultra sometimes "stitched" a supporting quote from two different places in a judgment. The word-for-word check caught it, and a retry that names the failure fixed it.
- Drafted points that simply copied the passage always "supported" themselves. A near-copy check now forces the point to state a legal principle.
- Searching on the facts alone missed the relevant law. Law-first queries, plus reverse-mapping new BNS sections to the old IPC ones, restored recall.
- Nano with thinking on spent its whole token budget reasoning. We turned thinking off and bounded the output schema.
Accomplishments that we're proud of
Zero unsupported points reached the advocate in our evaluation, and every fabricated citation was caught. Every number on this page comes from a saved result file, not from memory.
What we learned
Verification beats instruction. Every failure we found was fixed in code, not by asking the model to try harder. Saying "not enough precedent found" is a feature.
What's next
A much larger judgment library, Hindi FIR input, and hand-labelled relevance to measure how often correct points are wrongly rejected.
CourtroomAI is a research aid, not legal advice.
Log in or sign up for Devpost to join the conversation.