A retrieval-augmented multi-stage prompting framework for legal analysis in the Indian judicial system
Related Experiment Videos
Kanishkavardhan P1, Gowtham S1, Maheswari N1
1School of Computer Science and Engineering (SCOPE), Vellore Institute of Technology Chennai, Chennai, India.
Abstract:
The aim of this endeavor was to create an Artificial Intelligence (AI) based legal researcher that utilizes a multi-stage Retrieval-Augmented Generation (RAG) methodology to solve the challenges of finding and comprehending pertinent legal information in the documents. The traditional methods for finding legal documents will usually yield very few results that are useful to someone without a law degree. This new system uses semantic search, keyword retrieval and Large Language Model (LLM) reasoning methods to improve the legal research process. The submitted query will be transformed into a vector embedding while simultaneously being classified into the appropriate category for retrieval. Once the query is classified, the system will use a hybrid retrieval mechanism to find the most relevant legal document based on both BM25 (Best Matching 25) and FAISS (Facebook AI Similarity Search) search algorithms and will combine these results using Reciprocal Rank Fusion (RRF) in order to determine the best results. Later, it will be processed through LLM models to produce formatted (structured) answers to the query in accordance with the relevant legal citation. The overall performance of the proposed system demonstrates improved answer relevancy, reliability and contextual accuracy, thereby making it an effective tool for legal research and assistance. LLaMA-3.3-70B achieved the highest scores in Answer Relevancy (0.91) and Faithfulness (0.92), proving its ability to generate accurate, intent aligned, and evidence-grounded legal responses with minimal hallucination. Gemini-2.0-Flash showed higher Context Recall (0.78), indicating strong retrieval capability, while Mistral-Large excelled in BLEU (0.769) and semantic similarity, highlighting fluent text generation but weaker evidence grounding.
Related Concept Videos
Retrieval
Recall involves accessing information without cues, such as during an essay test, where individuals must retrieve facts and concepts from memory unaided. Another example is remembering the name of a colleague...
Legal Guidelines for Documentation
Torts III
Quasi-intentional torts in healthcare involve acts where intent is not directed to harm an individual but results in harm due to careless or reckless speech.
Sources of Law
Constitutional law is foundational, deriving from federal and state constitutions, and...
Reason and Intuition