G u RE :Generative Query RE writer for Legal Passage Retrieval (2025)

Abstract: Legal Passage Retrieval (LPR) systems are crucial as they help practitioners save time when drafting legal arguments. However, it remains an underexplored avenue. One primary reason is the significant vocabulary mismatch between the query and the target passage. To address this, we propose a simple yet effective method, the \textbf{G} enerative q \textbf{u} ery \textbf{RE} writer \textbf{(GuRE)} . We leverage the generative capabilities of Large Language Models (LLMs) by training the LLM for query rewriting. \textit{"Rewritten queries"} help retrievers to retrieve target passages by mitigating vocabulary mismatch. Experimental results show that GuRE significantly improves performance in a retriever-agnostic manner, outperforming all baseline methods. Further analysis reveals that different training objectives lead to distinct retrieval behaviors, making GuRE more suitable than direct retriever fine-tuning for real-world applications. Codes are avaiable at github.com/daehuikim/GuRE.

## introduction recent advancements in information retrieval have enhanced legal tasks @xcite @xcite . most studies have focused on retrieving legal cases @xcite @xcite @xcite to address the challenge of retrieving relevant cases from the vast amount of documents. while automatic case retrieval systems are advancing, practitioners still spend significant time searching for relevant cases during argument drafting @xcite . one reason for this is that cases frequently address multiple legal issues, so retrieved cases may be relevant overall but not necessarily contain passages that align with the specific argument being drafted. as a result, practitioners often need to manually sift through lengthy documents to locate the specific passages for their argument. therefore, legal passage retrieval (lpr) is crucial for extracting fine-grained retriever ongoing context (query) retriever gure … nondiscriminatory reasons for terminating them are false or otherwise pretextual; they may also prove that … (a) (b) … in order to show pretext, the plaintiff must "demonstrate that the proffered reason was not the true reason for the… the plaintiff must still demonstrate a prima facie case of discrimination … the plaintiff must still demonstrate a prima facie case of discrimination; the defendant then must articulate a legitimate … re-write query! rewritten query irrelevant passage relevant passage … nondiscriminatory reasons for terminating them are false or otherwise pretextual; they may also prove that … ongoing context (query) vocabulary mismatch (x) vocabulary match (o) information at the passage level, which helps reduce the time spent on legal research and lowers the costs associated with argument drafting. despite its importance, however, lpr remains underexplored, showing suboptimal performances even with fine-tuned retrievers @xcite . one of the primary reasons for this is the significant vocabulary mismatch between the ongoing context (query) and the target passage @xcite @xcite . in legal texts, queries frequently use terms that differ from those in the target passage, hindering retrievers from matching relevant passages @xcite . figure 1 provides an example of the impact of vocabulary mismatch. to address this challenge, we tried to modify the query to mitigate the vocabulary mismatch via the existing query expansion methods @xcite . however, a substantial gap between the query and the target passage remained. to bridge this gap, we propose a simple yet effective method, the generative query rewriter (gure). we aim to enable large language models (llms) to leverage legal domain-specific knowledge better to rewrite queries with a mitigated vocabulary gap. specifically, we train llms to generate legal passages based on a query, which then serves as the "rewritten query" for retrievers. at retrieval time, we employ a "rewritten query" with lower vocabulary mismatch as the query for the retriever, as shown in (b) of figure 1 . experimental results demonstrate that retrieving using "rewritten queries" from gure leads to a significant performance improvement in a retrieveragnostic manner, even surpassing direct retriever fine-tuning. our analysis reveals that adapting gure for lpr can be more suitable for real-world applications than direct retriever fine-tuning regarding their different training objectives. our contributions include a simple yet effective domain-specific query rewriting method to address the vocabulary mismatch problem in lpr. we also analyze why retriever fine-tuning leads to suboptimal performance in lpr, linking it to its training objective. ## method: gure we introduce gure, a simple yet effective method for mitigating the underlying vocabulary mismatch in lpr. unlike existing query expansion methods, which add additional information to the query, gure is designed to rewrite the query directly. we train the llm on a dataset of instructionp rompt q,pq , where q is {context} and p q is {passage} (figure 2 ). given a sequence of tokens (t 1 , ..., t n ) from an instructionp rompt q,pq , the llm learns to predict each token t i in auto-regressive manner by optimizing the cross-entropy loss: where p (t i |@xmath0; θ) is the probability assigned by the model to the token t i given previous tokens. θ is the parameters of the llm. once trained, gure rewrite the queries using the instructionp rompt q excluding the {passage} from figure 2 . ## results in contrast, other baseline methods yield suboptimal performance gains, falling short of the improvements by gure. q2d achieves the lowest performance gain, suggesting that the few-shot prompting strategy struggles to address the underlying challenges in tasks requiring domainspecific knowledge. furthermore, retriever finetuning does not provide retrievers with the same level of performance as gure. this indicates that mitigating vocabulary mismatch is significantly more effective than training the retrievers. ## conclusion we propose gure, a retriever-agnostic query rewriter that mitigates vocabulary mismatch through domain-specific query rewriting. experimental results show that gure outperforms all baseline methods, including fine-tuned retrievers. our analysis highlights why retriever fine-tuning relying on in-batch negatives leads to suboptimal performance in lpr, linking to its loss function.