Panarelli, Marco
(2025)
Comparing Large Language Models on Unfair Clause Detection in Terms of Services.
[Laurea magistrale], Università di Bologna, Corso di Studio in
Artificial intelligence [LM-DM270]
Documenti full-text disponibili:
![[thumbnail of Thesis]](https://amslaurea.unibo.it/style/images/fileicons/application_pdf.png) |
Documento PDF (Thesis)
Disponibile con Licenza: Salvo eventuali più ampie autorizzazioni dell'autore, la tesi può essere liberamente consultata e può essere effettuato il salvataggio e la stampa di una copia per fini strettamente personali di studio, di ricerca e di insegnamento, con espresso divieto di qualunque utilizzo direttamente o indirettamente commerciale. Ogni altro diritto sul materiale è riservato
Download (988kB)
|
Abstract
The detection of unfair clauses in Terms of Service (ToS) is a crucial AI application for consumer protection, enabling users and regulatory bodies to identify potentially harmful contractual terms. While previous research has focused on fine-tuned transformer-based models for this task, the advent of Large Language Models (LLMs) has introduced new possibilities for automated legal text analysis. Unlike traditional models, LLMs can leverage in-context learning, reducing the need for extensive retraining when legislation changes. This study systematically evaluates the effectiveness of LLMs in unfair clause detection by comparing different prompting strategies against fine-tuned classifiers. Through an extensive set of experiments, including 62 model-setting combinations, this work explores various prompting techniques, such as zero-shot, few-shot, multi-prompt and pipeline approaches. The results indicate that while LLMs provide flexibility and adaptability, they still struggle to surpass supervised models in classification performance. Furthermore, this study prioritizes open-source models to ensure accessibility, transparency, and feasibility in low-resource environments. As an additional contribution, a lightweight evaluation framework was developed to facilitate systematic testing of LLMs on the CLAUDETTE dataset.
Abstract
The detection of unfair clauses in Terms of Service (ToS) is a crucial AI application for consumer protection, enabling users and regulatory bodies to identify potentially harmful contractual terms. While previous research has focused on fine-tuned transformer-based models for this task, the advent of Large Language Models (LLMs) has introduced new possibilities for automated legal text analysis. Unlike traditional models, LLMs can leverage in-context learning, reducing the need for extensive retraining when legislation changes. This study systematically evaluates the effectiveness of LLMs in unfair clause detection by comparing different prompting strategies against fine-tuned classifiers. Through an extensive set of experiments, including 62 model-setting combinations, this work explores various prompting techniques, such as zero-shot, few-shot, multi-prompt and pipeline approaches. The results indicate that while LLMs provide flexibility and adaptability, they still struggle to surpass supervised models in classification performance. Furthermore, this study prioritizes open-source models to ensure accessibility, transparency, and feasibility in low-resource environments. As an additional contribution, a lightweight evaluation framework was developed to facilitate systematic testing of LLMs on the CLAUDETTE dataset.
Tipologia del documento
Tesi di laurea
(Laurea magistrale)
Autore della tesi
Panarelli, Marco
Relatore della tesi
Correlatore della tesi
Scuola
Corso di studio
Ordinamento Cds
DM270
Parole chiave
Large Language Models, Terms of Service, Natural Language Processing, Transformer-based Models, Unfair Clauses
Data di discussione della Tesi
25 Marzo 2025
URI
Altri metadati
Tipologia del documento
Tesi di laurea
(NON SPECIFICATO)
Autore della tesi
Panarelli, Marco
Relatore della tesi
Correlatore della tesi
Scuola
Corso di studio
Ordinamento Cds
DM270
Parole chiave
Large Language Models, Terms of Service, Natural Language Processing, Transformer-based Models, Unfair Clauses
Data di discussione della Tesi
25 Marzo 2025
URI
Statistica sui download
Gestione del documento: