Precedent-Enhanced Legal Judgment Prediction with LLM and Domain-Model Collaboration

Yiquan Wu, Siying Zhou, Yifei Liu, Weiming Lu, Xiaozhong Liu, Yating Zhang, Changlong Sun, Fei Wu, Kun Kuang

Abstract

Legal Judgment Prediction (LJP) is a critical task in Legal AI, aiming to predict case outcomes based on fact descriptions. While precedents—previous cases with similar facts—are foundational to judicial systems, many AI models treat cases in isolation. We propose the Precedent-Enhanced LJP framework (PLJP), which synergizes the reasoning capabilities of Large Language Models (LLMs) with the efficiency of domain-specific models. In this framework, domain models retrieve relevant precedents and provide candidate labels, while the LLM performs in-context comprehension to make the final prediction. Experiments on real-world datasets, including a newly curated 2022 dataset, demonstrate that PLJP achieves state-of-the-art performance, offering a promising direction for model collaboration in specialized domains.

Introduction

Legal Judgment Prediction (LJP) involves automatically determining applicable law articles, specific charges, and prison terms from case facts. Despite advancements in deep learning, two primary challenges persist. First, the Precedent Gap: most models ignore historical precedents that ensure judicial consistency. Second, the Model Trade-off: LLMs possess superior reasoning but struggle with the vast, abstract label spaces of law, while domain-specific models (like fine-tuned BERT) are efficient classifiers but lack the nuanced comprehension required to distinguish between highly similar crimes.

The PLJP Framework

To address these hurdles, the PLJP framework employs a three-stage collaborative pipeline designed to leverage the strengths of both LLMs and domain models.

Overview of the PLJP framework, illustrating the collaboration between domain models and LLMs.

1. Fact Reorganization

To mitigate noise in raw legal text, an LLM summarizes case facts into a structured triplet:

  • Subjective Motivation: The defendant's intent.
  • Objective Behavior: The specific acts committed.
  • Ex Post Facto Circumstances: Events following the act, such as surrendering to authorities.

2. Domain-Model Filtering and Retrieval

Efficiency is achieved by using domain-specific models for heavy lifting:

  • Predictive Filtering: A fine-tuned domain model (e.g., BERT) generates a small set of candidate labels (e.g., the top 3 most likely charges).
  • Precedent Retrieval: A retrieval model searches a massive case database to find historical precedents specifically corresponding to those candidate labels.

3. LLM-Enabled Reasoning

The LLM receives the original facts, the candidate labels, and the retrieved precedents. It then performs "in-context precedent comprehension," comparing the current case to historical examples to determine the most appropriate legal judgment.

Experimental Results

We evaluated PLJP on two datasets: CAIL2018, a standard large-scale Chinese legal dataset, and CJO22, a new dataset of cases from 2022 curated to prevent data leakage (ensuring the LLM had not seen these cases during its initial training).

Performance comparison of PLJP against baseline models on CJO22 and CAIL2018 datasets.

As shown in the results table, PLJP (using BERT as the domain model) achieved state-of-the-art (SOTA) performance across all metrics. On the CJO22 dataset, PLJP reached an accuracy of 94.18% for law article and charge prediction, significantly outperforming both standalone LLMs (which struggled with the abstract labels) and specialized legal models like R-Former and NeurJudge. While prison term prediction remains a challenging task for all models, PLJP led the field with 43.52% accuracy.

Discussion and Insights

The success of PLJP highlights the value of treating precedents as "few-shot" examples. By providing the LLM with high-quality, relevant precedents, the system can better distinguish between confusingly similar charges, such as Contract Fraud versus General Fraud. Furthermore, the "Filter and Reason" paradigm allows the system to bypass LLM prompt length limits and focus reasoning power on a narrowed search space.

Conclusion

The PLJP framework demonstrates that the collaboration between LLMs and domain-specific models can overcome the limitations inherent in using either model type in isolation. Future work will explore multi-round "Chain-of-Thought" interactions and the application of this framework to Common Law systems, where precedents carry even greater formal weight. While these tools offer powerful support for judicial consistency, they are intended to assist, rather than replace, human judges.

Summary updated

BibTeX
@inproceedings{wu2023precedent,
  author = {Yiquan Wu and Siying Zhou and Yifei Liu and Weiming Lu and Xiaozhong Liu and Yating Zhang and Changlong Sun and Fei Wu and Kun Kuang},
  title = {{Precedent-Enhanced Legal Judgment Prediction with LLM and Domain-Model Collaboration}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.740},
}
Figure