🏆 Neo4j Prize — Best Use of a Graph Database

CasePulse - AI Case-Theory Stress Test

Can we prove what we pleaded? A graph-native stress test for litigation case theory

Date

June 2026

Event

Hack the Law 2026, Cambridge

Role

Engineering — 4-person team

TypeScriptReactNeo4j / Graph Data ScienceNVIDIA NemotronGoogle Document AICloudflare WorkersHonoD1

Overview

CasePulse is an AI case-theory stress test for litigators, built over a weekend at Hack the Law 2026 in Cambridge for the CMS × Harvey "Pleading-to-Proof" challenge. It won the Neo4j prize for Best Use of a Graph Database.

The question we focused on was deliberately simple: can we prove what we pleaded? Most legal AI surfaces documents that are related to a case. CasePulse instead asks whether the pleaded case can actually be proved on the evidence in the bundle — allegation by allegation, sourced to the verbatim line.

What it does

Given a litigation bundle (a pleading plus its evidence), CasePulse:

  • Extracts every pleaded proposition from the pleading and maps it back to its paragraph
  • Maps each allegation to the evidence as supported, contradicted, an evidence gap, or unaddressed — with a verbatim quote behind every classification
  • Scores trial-readiness and ranks the case's biggest vulnerabilities
  • Red-teams the case: for each weak allegation it drafts the cross-examination or strike-out an opponent would make using your own bundle, plus a "fix before trial" note
  • Graphs the dispute so the structure of the case — not just its documents — becomes searchable

Why a graph database

A litigation bundle is a network, not a list. Neo4j let us model the case as a graph of allegations, exhibits, witnesses, contradictions, evidential gaps, and document relationships, then run real graph algorithms over it:

  • PageRank to find pivotal evidence — the exhibits the whole case leans on
  • Louvain community detection to surface contradiction clusters rather than isolated conflicts
  • Node similarity as a graph-native detector for evidence you would expect to exist but that is missing from the bundle

That structure is what made weak claims legible. Flat retrieval can tell you a document is relevant; the graph tells you which allegation is load-bearing and which cluster of exhibits quietly undermines it.

Technical implementation

I handled the technical side of the build. The engine is a two-stage pipeline rather than a single model call, because pure entailment models are unreliable on legal text:

  • High-recall retrieval over the bundle, then an LLM judge with an explicit abstention threshold — the system is allowed to say "not confident" instead of guessing
  • NVIDIA Nemotron as the primary model for extraction, judging, and red-teaming, with Gemini as a drop-in fallback
  • Google Cloud Document AI to OCR newly uploaded evidence PDFs before they enter the pipeline
  • Neo4j Aura with Graph Data Science for the graph and all graph algorithms, queried over Cypher
  • A React front-end and a Hono API on Cloudflare Workers, with D1 for analysis persistence
  • Swappable interfaces for the model, graph, and retrieval layers, so the engine ports to another backend by changing configuration rather than code

Results on the challenge bundle

Run against the dispute bundle provided for the challenge, CasePulse scored the pleaded case 28/100 on trial-readiness and found that 8 of 13 allegations were contradicted — by the claimant's own evidence — across an 18-document bundle. Every one of those findings links back to the line that supports it, so a lawyer can check the machine's work in seconds.

Being honest about limits

The tool is built to be auditable rather than authoritative. Every edge carries a confidence score and a source quote, the judge abstains below its threshold, and calibration was reported against a hand-labelled gold set. The demo bundle is a purpose-built synthetic commercial dispute, the gold set is small, and some pleaded questions — the enforceability of a liability cap, for instance — are matters of law for a court, not for a model. The lawyer keeps the judgement; the tool just makes sure nothing in the file goes unread.

Team

Built with Shellie Audsley, Peace Kiariki, and Jonas Engelhardt at Hack the Law 2026, hosted at Cambridge Judge Business School. Thanks to Hack the Law, the University of Cambridge, and Neo4j for the event and the prize.

Try CasePulse

The live demo runs the real pipeline on a synthetic commercial dispute; the source is on GitHub.