arXiv:2504.10508cs.IRcs.AI2025-04被引 1

为法律条文设计多向量检索,让名称和内容都能被精准找到。

Poly-Vector Retrieval: Reference and Content Embeddings for Legal Documents

  • 一条条文生成内容、名称、别称等多个向量,分别对应不同查询需求。
  • 在巴西宪法数据集上,按条文名查询的准确率显著提升。
  • 适合需要精确引用法律条文的研究者或司法系统使用者。

检索增强生成(RAG)通过结合大语言模型与检索机制,有效生成上下文准确的答案。但在法律场景中,用户常通过条文标签或昵称(如《宪法》第5条或消费者保护法(CDC))进行引用,而非内容本身,传统RAG仅依赖文本语义嵌入难以应对。此外,法律文本中大量存在显式交叉引用(如“依据第34条”),构成指代关系,传统方法常无法正确召回被引用内容。本文提出多向量检索(Poly-Vector Retrieval),为每条法律条文分配多个独立嵌入:一个捕获全文内容,一个捕获条文标识符(标签或正式名称),并可选添加其他别称嵌入。受弗雷格关于意义与指称区分的启发,该方法将标签、标识符视为刚性指称,内容嵌入则承载语义实质。在巴西联邦宪法数据集上的实验表明,多向量检索显著提升以条文名为中心的查询准确率,并具备解析内部与外部交叉引用的潜力,同时不损害纯语义查询性能。研究讨论了在向量嵌入中显式分离指称与内容的哲学与实践意义,并提出未来将该方法扩展至更广泛的法律数据集及其他含显式引用标识的领域。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation (RAG) has emerged as an effective paradigm for generating contextually accurate answers by integrating Large Language Models (LLMs) with retrieval mechanisms. However, in legal contexts, users frequently reference norms by their labels or nicknames (e.g., Article 5 of the Constitution or Consumer Defense Code (CDC)), rather than by their content, posing challenges for traditional RAG approaches that rely solely on semantic embeddings of text. Furthermore, legal texts themselves heavily rely on explicit cross-references (e.g., "pursuant to Article 34") that function as pointers. Both scenarios pose challenges for traditional RAG approaches that rely solely on semantic embeddings of text, often failing to retrieve the necessary referenced content. This paper introduces Poly-Vector Retrieval, a method assigning multiple distinct embeddings to each legal provision: one embedding captures the content (the full text), another captures the label (the identifier or proper name), and optionally additional embeddings capture alternative denominations. Inspired by Frege's distinction between Sense and Reference, this poly-vector retrieval approach treats labels, identifiers and reference markers as rigid designators and content embeddings as carriers of semantic substance. Experiments on the Brazilian Federal Constitution demonstrate that Poly-Vector Retrieval significantly improves retrieval accuracy for label-centric queries and potential to resolve internal and external cross-references, without compromising performance on purely semantic queries. The study discusses philosophical and practical implications of explicitly separating reference from content in vector embeddings and proposes future research directions for applying this approach to broader legal datasets and other domains characterized by explicit reference identifiers.

法律AI多向量检索增强

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。