TY - JOUR
T1 - LegalBot-EC
T2 - An LLM-Based Chatbot for Legal Assistance in Ecuadorian Law
AU - Rivas-Echeverria, Francklin
AU - Ramos, Leo Thomas
AU - Ibarra, Jose Luis
AU - Zerpa-Bonillo, Sonia
AU - Arciniegas, Stalin
AU - Asprino-Salas, Marilena
N1 - Publisher Copyright:
© 2013 IEEE.
PY - 2025
Y1 - 2025
N2 - 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.
AB - 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.
KW - BERT
KW - LLaMA
KW - Large language models
KW - artificial intelligence
KW - chatbot
KW - legal AI
KW - legal informatics
KW - natural language processing
KW - transformer
UR - http://www.scopus.com/inward/record.url?scp=105008682506&partnerID=8YFLogxK
U2 - 10.1109/ACCESS.2025.3580488
DO - 10.1109/ACCESS.2025.3580488
M3 - Article
AN - SCOPUS:105008682506
SN - 2169-3536
VL - 13
SP - 106817
EP - 106833
JO - IEEE Access
JF - IEEE Access
ER -