Abstract
Legal case retrieval is a critical task for judicial fairness, yet it faces challenges due to the extreme length, complexity, and domain-specific nature of legal documents. We present KELLER, a novel framework that leverages Large Language Models (LLMs) to reformulate long legal texts into structured, knowledge-guided sub-facts. By decomposing cases into individual criminal behaviors and employing a granular matching mechanism, KELLER achieves state-of-the-art performance on Chinese legal benchmarks while providing inherent interpretability.
Introduction
In legal systems governed by stare decisis, finding relevant precedents is essential. However, traditional retrieval methods struggle with legal documents for several reasons:
- Length and Complexity: Documents often exceed the token limits of standard encoders like BERT.
- Information Density: Critical facts are dispersed across various sections (Procedure, Fact, Reasoning, Decision).
- Domain Specificity: General models often fail to distinguish subtle legal nuances in criminal behavior.
Existing solutions, such as context window expansion or generic summarization, frequently lose the "legal essence" of the case. KELLER addresses these issues by transforming documents into concise, legally-grounded sub-facts.
Methodology
The KELLER framework (Knowledge-guidEd case reformuLation approach for LEgal case Retrieval) operates in three distinct stages:
1. Knowledge-Guided Case Reformulation
KELLER utilizes a two-step prompting process with an LLM (e.g., Qwen-72B). First, it extracts all mentioned crimes and law articles. Second, it uses these "crime-article" pairs as anchors to summarize specific "sub-facts" for each crime. This process distills massive documents into clean, structured snippets.
2. Matching Model Architecture
The model encodes these sub-facts using a pre-trained encoder (SAILER). It employs MaxSim and Sum operators to calculate similarity, allowing the model to find the best match for each specific sub-fact in a query against the candidate document.
3. Dual-Level Contrastive Learning
Training involves recognizing similarities at both the case level (overall document relevance) and the sub-fact level (specific criminal act matching).
Case Reformulation and Interpretability
A key innovation of KELLER is using law articles as objective abstractions to guide the LLM. This ensures the extracted sub-facts are legally relevant. Furthermore, the sub-fact matching process generates a similarity matrix, allowing practitioners to see exactly which behaviors in a new case align with a precedent.
Evaluation and Results
KELLER was evaluated on the LeCaRD and LeCaRDv2 Chinese legal benchmarks. It significantly outperformed baselines including BM25, BERT, Lawformer, and PromptCase.
- Performance: On LeCaRDv2, KELLER achieved a MAP of 68.29, surpassing the previous best neural model (SAILER) at 60.62.
- Zero-Shot Capability: The reformulated cases are of such high quality that KELLER outperformed many fine-tuned models even in a zero-shot setting.
- Handling Complexity: In "controversial" cases involving multiple crimes, KELLER showed improvements of up to 24.04% over baselines, demonstrating its robustness in multifaceted scenarios.
Conclusion
KELLER represents a significant step forward in interpretable legal retrieval. While it introduces computational costs associated with large-scale LLM inference and depends on a maintained legal knowledge base, its ability to provide clear, granular justifications for case similarity offers immense value to the legal profession. Future work will focus on integrating more specialized knowledge and generating natural language explanations for retrieval results.
Summary updated