Can LLMs Time Travel? Enhancing Temporal Consistency in Legal Agentic Search through Reinforcement Learning

Wei Fan, ZHOU Yining, Mufan Zhang, WENG Yanbing, Yiran HU, Tianshi Zheng, Baixuan Xu, Chunyang Li, Jianhui Yang, Haoran Li, Yangqiu Song


Abstract
While large language models (LLMs) augmented with agentic search capabilities show promise for legal reasoning, they overlook a fundamental constraint that applicable law must match the temporal context of each case, as retroactive application of statutes violates core legal principles and leads to erroneous conclusions. Our observations reveal that current legal LLMs suffer from temporal bias anchored to their training cutoff, while search agents rarely incorporate temporal constraints into queries, and that web search alone cannot provide the precise statute and precedent citations that legal reasoning demands. To address these challenges, we propose LegalSearch-R1, an end-to-end reinforcement learning framework that pairs local statute RAG for precise article matching with online web search for broader legal knowledge, trained on temporally-indexed data spanning multiple amendment periods to enforce temporal consistency. Extensive experiments on our benchmark covering 13 legal tasks demonstrate that our 7B-parameter agent outperforms state-of-the-art deep research frameworks and specialized legal LLMs by 12.9% to 29.8%, surpasses baselines by 57.7% to 80.3% on temporal consistency, and exhibits robust out-of-domain generalization. The code and data are available at https://anonymous.4open.science/r/LegalSearch-R1.
Anthology ID:
2026.nllp-1.2
Volume:
Proceedings of the Natural Legal Language Processing Workshop 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Nikolaos Aletras, Ilias Chalkidis, Leslie Barrett, Cătălina Goanță, Daniel Preoțiuc-Pietro, Gerasimos Spanakis, Shanshan Xu
Venues:
NLLP | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
12
Language:
URL:
https://aclanthology.org/2026.nllp-1.2/
DOI:
Bibkey:
Cite (ACL):
Wei Fan, ZHOU Yining, Mufan Zhang, WENG Yanbing, Yiran HU, Tianshi Zheng, Baixuan Xu, Chunyang Li, Jianhui Yang, Haoran Li, and Yangqiu Song. 2026. Can LLMs Time Travel? Enhancing Temporal Consistency in Legal Agentic Search through Reinforcement Learning. In Proceedings of the Natural Legal Language Processing Workshop 2026, pages 12–12, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Can LLMs Time Travel? Enhancing Temporal Consistency in Legal Agentic Search through Reinforcement Learning (Fan et al., NLLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.nllp-1.2.pdf