A new research system teaches AI legal assistants to check the calendar before citing a law.
Researchers built LegalSearch-R1, an AI agent that combines a local database of statutes with web search, trained using reinforcement learning on legal text tagged by date across multiple amendment periods. The goal: stop large language models from citing laws that were true when the model was trained but have since been repealed or amended, a failure mode the researchers call temporal bias. In tests across 13 legal tasks, the 7-billion-parameter system beat existing deep-research frameworks and specialized legal AI models by 12.9% to 29.8%, and beat baseline systems by 57.7% to 80.3% specifically on temporal consistency, meaning it applied the version of a law that was actually in force when a case occurred. The team also found that web search alone could not reliably produce the precise statute and precedent citations legal reasoning requires, which is why they paired it with a dedicated local retrieval system for the legal text itself.
Legal AI tools live or die on getting citations right, and an assistant that confidently cites a repealed statute is worse than one that admits uncertainty. This is a narrow, unglamorous fix, but it targets a real failure mode common to any LLM trained on a fixed cutoff: the world keeps changing after the training data stops.
The code and benchmark are open on GitHub, so expect other legal-tech vendors to borrow the trick rather than reinvent it.