---
title: "When Rules Learn: A Self-Evolving Agent for Legal Case Retrieval"
description: "Lexical retrieval with BM25 remains surprisingly strong for Chinese legal case retrieval. 1 reference."
authors: ["Mingxu Tao", "Jiawei Hu", "Xian Zhou", "Wenpeng Hu", "Jiajun Cheng", "Yunbo Cao", "Zhunchen Luo", "Guotong Geng"]
year: 2026
venue: "Findings of the Association for Computational Linguistics: ACL 2026"
source: "https://aclanthology.org/2026.findings-acl.2152/"
doi: "10.18653/v1/2026.findings-acl.2152"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/tao-2026-when-rules-learn-self-evolving/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/tao-2026-when-rules-learn-self-evolving/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2026](https://md.research.elamur.ai/free/en/papers/2026/page/48/) / When Rules Learn: A Self-Evolving Agent for Legal Case Retrieval

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

**Authors:** [Mingxu Tao](https://md.research.elamur.ai/free/en/authors/mingxu-tao/), Jiawei Hu, Xian Zhou, [Wenpeng Hu](https://md.research.elamur.ai/free/en/authors/wenpeng-hu/), Jiajun Cheng, [Yunbo Cao](https://md.research.elamur.ai/free/en/authors/yunbo-cao/), [Zhunchen Luo](https://md.research.elamur.ai/free/en/authors/zhunchen-luo/) and [Guotong Geng](https://md.research.elamur.ai/free/en/authors/guotong-geng/) · **Year:** 2026 · **Venue:** [Findings of the Association for Computational Linguistics: ACL 2026](https://md.research.elamur.ai/free/en/venues/findings/) ([Findings of the Association for Computational Linguistics 2026](https://md.research.elamur.ai/free/en/venues/findings/2026/)) · **Publisher:** [Association for Computational Linguistics](https://md.research.elamur.ai/free/en/publishers/association-for-computational-linguistics/) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2026.findings-acl.2152/) · [PDF](https://aclanthology.org/2026.findings-acl.2152.pdf) · [DOI 10.18653/v1/2026.findings-acl.2152](https://doi.org/10.18653/v1/2026.findings-acl.2152) · [OpenAlex](https://openalex.org/W7166880688)

**Citations:** 0 citations (OpenAlex, 2026-10-14)

## Summary
Lexical retrieval with BM25 remains surprisingly strong for Chinese legal case retrieval. On LeCaRD-v2, it beats both general and legal-domain dense embedders. The authors therefore improve BM25 instead of replacing it. Their approach rewrites queries with an LLM that follows explicit, human-readable rewriting rules.

Writing such rules by hand requires legal expertise, so the paper lets an LLM agent evolve the rule set itself. The agent works in a closed loop with an automatic evaluation environment and has three possible moves:
- create or edit a rule,
- test a chosen combination of active rules by having an external model rewrite development queries and scoring recall,
- discard rules that underperform.

All decisions are prompt-driven, and no model weights are updated.

With a strong core model (gpt-oss-120b), the evolved rules outperform hand-crafted rules and greedy rule selection. Analyses show that success depends on two abilities: reusing earlier experimental results when planning new tests, and judging when to prune rules. The work points to a training-free, interpretable route for adapting retrieval in data-scarce legal settings.

## Key points
- **Baseline comparison:** On LeCaRD-v2, BM25 reaches an average recall of 58.69. This is higher than bge-m3 (50.04), SAILER_zh (46.21) and ReaKase-8B (57.07). At Recall@50, the legal-domain models trail BM25 by roughly 7.6–19.1%.
- **Agent design:** The action space is rule creation, experiment planning and rule elimination. Newly generated rules must not resemble rules that were previously removed.
- **Consistency of gpt-oss-120b:** Across five runs, gpt-oss-120b was the only core LLM that beat the greedy strategy at every recall cutoff.
- **Rule set size:** Qwen3-4B-Thinking ended with about 37.8±3.9 active rules, despite being instructed to keep roughly 6. gpt-oss-120b kept about 5.8±1.0 but sometimes pruned useful rules too early.
- **Non-reasoning models:** Models such as Qwen3-30B-A3B-Instruct produced unusable rules, and Magistral-Small-2509 also generated garbled rules. The study therefore relies on four reasoning LLMs.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

## Institutions

- [PLA Academy of Military Science](https://md.research.elamur.ai/free/en/labs/pla-academy-of-military-science/) — Research institute, Beijing, China · 3 works · 510 citations

📚 Shelves (7): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works · [🤝 Social Sciences](https://md.research.elamur.ai/free/en/shelves/social-sciences/) · 1,772 works · [🗄️ Information Systems](https://md.research.elamur.ai/free/en/shelves/computer-science/information-systems/) · 1,437 works · [🤝 Political Science and International Relations](https://md.research.elamur.ai/free/en/shelves/social-sciences/political-science-and-international-relations/) · 182 works

🧭 Topics (2): [🔍 Information retrieval & search](https://md.research.elamur.ai/free/en/topics/information-retrieval/) · 473 works · [⚖️ Legal AI](https://md.research.elamur.ai/free/en/topics/legal-ai/) · 134 works

## Cite

Cite as: Mingxu Tao, Jiawei Hu, Xian Zhou, Wenpeng Hu, Jiajun Cheng, Yunbo Cao, Zhunchen Luo and Guotong Geng. 2026. When Rules Learn: A Self-Evolving Agent for Legal Case Retrieval. Findings of the Association for Computational Linguistics: ACL 2026.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{tao2026when,
  title = {{When Rules Learn: A Self-Evolving Agent for Legal Case Retrieval}},
  author = {Mingxu Tao, Jiawei Hu, Xian Zhou, Wenpeng Hu, Jiajun Cheng, Yunbo Cao, Zhunchen Luo and Guotong Geng},
  booktitle = {Findings of the Association for Computational Linguistics: ACL 2026},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.2152},
  url = {https://doi.org/10.18653/v1/2026.findings-acl.2152}
}
```

- [← previous When Relations Break: Analyzing Relation Hallucination in Vision-Language Model Under Rotation and Noise](https://md.research.elamur.ai/free/en/papers/shin-2026-when-relations-break-analyzing-relation/)
- [next → When Safety Alignment Fails to Generalize: Probing with Language Game Jailbreaks](https://md.research.elamur.ai/free/en/papers/long-2026-when-safety-alignment-fails-generalize/)
- [↑ back to papers of 2026](https://md.research.elamur.ai/free/en/papers/2026/page/48/)

## References

1 references, 1 of them with a card of ours. ↗ leads to the work.

1. Jianlyu Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024. [M3-embedding: Multi-linguality, multi-functionality, multi-granularity text embeddings through self-knowledge distillation](https://md.research.elamur.ai/free/en/papers/chen-2024-m3-embedding-multi-linguality/). In Findings of the Association for Computational Linguistics: ACL 2024, pages 2318–2335, Bangkok, Thailand. Association for Computational Linguistics. *Figure 6: An example of the meaningless rule generated by Qwen3-30B-A3B-Instruct.*

*Updated 31 October 2026*
