🤖 AI Summary
This study addresses the challenge of automatically identifying abusive clauses in Chilean terms of service, which range from clearly illegal provisions to those relying on ambiguous legal standards such as good faith and fairness. To tackle this problem, we propose a locally deployable retrieval-augmented generation (RAG) framework tailored for small-to-medium-scale open-source language models, integrating hybrid dense-sparse retrieval, re-ranking, and prompt augmentation techniques. We introduce the first annotated corpus of Chilean terms of service encompassing illegal, gray-area, and dark pattern clauses, and design an efficient RAG pipeline adapted to this domain. Experimental results demonstrate that our approach significantly enhances the performance of local models, achieving results comparable to large cloud-based systems while maintaining low computational and token costs.
📝 Abstract
Online Terms of Service often function as contracts of adhesion, creating asymmetries that may expose consumers to potentially abusive clauses. In Chile, assessing such clauses is legally challenging because some provisions clearly violate mandatory consumer law, whereas others depend on broader standards such as good faith and contractual imbalance. We present a retrieval-augmented generation framework for the automated detection and classification of potentially abusive clauses in Chilean Terms of Service. Designed for local execution, it combines efficient clause detection, hybrid dense--sparse retrieval, reranking, and prompt augmentation to support medium-sized open-weight language models. We also introduce the Chilean Abusive Terms of Service Extended corpus, comprising 100 contracts and 10,029 annotated clauses in 24 legally grounded categories spanning illegal, dark, and gray clauses. Experiments comparing commercial and open-weight language models, fine-tuned encoders, and traditional baselines show that retrieval-augmented prompting substantially improves performance and enables local models to approach larger cloud-based systems at lower computational and token cost. The study also contributes a refined legal annotation scheme and a practical design for AI-assisted consumer contract review.