When Rules Learn: A Self-Evolving Agent for Legal Case Retrieval
- lab CatalyzeX
- lab DagsHub
- lab GotitPub
- lab Hugging Face
- lab ScienceCast
- lab alphaXiv
- lab arXivLabs
A new framework lets a large language model agent write and refine its own query-rewriting rules to improve BM25 legal case retrieval, without any parameter training, according to a paper submitted in 2026 [1]. Legal case retrieval is difficult because legal language is complex and demands precise lexical alignment between a query and relevant cases [1]. Dense retrieval models have made gains, but BM25 remains a strong baseline in the domain [1]. The proposed system equips an LLM-based agent with an automatic evaluation environment so it can iteratively create rewriting rules, plan validation experiments over rule combinations, and discard ineffective rules using historical feedback [1]. The method was tested on the Chinese legal case retrieval benchmark LeCaRD-v2 [1]. Results showed the self-evolving framework outperformed non-evolutionary baselines, including human-designed rules and greedy rule selection, especially when powered by a high-capacity core LLM [1]. The authors found that the LLM’s ability to leverage previous experimental results and its intrinsic knowledge of rule elimination were critical to refining the rule set through self-evolution [1]. Large language models are a class of generative AI system built on the transformer architecture, which has driven an AI boom since the 2020s [2][3]. Generative AI models learn patterns from training data and produce new text, images, or code in response to natural-language prompts [3]. The legal-retrieval framework taps this capability but constrains it with a rule-driven loop, avoiding the need for fine-tuning or retraining the underlying BM25 index [1]. Automated evaluation environments like the one used in the study are part of a broader trend in AI research toward systems that can self-improve through trial and error [2]. The approach echoes techniques seen in other domains, such as transfer learning across scientific datasets, where models trained on one corpus are adapted to boost performance on a smaller, related dataset [7]. In the legal context, the agent’s self-evolution replaces manual rule engineering with a feedback-driven process that the authors argue is more scalable [1]. The work was posted on arXiv, a preprint server that hosts papers across computer science and other fields, and was submitted in 2026 [1]. The paper includes detailed analyses of the mechanisms behind the self-evolution, showing that the LLM’s capacity to interpret past experimental outcomes is what drives the progressive refinement of rewriting rules [1].
applicationtool-releaseresearch-papersafety-researchbenchmark
Background sources we checked (9)
- en.wikipedia.org ↗ Artificial intelligence (AI) is the capability of computational systems to perform tasks typically associated with human intelligence, such as learning, reasoning, problem-solving, perception, and decision-making. It is a field of research in engineering, mathematics and computer…
- en.wikipedia.org ↗ Generative artificial intelligence (GenAI) is a subfield of artificial intelligence (AI) that uses generative models to generate text, images, videos, audio, software code (vibe coding) or other forms of data. These models learn the underlying patterns and structures of their tra…
- en.wikipedia.org ↗ A self-driving car, also known as an autonomous car, driverless car, robotic car, or robo-car, is a car that is capable of operating with reduced or no human input. They are sometimes called robotaxis, though this term refers specifically to self-driving cars operated for a rides…
- en.wikipedia.org ↗ User-generated content (UGC), alternatively known as user-created content (UCC), is content generated by users of the Internet such as images, videos, audio, text, testimonials, software, and user interactions. Online content aggregation platforms such as social media, discussion…
- arxiv.org ↗ CatalyzeX Code Finder for Papers (What is CatalyzeX?) ... DagsHub Toggle ... DagsHub (What is DagsHub?)…
- arxiv.org ↗ With the creation of new datasets, the question arises of whether the data in them is complementary to other datasets for training ML models (see recent reviews for a perspective of catalysts informatics22, 23, 24). This is especially important when consolidating data with a vari…
- arxiv.org ↗ CatalyzeX Code Finder for Papers (What is CatalyzeX?) ... DagsHub Toggle ... DagsHub (What is DagsHub?)…
- en.wikipedia.org ↗ Sustainable Development Goals (abbr. SDGs) were adopted in 2015 by all United Nations (UN) members for the 2030 Agenda for Sustainable Development. The aim of the 17 global goals is "peace and prosperity for people and the planet", tackling climate change, and working to preserv…
- en.wikipedia.org ↗ In molecular biology, a transcription factor (TF) (or sequence-specific DNA-binding factor) is a protein that controls the rate of transcription of genetic information from DNA to messenger RNA, by binding to DNA sequences. Specificity can be due to sequence motifs, or epigenetic…
Sources
- export.arxiv.org — When Rules Learn: A Self-Evolving Agent for Legal Case Retrieval ↗