Caruaru City Hall Uses AI to Draft Decrees
In Caruaru (PE), the city government adopted a free chatbot to automate the drafting of municipal decrees. The financial result was immediate: a reduction of R$ 1 million per year in overtime pay for the legal team, according to public city data. Previously, each document underwent three human reviews, consuming days of work; now, the AI generates the first version in minutes.
This movement is not isolated. In three municipal chambers across the country, the Sabiá-4 model, developed by Maritaca AI, is already used to review bills before voting (Source: Maritaca AI). The tool? Generative artificial intelligence, specifically trained on legal jargon and the rules of the legislative process.
But speed comes at a price. The same technology that accelerates public service carries risks of algorithmic bias and lack of transparency. What happens when an AI decides which paragraph enters or leaves a law that affects millions of people?
The Law-Writing Machine
Estonia is the most mature example outside Brazil. Since 2024, the country has used AI to draft bills, achieving 90% accuracy in normative texts (Source: e-Estonia). The Brazilian model follows the same logic, but with an extra challenge: the complexity of municipal law.
Each city has its own internal rules. Each department requires a different decree format. The AI needs to be calibrated so as not to ignore these nuances.
Sabiá-4, for example, was fine-tuned with thousands of real bills from partner chambers. The model learned writing patterns, identified common errors, and began suggesting corrections in real-time. The result is a high accuracy rate in review tasks, but the tool still makes mistakes on more complex clauses, such as those involving interpretation of case law.
R$ 1 Million Saved, But at What Cost?
The Caruaru case is emblematic. The savings of R$ 1 million per year in overtime is impressive. But the civil servants themselves recognize the risk: the model can reproduce biases from the data it was trained on. If the historical base of municipal decrees contains exclusionary language or favors certain groups, the AI will learn and repeat that pattern.
A study by the Federal Senate, published in 2025, already pointed out that 70% of municipal bill drafts had writing errors that could be avoided with AI (Source: Federal Senate, study "Diagnóstico da Redação Legislativa Municipal", 2025, available at: https://www12.senado.leg.br/estudo-redacao-legislativa-municipal-2025). This data shows the size of the problem the technology can solve. But it also reveals that, without human oversight, the AI can automate errors instead of correcting them.
Transparency and the Risk of the Invisible Algorithm
The main criticism of using AI in law drafting is the lack of transparency. Who controls the model? What data was used in training? How to ensure the AI is not favoring private interests?
Unlike a civil servant, who can be questioned in a public hearing, the algorithm is a black box. The citizen does not know why the AI chose one word over another. There are no meeting minutes to consult.
Some municipal chambers try to circumvent the problem with external audits. Sabiá-4, for instance, allows the suggestion history to be exported and analyzed. But the practice is not yet mandatory by law.
Meanwhile, companies like Google and OpenAI offer generic generative AI solutions for governments. The problem is that these models were not trained on Brazilian legislation. The result can be technically correct, but legally inconsistent.
Comparative Table: Before and After AI in Legislative Drafting
| Aspect | Before (without AI) | After (with AI) |
|---|---|---|
| Average draft writing time | 30 days | 2 hours |
| Cost of legal overtime (Caruaru) | R$ 1.2 million/year | R$ 200 thousand/year |
| Rate of detected writing errors | Up to 70% of drafts (Senate, 2025) | Significant reduction, but dependent on review |
| Process transparency | Minutes and public meetings | Closed algorithm (in many cases) |
| Risk of bias | Low (human can be questioned) | High (training data bias) |
Conclusion
The Brazilian experiment with AI in drafting municipal laws already shows concrete results: millions in savings, drastic time reduction, and improved technical quality of texts. Caruaru and the chambers that adopted Sabiá-4 are proof that the technology works.
But the balance is not solely positive. The lack of transparency in algorithms and the risk of automated bias are structural flaws that need to be corrected before the practice becomes a national standard. A poorly drafted law can be challenged in court. A bias embedded in the code can perpetuate inequalities for decades.
The ideal path is not to abandon AI, but to regulate it. Require model audits, guarantee public access to drafting criteria, and maintain human oversight as a mandatory step. Only then will the promise of a more efficient government not turn into a nightmare of opacity.
Related Articles
Related Articles
AI drafting laws: how governments use ML to create policies
Governments already use artificial intelligence to draft, analyze, and simulate public policies. Practical tutorial with open tools to simulate impact d...
Estonia: The Country That Became a Government AI Laboratory
With 99% of public services online and AI in 45% of them, Estonia has become a global benchmark in digital government. Understand how the country integrates intelligent...
AI in Scientific Content Curation
Analysis of how AI is revolutionizing the curation of scientific articles, with tools that filter papers by relevance and quality, as well as risks of...