A Hybrid Ai-Based Legal Assistance Framework Using Legal-Bert And Llama

Authors

  • Tanzina Reshfiya T F UG Scholar, Dept. of IT, B S Abdur Rahman Crescent Institute of Science & Technology, Chennai, Tamil Nadu, India. Author
  • Umar Farook Rizwan H UG Scholar, Dept. of IT, B S Abdur Rahman Crescent Institute of Science & Technology, Chennai, Tamil Nadu, India. Author
  • Ms. K Sangeetha Assistant Professor, B S Abdur Rahman Crescent Institute of Science & Technology, Chennai, Tamil Nadu, India Author

DOI:

https://doi.org/10.47392/IRJAEM.2026.0265

Keywords:

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

Download data is not yet available.

Downloads

Published

2026-05-09