Identifying How UK Legislation Is Applied in Case Law: An Ensemble LLM Approach Using LegalDocML

Authors

  • Safia Kanwal Faculty of Creative and Digital Arts and Sciences, Anglia Ruskin University, UK
  • Livio Robaldo School of Law, Swansea University, UK
  • Stergios Aidinlis School of Law, Durham University, UK
  • Joseph Anim School of Law, Swansea University, UK
  • Davide Liga Department of Computer Science, Luxembourg University, Luxembourg

DOI:

https://doi.org/10.47852/bonviewJCLLT62029448

Keywords:

judicial application of statutes, phrase-level linking of legislation and case law, large language models, LegalDocML

Abstract

Legal judgments derive their value not only from stating what the law is but also from showing how legal principles are applied to the facts of specific disputes. This applicative step, central to doctrines such as stare decisis, remains underexplored in legal artificial intelligence (AI) research, which has largely focused on tasks such as retrieval and classification. Yet effective AI support for legal practice requires transparent methods that trace how statutes are applied in case law. This paper introduces a methodology for bridging UK statutory law with its judicial application by combining large language models (LLMs) with structured LegalDocML data. We process official LegalDocML files published by The National Archives, meticulously curated and validated by legal experts as part of a nationwide modernization of legislative publishing. The UK is among the few countries to provide all legislation and case law in LegalDocML, and to our knowledge, this study is the first substantial academic use of this resource with LLMs for the analysis of how legislation is applied in case law. Our results show that integrating bottom-up neural inference with top-down expert-curated XML data allows the proposed framework to identify phrase-level applications of legislation in case law with high accuracy and explainability. This approach advances practitioner-oriented legal AI and lays the foundation for next-generation LegalTech tools that support precedent analysis and traceable legal reasoning.     

 

Received: 24 February 2026 | Revised: 7 April 2026 | Accepted: 14 May 2026

 

Conflicts of Interest

The authors declare that they have no conflicts of interest to this work.


Data Availability Statement

The data that support the findings of this study are openly available at https://github.com/SafiaK/BridgingCaseLawAndLegislation


Author Contribution Statement

Safia Kanwal: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Resources, Data curation, Writing – original draft, Writing – review & editing. Livio Robaldo: Conceptualization, Methodology, Validation, Resources, Data curation, Writing – original draft, Writing – review & editing, Visualization, Supervision, Project administration, Funding acquisition. Stergios Aidinlis: Conceptualization, Validation, Writing – original draft, Writing – review & editing. Joseph Anim: Conceptualization, Validation, Writing – original draft, Writing – review & editing. Davide Liga: Writing – original draft, Writing – review & editing.    

Downloads

Published

2026-05-29

Issue

Section

Research Articles

How to Cite

Kanwal, S., Robaldo, L., Aidinlis, S., Anim, J., & Liga, D. (2026). Identifying How UK Legislation Is Applied in Case Law: An Ensemble LLM Approach Using LegalDocML. Journal of Computational Law and Legal Technology, 1-18. https://doi.org/10.47852/bonviewJCLLT62029448

Funding data