A Hybrid Ai-Based Legal Assistance Framework Using Legal-Bert And Llama
DOI:
https://doi.org/10.47392/IRJAEM.2026.0265Keywords:
Legal Information Retrieval, Hybrid Retrieval, BM25, FAISS, Semantic Search, Legal-BERT, Retrieval-Augmented Generation (RAG), LLaMA, Natural Language Processing (NLP).Abstract
Legal information retrieval has become more difficult because of the large increase in the number of legal documents, statutes, and case records. Traditional systems depend mostly on keyword matching. This often misses the deeper meanings behind complex legal questions and can lead to irrelevant results. To tackle this issue, a new legal assistance system is proposed to improve both accuracy and relevance while providing clear and user-friendly information. This approach combines keyword-based and semantic retrieval methods. The Best Matching 25 (BM25) algorithm measures keyword relevance, while Facebook AI Similarity Search (FAISS) helps with semantic similarity searches between queries and legal texts. Legal-Bidirectional Encoder Representations from Transformers (Legal-BERT) creates context-specific embeddings. A retrieval-augmented generation framework supported by the Large Language Model Meta AI (LLaMA) model ensures responses are clear and aware of the context.
Downloads
Downloads
Published
Issue
Section
License
Copyright (c) 2026 International Research Journal on Advanced Engineering and Management (IRJAEM)

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
.