Digital Transformation

5 min

Drafting Legislation in the Era of Artificial Intelligence and Digitisation

Università di Bologna

Strategic Partners



The introduction of artificial intelligence (AI) and digitisation into the legislative process marks a significant shift in the way laws are created and managed. Over the past 30 years, the AI law community has been steadily working towards the development of more sophisticated tools and strategies for drafting legislation, including the use of machine learning and data analytics. While this evolution brings many opportunities, it also poses unique challenges that must be carefully navigated.


A significant contributor to the field of AI and legislation is Monica Palmirani from the University of Bologna in Italy. Drawing from her presentation on the topic, this essay explores the ways in which artificial intelligence and digitisation are reshaping the process of drafting legislation. Palmirani’s insights into the evolving role of AI in the legislative landscape, including the opportunities and challenges it presents, provide a crucial foundation for understanding and discussing this complex issue. Through her work, Palmirani illustrates how the integration of AI and digitisation in legislative drafting is not just a theoretical concept, but a practical reality with substantial implications for the future of law-making.


Evolution of AI Techniques in Legislation


The advent of AI has gradually reshaped the landscape of legislative drafting. Initially, the introduction of open standards like XML marked the first step towards digitising legislation. This facilitated the modelling of legislative documents, allowing for better organisation and accessibility of laws. As technology progressed, AI was further integrated into legislative drafting through data extraction and serialisation into open data, streamlining the management of law-making systems.


The current era is characterised by the proliferation of emerging technologies such as legal data analytics, data science, AI, and smart contracts. These technologies offer innovative ways to automate and optimise the legislative process. Legal data analytics and data science, for instance, can be used to identify patterns and trends in past laws, informing the drafting of future legislation. Smart contracts, on the other hand, can automatically enforce the terms of an agreement once certain conditions are met, thereby reducing the need for judicial intervention.


Challenges in Applying AI in Legislation


Despite the promising prospects, the application of AI in legislative drafting does not come without hurdles. One of the primary challenges is the risk of neglecting the structure and context of legal documents when applying machine learning models. Unlike regular documents, legal documents carry specific cultural and system-specific nuances that are critical to their interpretation.


Therefore, simply extracting data from these documents is not sufficient. It is crucial to connect this extracted information within a structured context, such as linking obligations to duties and penalties. Furthermore, machine learning models may struggle to understand the context if they only work with plain text. As such, integrating jurisdiction information, temporal data, and other contextual metadata is essential to ensure accurate interpretation and application of laws.


Moreover, striking a balance between relying on past legislation data and recognising new, innovative laws is a delicate task. Predictive algorithms base their forecasts on past data, and as such, may not adequately highlight the significance of novel legal developments.


The Emergence of Hybrid AI in Legislation


To mitigate these challenges, there is a growing trend towards adopting a hybrid AI approach in legislative drafting. This approach combines different technological tools to counterbalance the limitations of any single technique, like deep learning. It encompasses a document-driven approach, semantic web annotation, and data science, providing a robust structure and the necessary context to legal documents.


Akoma Ntoso, an XML standard for legal documents, plays a central role in this hybrid model. It allows for the creation of a structured framework or ‘skeleton’ for legal documents, promoting transparency and accountability in the digitisation process. This approach does not aim to replace traditional legislative drafting methods with AI. Instead, it envisions integrating AI into a platform-based law-making system that enhances the overall process while maintaining its integrity.


AI Services in Legislation


Building upon this structured framework, AI services can be developed to support various aspects of the legislative process. These services can offer crucial assistance to parliament members and other stakeholders in drafting and analysing legislation, making informed decisions, and even in managing the lifecycle of legislative documents.


Communication plays a significant role in this process. By using legal design visualisation, information can be presented in a user-friendly manner, making it more accessible to all stakeholders. This includes visualisation portals, infographics, and other tools that simplify and clarify the legal message. The goal is to effectively communicate complex legislative information to a diverse audience, from legal experts to the general public.


AI and European Legislation: A Case Study


A recent project with the European Commission titled “Drafting Legislation in the Era of Artificial Intelligence and Digitisation” provides a practical example of how AI is being used in legislative drafting. The project identified three primary areas of AI application in the legislative process: supporting legal drafting, aiding decision-making processes, and analysing the legal order as a whole system.


The project’s first use case centred on analysing co-regulation. Using supervised deep learning, the type of co-regulation was classified, revealing important information that could help legislatures avoid mistakes and reduce co-regulation. The analysis highlighted that most co-regulations were in areas of standardisation, mathematical formulas, and chemical formulas. This information is invaluable in steering resources towards these areas to minimise errors.


The second use case focused on detecting derogations semi-automatically. Derogations are exceptions to the main rule, and there are many in our legal system. By tracking these exceptions using AI, they can be serialized and presented in a format that is easily understood by lawyers and legislators. This has the potential to significantly improve the efficiency of the legislative process.


The third use case was dedicated to analysing the language used in legislation. AI was used to determine whether the language in the bill was in line with the policies defined by the European Commission, particularly those promoting digitalisation. This analysis led to the creation of an index that can help legislators gauge whether their bills are digitally ready, an important consideration in the digital age.


The final use case focused on assessing the similarity between the implementation of a directive in a member state and the original European directive. This use case demonstrated the potential of AI to measure how closely domestic laws align with European directives or policies.




In conclusion, the integration of AI and digitisation in legislative drafting is reshaping the future of law-making. By adopting a hybrid AI approach, risks associated with AI’s application in legislation can be mitigated. The use of Akoma Ntoso as a basic framework enables transparency and accountability, fostering trust in the digitisation process of legislation.


Through a human-centric AI approach, humans remain in control of the legislative process, thus preserving the democratic principles inherent in law-making. The use of communication standards like legal design visualisation ensures clear, accessible communication of legal information. As we move forward, the role of AI in legislative drafting will continue to evolve, opening up new possibilities and challenges in this dynamic field.

Support this library and donate

Supporting and donating to this library is more than a contribution; it is a vote for the importance of freely accessible knowledge and a pledge to our shared intellectual growth. Each donation aids in the curation, preservation, and expansion of our resources, ensuring the continued availability of relevant and timely content. It helps us sustain the quality and breadth of our offerings, enabling us to serve our diverse community better. Your contribution signifies your commitment to fostering a vibrant, informed, and connected community, underpinned by the principle of equitable access to knowledge.

Enjoying this theme?
Read Articles about this subject