Abstract: Legal Artificial Intelligence has emerged as an essential field, focusing on AI technologies that facilitate various legal tasks and alleviate the workload of legal professionals. Despite advancements in Legal Artificial Intelligence, there remains a critical gap in systems that can provide both comprehensive and contextually accurate retrieval tailored to the intricate structure of EU legislation. We propose EuropeanLawAdvisor, an efficient and user-friendly legal information retrieval system designed to deliver tailored responses to legal queries. This system utilizes open-source Large Language Models within a Retrieval-Augmented Generation framework, facilitating precise and relevant information retrieval. The system employs a robust retrieval approach that integrates multi-match, k-nearest neighbors, hybrid methods, and TF-IDF search strategies across both complete documents and segmented text indexes, ensuring comprehensive retrieval for diverse query types. The implementation of the framework has demonstrated significant improvements in the accuracy and relevance of responses to EU legal queries, enhancing both the retrieval of relevant legal documents and the generation of precise responses. We show that EuropeanLawAdvisor, leveraging open-source models like Phi3-mini-3B and LLaMa-3-8B, achieves competitive Faithfulness and Relevance compared to GPT-4-Turbo. The performance gap narrows significantly in zero-shot scenarios, and our approach outperforms GPT-4-Turbo in the percentage of answered questions. We publicly release our code on GitHub: https://github.com/raffaele-russo/EuropeanLawAdvisor.
External IDs:dblp:conf/bigdataconf/RussoRORRGPM24
Loading