Skip to the content

i.AI builds knowledge graph of UK legislation

09/05/25

Mark Say Managing Editor

Get UKAuthority News

Share

Digital icons relating to law
Image source: istock.com/Nicoelnino

The Government’s Incubator for Artificial Intelligence (i.AI) has developed a knowledge graph of UK legislation.

Named Lex Graph, it is said to support fast, data driven and evidence based analysis to provide insights of relevant concepts and relationships between different areas of law.

i.AI has outlined the project in a blogpost, saying it builds on the earlier development of the Lex tool to support research into legislation.

It makes the point that each law is connected to others through a complex web of references, amendments and shared domains, and that it is crucial for these to be understood by policy makers, researchers and legal professionals.

Nodes and edges

Lex Graph has been developed to provide visualisations of these relationships, representing the laws as nodes and their relationships as edges in a graph. This makes it possible to uncover patterns and connections that might otherwise remain hidden.

It currently contains over 820,000 nodes – legislation and provisions – and 2.2 million edges for the connections between them.

The blogpost cites an example of using the tool to explore the relationship between the Intellectual Property Act and the Data Protection Act.

The code is available on GitHub and the data on Hugging Face. Data engineers Gavin Edwards and Liv Livesey said the tool has currently has limitations, such as older legislative documents being missing, but have invited people to use it and provide feedback.

They commented: “It's crucial to emphasise that Lex Graph is designed for research and analysis purposes only. While it can provide valuable insights into legislative relationships and patterns, it should not be relied upon for legal advice or as an authoritative source of legislation.

“Users should always refer to official sources for current and accurate legislative information.”

Register For Alerts

Keep informed - Get the latest news about the use of technology, digital & data for the public good in your inbox from UKAuthority.