A Legal Case Matching Model Using Dual LLMs, BGE, and Mamba-2
摘要
This paper presents a novel two-stage model designed to enhance both the efficiency and accuracy of legal case matching, specifically tailored to the Chinese legal system. The first stage employs two advanced Large Language Models (LLMs), Tongyi Qianwen and Gemini, to predict the crime names associated with legal cases. Concurrently, we leverage the BGE embedding model to transform the extensive legal texts into embedding vectors, ensuring that semantic information is preserved. In the second stage, these text embeddings are processed using the Mamba-2 neural network model, which classifies the embeddings into four levels of matching degrees (0, 1, 2, and 3). This classification helps in quantitatively assessing the similarity between legal cases. Through comprehensive training and experimental validation on the LeCaRDv2 dataset, our approach demonstrates superior accuracy and effectiveness compared to existing baselines, making significant strides in applying machine learning to legal case matching. The proposed methodology streamlines the legal case retrieval process. It provides a scalable solution for intelligent legal research and automated case analysis, thus addressing some of the critical challenges in modern legal technology.