Legal case retrieval plays an important role for legal practitioners to effectively retrieve relevant cases given a query case. Most existing neural legal case retrieval models directly encode the whole legal text of a case to generate a case representation, which is then utilised to conduct a nearest neighbour search for retrieval. Although these straightforward methods have achieved improvement over conventional statistical methods in retrieval accuracy, two significant challenges are identified in this paper: (1) Legal feature alignment: the usage of the whole case text as the input will generally incorporate redundant and noisy information because, from the legal perspective, the determining factor of relevant cases is the alignment of key legal features instead of whole text matching; (2) Legal context preservation: furthermore, since the existing text encoding models usually have an input length limit shorter than the case, the whole case text needs to be truncated or divided into paragraphs, which leads to the loss of the global context of legal information. In this paper, a novel legal case retrieval framework, PromptCase, is proposed to tackle these challenges. Firstly, legal facts and legal issues are identified and formally defined as the key features facilitating legal case retrieval based on a thorough study of the definition of relevant cases from a legal perspective. Secondly, with the determining legal features, a prompt-based encoding scheme is designed to conduct an effective encoding with language models. Extensive zero-shot experiments have been conducted on two benchmark datasets in legal case retrieval, which demonstrate the superior retrieval effectiveness of the proposed PromptCase. The code has been released on https://github.com/yanran-tang/PromptCase.
翻译:法律案例检索在法律从业者有效检索与查询案例相关的案例中发挥着重要作用。现有大多数神经法律案例检索模型直接编码案例的完整法律文本以生成案例表示,随后利用该表示进行最近邻搜索以完成检索。尽管这些直接方法在检索准确性上相较于传统统计方法有所提升,但本文识别出两个重要挑战:(1) 法律特征对齐:将完整案例文本作为输入通常会引入冗余和噪声信息,因为从法律视角看,相关案例的决定性因素在于关键法律特征的对齐,而非全文匹配;(2) 法律上下文保留:此外,由于现有文本编码模型通常具有比案例更短的输入长度限制,完整案例文本需要被截断或划分为段落,这导致法律信息的全局上下文丢失。针对这些挑战,本文提出了一种新颖的法律案例检索框架——PromptCase。首先,基于对法律视角下相关案例定义的深入研究,识别并形式化定义了法律事实和法律问题作为促进法律案例检索的关键特征。其次,利用这些决定性法律特征,设计了一种基于提示的编码方案,以通过语言模型实现有效编码。在法律案例检索的两个基准数据集上进行了广泛的零样本实验,结果表明所提出的PromptCase在检索有效性上具有显著优势。代码已发布在https://github.com/yanran-tang/PromptCase。