Abstract
Legal Judgment Prediction (LJP) aims to automate the determination of judicial outcomes based on case facts. While Large Language Models (LLMs) possess strong reasoning capabilities, they often struggle with domain-specific constraints like large label spaces and context window limits. This paper introduces PLJP (Precedent-enhanced Legal Judgment Prediction), a hybrid framework that integrates LLMs with task-specific domain models. By reorganizing facts into structured triplets and utilizing domain models for targeted precedent retrieval, PLJP achieves state-of-the-art performance across law article, charge, and prison term prediction tasks.
Introduction
In the real world, judges do not operate in a vacuum; they rely heavily on precedents—past cases with similar facts—to ensure consistency and fairness. Replicating this process in AI has been challenging. Existing approaches typically fall into two camps: domain-specific models (like BERT) that are efficient but lack deep semantic understanding, and LLMs that are excellent at reasoning but struggle with abstract legal labels and long-context management.
To bridge this gap, researchers developed the PLJP framework, which mimics human judicial reasoning by effectively incorporating precedents into the prediction pipeline.
Methodology: The PLJP Framework
The PLJP framework employs a "divide and conquer" strategy through three main stages:
1. Fact Reorganization
Raw legal text is often messy and verbose. PLJP uses an LLM to summarize case facts into a structured triplet: (subjective motivation, objective behavior, and ex post facto circumstances). This categorization filters out noise and focuses the model on the elements that legally define a crime.
2. Domain-Model Collaboration
To handle the vast space of legal outcomes, PLJP uses a collaborative approach:
- Predictive Model: A fine-tuned domain model (e.g., BERT) generates a shortlist of candidate labels.
- Retrieval Model: For each candidate, it searches a massive database to find the most relevant historical precedent.
3. In-Context Precedent Comprehension
Finally, the LLM is given the original facts, the candidate labels, and the retrieved precedents. It is prompted to comprehend the nuances between the precedents and select the final judgment, allowing for high-level reasoning on a curated set of information.
Experimental Evaluation
The framework was tested on the standard CAIL2018 dataset and a newly curated CJO22 dataset. CJO22 contains cases occurring after September 2021 to ensure the LLM (GPT-3.5) is truly predicting outcomes rather than recalling training data.
Key Results
PLJP, particularly when paired with BERT as the domain model, outperformed all baselines across multiple sub-tasks:
- Accuracy: On the CJO22 dataset, PLJP(BERT) achieved 94.18% accuracy for both law articles and charges, significantly higher than standalone LLMs and standard BERT models.
- Prison Terms: While prison term estimation remains the most difficult task, PLJP led the field with a Macro-F1 score of 31.98, nearly double that of some traditional models.
- The Precedent Advantage: Ablation studies confirmed that the "precedent-enhanced" component is critical. Precedents act as "soft labels," providing the LLM with concrete narratives to compare against the case at hand.
Conclusion
The PLJP framework demonstrates that combining the reasoning power of LLMs with the precision of domain models and historical precedents is a robust path forward for legal AI. By structured fact reorganization and targeted retrieval, the system bypasses the technical limitations of standalone models. Future work will explore multi-round reasoning and generalization to other legal systems and specialized fields like medicine.
Summary updated