Extracting event graphs from 4M court decisions: enum explosion and nested legal logic

SignificantZebra5883 · reddit · 2026-10-17

A developer building a legal search/analytics engine over 4M Slovak court decisions details why flat representations fail when combining near-100% precision on complex queries with jurimetric statistics. LLM-based structured JSON extraction failed in production for two reasons: (1) enum explosion on open-world facts — LLMs invent thousands of incompatible strings unless locked to enums, which then break prompt adherence; (2) recursive legal logic — nested state chains like CANCELS(REJECTS(REQUESTS(...))) get misread, and flat triples lose evidentiality (alleged vs denied vs unproven). The author proposes an ID-linked event graph (Neo-Davidsonian/RDF-star style) with 8–15 flat event rows per decision, @id references and epistemic qualifiers, with concrete JSON examples, and asks the NLP/IR/LegalTech community for alternatives.

Original post →

More from coding & agent

coding & agent channel →