Search across all content
An AI tool that used large language models to search San Francisco's municipal code for reporting requirements for outdated rules.
Cities pile up rules over time. New ones are added, and old ones are rarely removed, so they remain in force long after the programmes they were written for have changed or ended.
One common type of rule is a reporting requirement: a law that obliges a government department to produce a written report on a set schedule, for example, once a year or every few months. Some reports are useful, helping track public money or inform decisions. Others carry on long after anyone needs them.
San Francisco's local laws, known together as its municipal code, together with the decisions passed by the city's elected council, the Board of Supervisors, run to nearly 16 million words. The number of reporting requirements buried within them had grown steadily, doubling between 2000 and 2025.
A few examples show why this matters. One rule still required the Public Works Department to report every two years on fixed newspaper racks that the city has since taken away. Another, more than 80 years old, demanded quarterly reports from a body called the Redevelopment Agency, which was dissolved in 2012 and whose work is now covered by newer laws.
This is not only a San Francisco problem. In the United States, the sheer number of reports that government is required to produce has been called a "black hole" that eats up staff time while only a fraction is ever read by lawmakers or the public. Going through 16 million words by hand to find every outdated rule would take more time than any city legal team could spare, which is why the City Attorney's Office, the city government's own legal team, called such reform daunting.
The work started small. One city department asked the City Attorney's Office for help finding which of its own reporting rules were outdated or duplicated. The office was already working with a research team at Stanford University, the Regulation, Evaluation and Governance Lab (RegLab), and it expanded the request to include a review of every reporting requirement across the entire city government.
RegLab had built an AI tool called STARA, short for Statutory Analysis Research Assistant. STARA uses large language models, the kind of AI behind chatbots such as ChatGPT, to read through a large body of law and pick out every passage that fits a description it is given.
The team first wrote a clear definition of what counts as a mandated report. They then fed in the full code, the city's 16,000 council decisions, and the tool broke the text into small pieces and tested each one against that definition. STARA used only public legal texts. It had no link to the city's own computer systems, and it drew on no private data.
STARA found 528 reporting requirements in total, most of them assigned to a handful of departments, including the city's finance, planning, and housing offices. Of the 528, the city could change 488 by passing a law. The rest were protected: they were written into the City Charter, the city's founding rulebook that only voters can change, were tied to past public votes, or were already being updated.
The tool found the rules, but people decided what to do about them. Lawyers in the City Attorney's Office checked every result by hand, and the office then worked with each department to decide which reports were still worth keeping and which could be discarded or slimmed down. In RegLab's own benchmark tests, STARA outperformed both human researchers and general-purpose AI tools in this kind of legal search.
1. A new law has been proposed and is still working its way through
Using STARA's list, the City Attorney, David Chiu, put forward a 351-page proposal in June 2025 to change 174 of the 488 rules the city can amend, about a third of them. 140 would be scrapped for being obsolete, repeating another rule, or having been replaced. Another 34 would be made lighter by requiring them less often, combining them, or matching them to work departments already do. The other 314, around two-thirds, would stay because they still do a useful job, such as tracking spending or overseeing money the city has borrowed for public projects. As of mid-2026, the proposal was still awaiting a hearing by the city council.
2. The same tool helped with a second clean-up
STARA was also put to a related task. In November 2024, San Francisco residents voted for Proposition E, a ballot measure that established a group to streamline the city's many boards and committees. To help that group, STARA listed every board and committee named in the city's laws. It found 111 already on record and 33 more in 20 minutes. The same search by hand was estimated at $3,000, while running the tool cost 86 cents. As RegLab's Professor Daniel Ho put it, the approach lets staff focus on what matters most.
The AI identified the rules; individuals assessed their relevance. STARA could locate every reporting requirement across 16 million words, but it could not say which ones still mattered. Lawyers checked its work, and the departments that owned each rule made the call on what to keep, change, or drop. The lesson for other governments is to let the tool do the searching while officials keep the judgment. The scan itself took minutes. Everything after it, checking each result, talking to departments, and writing the proposal, took about as long as it would have without any AI. As Andrea Bruss of the City Attorney's Office said, the tool did not eliminate the need to weigh the legal issues on a case-by-case basis. AI speeds up the research, not the decisions that follow.
A tool built for the job beats a general one. Laws are full of cross-references and terms defined in far-off sections, which ordinary AI tools can miss. STARA was designed for this purpose, and in testing it outperformed off-the-shelf tools and human researchers alike. How the tool is built matters as much as the AI inside it.
Being open about the tool's limits built trust. Some people were wary of using AI on the law. The office used it only to find rules, not to decide them; kept it to public texts; had lawyers check everything; and said so openly. Setting clear limits and keeping people in charge is part of making this kind of tool acceptable in government.
This case study was written with assistance from artificial intelligence.





Connect with 500,000+ public servants solving your hardest challenges.





Connect with 500,000+ public servants solving your hardest challenges.
Help public servants worldwide learn from your work, what worked, what flopped and what you'd do differently
Share your project
Log in or sign up to continue the conversation