Generating Legal Commentaries from Case Databases via Retrieval, Clustering, and Generation

Max Prior, Niklas Wais, Matthias Grabmair
5/23/2026
cs.CL

No confident code implementation found for this paper.

Abstract

We present a fully automated pipeline that transforms large collections of court decisions into legal commentaries for statutes - without providing any handcrafted doctrinal framework. Using 4.555 decisions of the German Federal Court of Justice that cite sections 242, 280, 812 and 823 of the German Civil Code (BGB), we extract paragraph-level chunks, summarize their reasoning, and derive keywords, which are embedded and clustered.

Show full abstract

For each cluster, an LLM generates headings and synthesizes citation-rich sections, which are then merged into coherent commentaries by four state-of-the-art LLMs. We evaluate along five dimensions - topical relevance, heading-match, citation faithfulness, cluster distinction and logical ordering - using both a human expert and an LLM-judge. Our results show that commentary-like argument mining from court decisions to generate reports that can be refreshed within minutes at minimal cost is feasible, yet they highlight limitations arising from restricted sources and the normativity of legal reasoning.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{prior2026generating,
  title  = {Generating Legal Commentaries from Case Databases via Retrieval, Clustering, and Generation},
  author = {Max Prior and Niklas Wais and Matthias Grabmair},
  year   = {2026},
  eprint = {2605.24534},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.24534v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.24534.svg)](https://codeofpaper.com/paper/2605.24534)

Discussion