Legal question-answering systems play a crucial role in enhancing access to justice by providing both citizens and legal professionals with accurate interpretations of the law. However, existing AI-based legal models struggle with processing layperson inputs, mapping them to formal legal language, and ensuring robustness across different languages and jurisdictions. This study explores the use of retrieval-augmented generation (RAG) systems to address Polish legal queries, with a focus on improving information retrieval components. We evaluate several pre-trained retrieval models across four legal datasets to identify the most effective architectures. Subsequently, we fine-tune the best-performing models to determine which dataset types yield the greatest improvements when addressing lay-language questions. Our results demonstrate that fine-tuning on provision-based datasets significantly enhances retrieval accuracy and contextual relevance. Conversely, datasets with high lexical overlap between questions and provisions offer limited benefit when models are applied to layperson inputs—challenging the common practice of using large language models to generate training questions. In response, we propose a novel dataset construction method based on legal judgments, which performs nearly as well as manually annotated datasets containing layperson queries.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

From Statement of Facts to Statutory Provisions - Efficient Retrieval of Relevant Legislation

  • Aleksander Smywiński-Pohl,
  • Magdalena Król,
  • Piotr Mirosław

摘要

Legal question-answering systems play a crucial role in enhancing access to justice by providing both citizens and legal professionals with accurate interpretations of the law. However, existing AI-based legal models struggle with processing layperson inputs, mapping them to formal legal language, and ensuring robustness across different languages and jurisdictions. This study explores the use of retrieval-augmented generation (RAG) systems to address Polish legal queries, with a focus on improving information retrieval components. We evaluate several pre-trained retrieval models across four legal datasets to identify the most effective architectures. Subsequently, we fine-tune the best-performing models to determine which dataset types yield the greatest improvements when addressing lay-language questions. Our results demonstrate that fine-tuning on provision-based datasets significantly enhances retrieval accuracy and contextual relevance. Conversely, datasets with high lexical overlap between questions and provisions offer limited benefit when models are applied to layperson inputs—challenging the common practice of using large language models to generate training questions. In response, we propose a novel dataset construction method based on legal judgments, which performs nearly as well as manually annotated datasets containing layperson queries.