A Framework to Retrieve Relevant Laws for Will Execution (2025)

Abstract: Wills must comply with jurisdiction-specific statutory provisions to be valid, but retrieving the relevant laws for execution, validation, and probate remains labor-intensive and error-prone. Prior legal information retrieval (LIR) research has addressed contracts, criminal law, and judicial decisions, but wills and probate law remain largely unexplored, with no prior work on retrieving statutes for will validity assessment. We propose a legal information retrieval framework that combines lexical and semantic retrieval in a hybrid pipeline with large language model (LLM) reasoning to retrieve the most relevant provisions for a will statement. Evaluations on annotated will-statement datasets from the U.S. states of Tennessee and Idaho using six LLMs show that our hybrid framework consistently outperforms zero-shot baselines. Notably, when paired with our hybrid retrieval pipeline, GPT-5-mini achieves the largest relative accuracy gains, improving by 41.09 points on the Tennessee and 48.68 points on the Idaho test set. We observed similarly strong improvements across all models and datasets.

## introduction a will is a legal document that articulates an individual's final intentions, including the distribution of assets, the administration of the estate, and appointment of guardians for dependents. for a will to be legally valid, its execution, validation, and probate must comply with the statutory provisions of the governing jurisdiction @xcite . validation generally requires confirming that the document satisfies formal legal criteria, such as being in writing, signed by the testator, and witnessed by competent individuals, and that real-world conditions, such as the testator's mental capacity or the code and dataset are available at https://github.com/ asiful109/will-law-retrieval eligibility of witnesses, align with statutory definitions @xcite . these requirements are codified in jurisdictionspecific statutes, and failure to comply with even a single provision may render a will partially or entirely invalid @xcite . therefore, the first step in assessing validity is to retrieve the statutory provisions relevant to the specific will statement. this task is challenging because the applicable provisions are dispersed across large and complex collections of statutes covering a wide range of legal issues. traditionally, this lookup process has been conducted manually by legal professionals, who must examine statutory codes to identify the relevant laws. such manual retrieval is timeconsuming, costly, and prone to error. the growing digitization of legal texts and the adoption of computational methods in law present an opportunity to automate this process. advances in artificial intelligence (ai) and natural language processing (nlp), particularly in information retrieval (ir), have demonstrated strong performance across diverse legal tasks @xcite . however, the domain of wills and probate law remains largely underexplored. to the best of our knowledge, no prior work has directly addressed the retrieval of statutory provisions specifically relevant to the validity of wills. motivated by this gap, we propose a legal information retrieval framework that automatically retrieves relevant statutory provisions to verify the validity of will statements. our approach integrates lexical and semantic retrieval in a hybrid pipeline, enhanced with large language model (llm) reasoning, and is evaluated on comprehensive statutory corpora and annotated datasets of real-world will statements. this work makes two key contributions: ## related work legal information retrieval (lir) has been widely applied across diverse legal tasks, including case law retrieval for identifying relevant precedents @xcite , statutory law retrieval for finding applicable statutes or regulations @xcite , contract clause analysis for extracting legal obligations such as confidentiality and termination @xcite , regulatory compliance by linking business activities to statutory requirements @xcite , and legal question answering @xcite . early lir systems relied on lexical retrieval techniques such as tf-idf @xcite ) and bm25 @xcite , as well as symbolic legal ontologies @xcite . although effective for exact keyword matching, these approaches struggled with lexical variation and synonymy (e.g., "minor heir" versus "underage beneficiary"), limiting their robustness in complex legal tasks @xcite @xcite . these challenges motivated a shift toward semantic and neural retrieval methods. the advent of transformer-based encoder models such as bert @xcite and legal-domain variants like legal-bert @xcite ) revolutionized legal retrieval by enabling context-aware embeddings. transformer based encoder models now consistently outperform traditional lexical baselines like bm25 and tf-idf across legal retrieval tasks @xcite . the arrival of large language models (llms) has elevated the legal domain to new heights due to their strong ability to understand and reason with complex legal language. one approach is domain-adapted legal llms such as saullm @xcite and deeplegal-cn @xcite , which improve legal reasoning through targeted pretraining and fine-tuning. another increasingly popular technique is retrieval augmented generation (rag), where relevant external knowledge, such as statutes, court cases, or legal precedents, is retrieved and incorporated into the input context before the llm generates a response. several domain-specific rag variants have been proposed to better serve the legal information retrieval tasks. for instance, cbr-rag @xcite incorporates case-based reasoning to retrieve precedent cases for legal question answering, while unilr @xcite introduces a unified retriever for multiple legal retrieval tasks using attention supervision and knowledge graphs. eval-rag @xcite adapts the rag framework to improve the evaluation of llm outputs by comparing them with retrieved legal references. hypa-rag @xcite introduces parameter-adaptive control to handle dynamically changing legal and policy environments. despite these advancements, legal will verification remains an underexplored area in legal nlp. prior work by @xcite introduced the first datasets and models for this task, framing will validation as a supervised natural language inference (nli) problem, analyzing cross-jurisdictional transferability @xcite , and exploring prompt-based extraction and structured information annotation from wills @xcite . these studies laid important groundwork for understanding the linguistic and legal complexities of wills, but they primarily operated over small, curated, human-annotated law sets and assumed access to the relevant laws at training and inference time. their models were designed to classify a triplet (will statement, condition, and relevant law) into support, refute, or unrelated categories. so, their model needs to know the relevant law ahead of time and does not handle retrieving relevant laws; instead, it simply classifies whether a given law supports, refutes, or is unrelated. in contrast, we formulate will validation as an open-domain retrieval task: given a will statement and its associated condition, the goal is to identify the most relevant provision from the full statutory corpus of a jurisdiction. this retrieval-centric formulation better reflects real-world scenarios, where the applicable law must first be retrieved before any reasoning can be applied. to the best of our will statement ## task description to determine the validity of a will, two aspects must be considered: (i) whether the statements within the will comply with the statutory laws of the jurisdiction, and (ii) whether the external conditions related to the individuals involved in the will (e.g., the testator, beneficiaries, executor, or witnesses) satisfy the legal requirements. formally, let w denote a will statement (a short excerpt from a will), c denote a condition (a realworld external scenario related to the validity of the will statement), and @xmath0, l 2 , . . . , l n } denote the set of statutory laws of a given jurisdiction that govern the validity of wills, where each l i corresponds to a statutory provision. given the input pair (w, c), the objective is to select the law l ⋆ ∈ l that is most relevant for assessing the validity of w under condition c. a law @xmath1, c) if it either supports or refutes the pair, while laws that do not address the subject matter of (w, c) are considered unrelated. ## proposed method we propose an information retrieval framework that retrieves the laws necessary to assess the validity of will statements. our framework combines hybrid retrieval (which integrates keyword-overlap based lexical search with embedding-similarity based semantic search), with llm based reasoning, and operates in three steps: (i) preprocessing the law dataset, (ii) retrieving top k candidate laws using a hybrid search strategy, and (iii) selecting the single most relevant law with a large language model (llm). an overview of the framework is shown in figure 1 , and a detailed description of each component is provided below. ## conclusion in this paper, we introduced a legal information retrieval framework for will validation, combining hybrid retrieval with large language model reasoning. to the best of our knowledge, our approach is the first to tackle statutory retrieval in the domain of wills and probate law. experiments on real-world datasets from two u.s. states demonstrate significant gains over traditional information retrieval baselines. by advancing automated statutory retrieval in this underexplored domain, our framework contributes to assisting legal professionals and others involved in executing, validating, or probating wills by delivering faster and more reliable access to the relevant laws.