LegalBot-EC: An LLM-Based Chatbot for Legal Assistance in Ecuadorian Law

Francklin Rivas-Echeverria*, Leo Thomas Ramos*, Jose Luis Ibarra, Sonia Zerpa-Bonillo, Stalin Arciniegas, Marilena Asprino-Salas

*Autor correspondiente de este trabajo

Producción científica: Contribución a una revistaArtículorevisión exhaustiva

Resumen

This work presents LegalBot-EC, a domain-specific legal chatbot designed to provide accurate responses grounded in Ecuadorian law. 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.

Idioma originalInglés
Páginas (desde-hasta)106817-106833
Número de páginas17
PublicaciónIEEE Access
Volumen13
DOI
EstadoPublicada - 2025

Nota bibliográfica

Publisher Copyright:
© 2013 IEEE.

Citar esto