LegalBot-EC: An LLM-Based Chatbot for Legal Assistance in Ecuadorian Law
This work introduces LegalBot-EC, a legal chatbot designed to provide responses based on Ecuadorian law based on large language models (LLMs), The system combines ChromaDB for contextual retrieval and LLaMA 3.1 as its generative model, ensuring legally relevant and contextually grounded answers. Its knowledge base consists of two key legal documents, the COIP and the 2008 Constitution of Ecuador, which serve as the foundation for response generation. The chatbot was evaluated through two key assessments: user satisfaction and accuracy measurement. A satisfaction study conducted with final-year university students specializing in law resulted in an average score of 88.72 out of 100, indicating strong approval in terms of correctness, relevance, and clarity. Additionally, an accuracy assessment based on 25 legal queries demonstrated robust performance, with 23 correct responses, 2 partially correct responses, and none classified as incorrect, yielding a weighted accuracy of 96%. Furthermore, qualitative tests confirm the chatbot’s ability to generate well-structured, legally sound responses, even when queried in English, demonstrating multilingual capabilities.
Authors
- Leo Ramos (ORCID: https://orcid.org/0000-0001-7107-7943)
- Stalin Arciniegas
- Francklin Rivas (ORCID: https://orcid.org/0000-0002-5201-2877)
- José Luis Ibarra
- Marilena Asprino-Salas
- عبدالرحمن صوفي عثمان
Institutions
- Pontificia Universidad Católica del Ecuador (EC)
- Universidad de Otavalo (EC)
Publication Details
- Journal
- IEEE Access
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1109/access.2025.3580488
- Citations
- 3
- Primary Topic
- Artificial Intelligence in Law
- Type
- article
- Field-Weighted Citation Impact
- 25.57