Abstract
Advocates and law students must navigate a large and continuously evolving body of Indian Supreme Court and High Court judgments, yet conventional keyword search and proprietary legal databases create significant limitations in accessibility, semantic retrieval, and reproducibility. General-purpose large language models can provide natural-language legal assistance but remain vulnerable to hallucinated authorities and unsupported claims. Retrieval-augmented generation (RAG) provides a mechanism for grounding model outputs in an external legal corpus, but retrieval quality alone does not ensure reliable legal answers. This paper presents LegalAssist, an open-source retrieval-augmented generation system for searching Indian court judgments and generating source-grounded legal responses. The system implements a modular retrieval and verification architecture combining query expansion, BM25 lexical retrieval, FAISS dense retrieval using all-MiniLM-L6-v2 embeddings, reciprocal rank fusion, cross-encoder reranking, authority-aware ranking, temporal-validity checking, natural-language-inference-based citation verification, and reliability-based answer abstention. Legal answers are generated in a FIRAC (Facts, Issues, Rule, Application, Conclusion) form using GPT-4o-mini or a local Qwen model. The system is evaluated using the Indian Legal Prior Case Retrieval (IL-PCR) task of the IL-TUR benchmark, which provides gold relevance judgments rather than proxy similarity measures. The results show that BM25 remains the strongest retrieval configuration on the evaluated benchmark, with dense retrieval, multi-query expansion, and general-purpose cross-encoder reranking failing to consistently improve retrieval performance. The principal contribution of LegalAssist therefore lies not in replacing lexical retrieval with dense retrieval, but in integrating temporal-validity detection, citation verification, reliability estimation, and abstention into an open and reproducible legal-AI pipeline. The resulting architecture provides a transparent approach to reducing unsupported legal generation while explicitly exposing the limitations of automated retrieval and generation. The study demonstrates how system-level safeguards can be incorporated into legal RAG architectures to improve reliability, reproducibility, and responsible deployment on consumer-level computing infrastructure.

This publication has 27 references indexed in Scilit: