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.
2025
Legal Knowledge and Information Systems
427
429
Molinari, M., Amantea, I.A., Quaranta, M., Governatori, G. (2025). Principles of Law: LLMs vs RegEx [10.3233/FAIA416].
Molinari, Marianna; Amantea, Ilaria Angela; Quaranta, Marinella; Governatori, Guido
File in questo prodotto:
Eventuali allegati, non sono esposti

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11585/1051373
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact