The increasing volume and complexity of regulatory frameworks require enterprises to contin- uously align internal policies with evolving external legal obligations. This process is traditionally manual, costly, and difficult to scale, particularly under tight regulatory deadlines and in multi- jurisdictional contexts such as the European Union. This thesis investigates the use of Retrieval-Augmented Generation (RAG) to support the au- tomation of regulatory compliance analysis. The problem is structured into three core tasks: extracting obligations from regulatory texts, detecting conflicts between these obligations and in- ternal corporate policies, and generating harmonised policy revisions. The framework is extended with gap analysis to identify missing coverage. To address these tasks, a modular RAG-based pipeline is designed, integrating semantic retrieval, large language model reasoning, and structured prompt design. Multiple architectural variants are proposed to explore trade-offs between cost, accuracy, and scalability, including obligation-first retrieval strategies and Natural Language Inference (NLI)-based filtering. The system is evaluated on Italian corporate policies and EU regulatory documents, highlight- ing challenges related to legal language ambiguity and retrieval limitations. Results show that structuring the process around explicit obligations stabilises comparison cost under increased doc- ument fragmentation, improves verdict traceability, and enables missing-obligation analysis while preserving conflict-detection performance on the controlled test set. Overall, the thesis demonstrates how RAG-based systems can effectively support key compliance activities, reducing manual effort while enabling controlled cost–accuracy trade-offs.
Leveraging Large Language Models and Retrieval-Augmented Generation for Automated Policy Comparison in Legal Compliance
LO PRESTI, FEDERICO
2025/2026
Abstract
The increasing volume and complexity of regulatory frameworks require enterprises to contin- uously align internal policies with evolving external legal obligations. This process is traditionally manual, costly, and difficult to scale, particularly under tight regulatory deadlines and in multi- jurisdictional contexts such as the European Union. This thesis investigates the use of Retrieval-Augmented Generation (RAG) to support the au- tomation of regulatory compliance analysis. The problem is structured into three core tasks: extracting obligations from regulatory texts, detecting conflicts between these obligations and in- ternal corporate policies, and generating harmonised policy revisions. The framework is extended with gap analysis to identify missing coverage. To address these tasks, a modular RAG-based pipeline is designed, integrating semantic retrieval, large language model reasoning, and structured prompt design. Multiple architectural variants are proposed to explore trade-offs between cost, accuracy, and scalability, including obligation-first retrieval strategies and Natural Language Inference (NLI)-based filtering. The system is evaluated on Italian corporate policies and EU regulatory documents, highlight- ing challenges related to legal language ambiguity and retrieval limitations. Results show that structuring the process around explicit obligations stabilises comparison cost under increased doc- ument fragmentation, improves verdict traceability, and enables missing-obligation analysis while preserving conflict-detection performance on the controlled test set. Overall, the thesis demonstrates how RAG-based systems can effectively support key compliance activities, reducing manual effort while enabling controlled cost–accuracy trade-offs.| File | Dimensione | Formato | |
|---|---|---|---|
|
LoPresti.Federico.pdf
accesso aperto
Dimensione
2.15 MB
Formato
Adobe PDF
|
2.15 MB | Adobe PDF | Visualizza/Apri |
I documenti in UNITESI sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/20.500.14251/9162