Principles of law (PoLs) offer a framework for case interpretation and ensure legal consistency, especially in areas lacking specific legislation. Courts use PoLs to establish binding precedents that guide decision-making. However, PoLs are expressed in a non-standard way in rulings, making them difficult to iden- tify at a glance without interpretative reading. Our study tested ChatGPT, Claude, and DeepSeek in extracting PoLs, verifying their results with Regular Expressions (RegEx). While Large Language Models (LLMs) showed promise, their outputs required significant expert oversight, revealing limitations in legal research, partic- ularly in terms of accuracy and quantity.
Molinari, M., Amantea, I.A., Quaranta, M., Governatori, G. (2025). Principles of Law: LLMs vs RegEx [10.3233/FAIA416].
Principles of Law: LLMs vs RegEx
Marianna Molinari;Ilaria Angela Amantea;Marinella Quaranta;
2025
Abstract
Principles of law (PoLs) offer a framework for case interpretation and ensure legal consistency, especially in areas lacking specific legislation. Courts use PoLs to establish binding precedents that guide decision-making. However, PoLs are expressed in a non-standard way in rulings, making them difficult to iden- tify at a glance without interpretative reading. Our study tested ChatGPT, Claude, and DeepSeek in extracting PoLs, verifying their results with Regular Expressions (RegEx). While Large Language Models (LLMs) showed promise, their outputs required significant expert oversight, revealing limitations in legal research, partic- ularly in terms of accuracy and quantity.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


