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

Computer Science > Artificial Intelligence


arXiv:2606.17220 (cs) | Submitted on 15 Jun 2026


Title

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


Authors

Mingxu Tao, Jiawei Hu, Xian Zhou, Wenpeng Hu, Jiajun Cheng, Yunbo Cao, Zhunchen Luo, Guotong Geng


Abstract

Legal case retrieval remains a formidable challenge due to the inherent complexity of legal language and the critical need for precise lexical alignment between queries and relevant cases. While dense retrieval models have achieved notable progress, empirical evidence consistently shows that BM25 remains a strong baseline in this domain—a finding that inspired our work. We propose a self-evolving framework for rule-driven query rewriting that enhances BM25’s performance without requiring any parameter training. The framework equips a large language model (LLM)–based agent with an automatic evaluation environment, enabling it to iteratively create rewriting rules, design validation experiments over rule combinations, and eliminate ineffective rules based on historical feedback. 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 high-capacity core LLM. Detailed analyses further investigate the mechanisms underlying self-evolution, revealing that the LLM’s ability to leverage prior experimental results and its intrinsic knowledge of rule elimination are critical to refining the rule set through self-evolution.


Metadata

  • Comments: To appear in ACL 2026
  • Subjects: Artificial Intelligence (cs.AI)
  • Cite as: arXiv:2606.17220 [cs.AI] (or arXiv:2606.17220v1 [cs.AI] for this version)
  • DOI: https://doi.org/10.48550/arXiv.2606.17220

Summary

This paper introduces a novel self-evolving agent for legal case retrieval that leverages LLM-based rule generation and iterative refinement to enhance BM25 without parameter training. The approach surpasses both human-designed and greedy rule selection methods on the LeCaRD-v2 benchmark, highlighting the importance of leveraging prior experimental outcomes and knowledge-based rule elimination for effective self-evolution.

via ArXiv AI

Related