An Agentic Approach to Retrieving and Drafting Legislative Definitions
摘要
The complexity, dynamicity over time, and multilingual nature of legislative documents pose significant challenges for the accurate retrieval and reuse of legislative definitions, an essential task in legal drafting. This research introduces an AI-driven system leveraging Large Language Models (LLMs) to assist in the retrieval and generation of legal definitions from a multilingual, multi-jurisdictional dataset of XML-encoded legislative documents. The system functions as a conversational AI agent, enabling natural language queries tailored to different end-user types, such as lawyers, legislators and judges. It employs a hybrid retrieval approach, integrating dense semantic search with sparse keyword-based methods, and incorporates legislation-aware and point-in-time filtering to ensure jurisdictional and temporal accuracy. If no suitable definition is found, the system leverages Retrieval-Augmented Generation (RAG) to generate a novel one that is grounded in and consistent with in-force legislative documents. The system is evaluated using automatic quantitative metrics and qualitative assessments from legal experts, demonstrating strong retrieval capabilities but highlighting limitations in generating legally sound definitions.