Retrieval-Augmented Generation for Addressing Consumer Complaints
摘要
Consumers in Portugal often encounter challenges when seeking resolutions to their complaints, as information regarding consumers’ rights may be inaccessible or hard to understand. In this work, we focus on this gap, introducing a system that responds to consumer complaints with legally grounded, understandable explanations based on Portuguese consumer law. To achieve this, a Retrieval-Augmented Generation architecture was implemented, combining information retrieval with natural language generation. The system consists of two main components: a Retriever and a Generator. The Retriever was built by fine-tuning Albertina, a BERT-family model for European Portuguese, to identify the most semantically relevant legal segments for a given complaint. To support this, a new dataset was created, consisting of Portuguese consumer complaints paired with legislative excerpts, an essential contribution given the absence of existing resources of this kind. The Generator component then produces a response using the retrieved legal information, presenting it in a simplified and user-friendly manner. The system was evaluated through both quantitative and qualitative methods. The retriever showed significant gains in accuracy compared to a traditional BM25 baseline, demonstrating improved ability to match complaints with relevant legal content. To assess the generator’s effectiveness, a user study was conducted in which participants compared full system responses to a baseline consisting only of retrieved legal segments. In this evaluation, 78.67% of participants preferred the generated responses, indicating the potential of the RAG architecture to provide clearer and more helpful legal guidance to consumers.