When Rules Learn: A Self-Evolving Agent for Legal Case Retrieval

Mingxu Tao, Jiawei Hu, Xian Zhou, Wenpeng Hu, Jiajun Cheng +3 more
6/15/2026
cs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Legal case retrieval remains challenging due to the complexity of legal language and the need for precise lexical alignment between queries and relevant cases. Although dense retrieval models have achieved notable progress, empirical studies show that BM25 continues to serve as a strong baseline in this domain. It motivates us to propose a self-evolving framework for rule-driven query rewriting that enhances BM25 without any parameter training. The framework equips an LLM-based agent with an automatic evaluation environment, enabling it to iteratively create rewriting rules, plan validation experiments over rule combinations, and eliminate ineffective rules based on historical feedbacks. We evaluate our method on the Chinese legal case retrieval benchmark LeCaRD-v2. Experimental results demonstrate that the proposed framework outperforms non-evolutionary baselines, including human-designed rules and greedy rule selection, particularly when powered by a highcapacity core LLM. We also conduct detailed analyses to investigate the mechanisms underlying self-evolution. Our findings reveal that LLM's capabilities to leverage previous experimental results and its intrinsic knowledge of rule elimination play critical roles in refining the rule set via self-evolution.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{tao2026when,
  title  = {When Rules Learn: A Self-Evolving Agent for Legal Case Retrieval},
  author = {Mingxu Tao and Jiawei Hu and Xian Zhou and Wenpeng Hu and Jiajun Cheng and Yunbo Cao and Zhunchen Luo and Guotong Geng},
  year   = {2026},
  eprint = {2606.17220},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.17220v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.17220.svg)](https://codeofpaper.com/paper/2606.17220)

Discussion