Illustration of a government building with circuits and data flowing around, symbolizing the use of AI in public administration
news

AI drafting laws: how governments use ML to create policies

NeuralPulse|15 de junho de 2026|6 min read|Ler em Português

Thirty percent of new law texts in Estonia are already drafted with the aid of artificial intelligence. This figure, from the e-Estonia 2026 report, is not a laboratory curiosity. It is the new reality for governments that have discovered in AI an ally to accelerate legislative bureaucracy.

In the United Kingdom, the PolicyGPT tool cut regulatory impact analysis time from three weeks to two days (UK Government Digital Service, 2026). These examples show that the machine is not just in chatbots or autonomous cars. It is drafting paragraphs of bills and simulating consequences before a proposal even reaches the floor.

This article is not just a news summary. It is a practical tutorial for you to understand how these tools work and how to use open models to simulate the impact of public policies — without relying on closed systems from foreign governments.

What is changing in policy drafting

The idea of "policy as code" gained traction in 2026. Instead of an advisor spending days writing a legal text from scratch, the system receives inputs such as the law's objective, target audience, and budget constraints. The language model generates a first draft.

In Estonia, the process is integrated into the X-Road system, the country's digital backbone. The model is trained on the entire national legal framework. This ensures the AI does not invent articles conflicting with existing laws. The result: 30% of new law texts already come directly from the machine (e-Estonia 2026 report).

The UK went further. PolicyGPT does not write the law, but analyzes its impact. It scans thousands of pages of documents, identifies risks, and suggests changes. Analysis time dropped from 21 days to 48 hours (UK Government Digital Service, 2026).

The machine does not replace the legislator. It does the heavy lifting of compatibility and impact. The human decides the political direction.

DeepMind, in turn, developed simulation models to predict the effects of policies in areas like health and education. They run scenarios with millions of synthetic agents — a virtual population that reacts to proposed changes. The result guides decisions before actual public money is spent.

Tutorial: How to simulate policy impact with open tools

You don't need to be a billionaire government to do this. With open-source models and public data, it's possible to set up a basic impact simulation. Here is a realistic step-by-step guide.

1. Choose the language model

Use Llama 3 70B (Meta) or Mistral Large. Both are free and run locally on reasonable hardware. They have enough context capacity to analyze long documents.

2. Define the policy to be simulated

Take a real bill text. Example: "Increase the income tax rate for incomes above R$ 50,000 monthly from 27.5% to 35%." Write this as a structured prompt.

3. Create the simulation prompt

The prompt must contain: the policy text, the stated objective, and a list of variables to be analyzed (revenue, consumption, inequality). Practical example:

Analyze the impact of the following policy:
"New 35% rate for incomes above R$ 50,000."
Objective: increase revenue by 15%.
Variables: total revenue, consumption of classes A and B, Gini index.
Response format: table with optimistic, neutral, and pessimistic scenarios.

4. Use an agent framework

Set up a system with three agents: an economist, a sociologist, and a tax law expert. Each receives the same prompt, but with a role bias. The model responds from different perspectives. You cross-reference the results.

Tools like LangChain or AutoGen facilitate this orchestration. The cost? Only local processing or open model API usage.

5. Validate with real data

To avoid being just a fiction exercise, compare the outputs with historical series. Use open data from IPEA or IBGE. If the model predicts a 10% revenue increase, but the historical elasticity is 5%, you know you need to adjust the parameters.

VariableOptimistic ScenarioNeutral ScenarioPessimistic Scenario
Additional revenue+15%+8%+3%
Drop in class A consumption-2%-5%-12%
Impact on Gini-0.02+0.01+0.05

This table is an example of system output. It does not replace a full study by the Federal Revenue Service, but it provides a quick direction for the decision-maker.

Ethical challenges and real risks

Using AI to create policies is not all advantages. There are serious risks. The first is bias in training data. If the model was trained on legal texts from a period of high inequality, it may reproduce this bias in its suggestions.

In Estonia, the government trains models on the entire legislative collection since 1991. This includes post-Soviet transition laws, which may contain outdated concepts. The curation team manually reviews the output texts.

Another risk is the lack of transparency. If a law was written by AI, who is responsible for it? The advisor who used the tool? The model developer? Legislation has not yet answered this question clearly.

The UK's PolicyGPT has a "traceability" feature: each generated paragraph is accompanied by a reference to the source documents. This allows the human to verify the origin of the suggestion. But not all governments adopt this standard.

A public policy cannot be a black box. If the AI decides, the citizen has the right to know how and why.

Finally, there is the risk of excessive simulation. Governments may be tempted to run infinite scenarios and never decide. The tool should accelerate, not paralyze.

Conclusion: The augmented legislator

Artificial intelligence in public policy creation is not science fiction. It is a real tool, used by real governments, with measurable results. Estonia reduced law drafting time. The UK cut weeks of regulatory analysis. DeepMind simulates impacts before any spending.

The tutorial you just saw shows that this is not restricted to billionaire offices. With open models and public data, any policy team can set up a simulation system. The secret lies in well-structured prompts, agents with defined roles, and validation with historical data.

Public policy remains a human act. But the human can now be augmented by machines that process, analyze, and simulate on a scale that no single brain can achieve. The next step is to ensure this augmentation is ethical, transparent, and in service of the public interest.

Related Articles

#public-policies#law-drafting#impact-simulation#digital-government#policy-as-code#regulatory-analysis
Compartilhar: