FairLex: AI-Based Assistant for Legal Compliance and Sustainability Challenges in the Fashion Industry

Master Thesis

Author: Francesco De Vito

Academic Year: 2025/2026

Defense Date: 18 June 2026

Institution: UniversitĂ  della Svizzera italiana

Faculty: Faculty of Informatics

Program: Master of Science in Software & Data Engineering

Abstract

Regulatory pressure on sustainability in the fashion industry has increased significantly in recent years. Large companies face significant costs to comply with an increasingly complex regulatory framework, while for small and medium-sized businesses, the same obligations pose even higher risks, as they must navigate identical legal requirements with fewer dedicated resources and limited in-house legal expertise. Making matters even more challenging is the fact that these requirements are distributed across different jurisdictions and written in multiple languages.

General-purpose Large Language Models (LLMs), such as GPT-5, Gemini 3.1 Pro, and Claude Opus 4.8, are also able to answer legal questions. However, they are still poorly suited to use cases related to regulatory compliance. Lacking direct and reliable access to up-to-date legislative sources, these systems are unable to provide continuously verifiable references. Consequently, in addition to making it more difficult to verify the information generated, they can produce inaccurate responses or responses containing so-called “hallucinations”. This thesis argues that the main limitation of such systems lies not only in the capabilities of the linguistic model, but also in the lack of a structured information retrieval mechanism based on authoritative normative sources.

To address this issue, FairLex was designed, developed, and tested. It is an AI-based legal compliance assistant that integrates Retrieval-Augmented Generation (RAG) techniques with agentic workflows. Regulations from official sources across eight jurisdictions (European Union, Switzerland, United States, United Kingdom, Canada, Germany, Norway, and Japan) were collected and processed through a hierarchical chunking strategy designed to preserve the original structure of the regulatory documents. The resulting corpus was indexed in a vector database enriched with the relevant metadata.

The system’s retrieval performance was evaluated using a synthetic benchmark from the normative corpus. Beyond retrieval quality, the thesis presents an industrial case study conducted in collaboration with Hugo Boss, carried out through multiple design iterations and intermediate prototypes. The resulting system supports a real-world compliance use case, and domain experts provided positive feedback confirming that FairLex addresses their needs more effectively than the general-purpose AI tools they currently employ.