A Data Science Approach to Calcutta High Court Judgments: An Efficient LLM and RAG-powered Framework for Summarization and Similar Cases Retrieval

Puspendu Banerjee, Aritra Mazumdar, Wazib Ansar, Saptarsi Goswami, Amlan Chakrabarti · 2025

Read A Data Science Approach to Calcutta High Court Judgments: An Efficient LLM and RAG-powered Framework for Summarization and Similar Cases Retrieval by Puspendu Banerjee, Aritra Mazumdar, Wazib Ansar, Saptarsi Goswami, Amlan Chakrabarti (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-01058.txt.

Introduction

Puspendu Banerjee and co-authors bring language AI to the judgment archive of the Calcutta High Court, in a 2025 paper. Courts sit on mountains of verdicts that lawyers must search for precedent and clients must somehow understand. The team built a framework that summarizes judgments and retrieves similar past cases on request.

A summarization model was fine-tuned on headnote summaries written by the court, and a two-step routine preserves the legal context that single-pass summaries drop. The summaries feed a vector database, over which a retrieval-augmented generation system answers questions with matching cases. Tests show clear gains in summary quality over generic approaches. For a judiciary short on time, such tools could turn an archive from a warehouse into a working library, provided lawyers keep verifying what the machine hands them.

Catalog record

CREATORPuspendu Banerjee, Aritra Mazumdar, Wazib Ansar, Saptarsi Goswami, Amlan Chakrabarti
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE22 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2507-01058

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

A Data Science Approach to Calcutta High Court Judgments: An Efficient LLM and RAG-powered Framework for Summarization and Similar Cases Retrieval Puspendu Banerjee, Aritra Mazumdar, Wazib Ansar, Saptarsi Goswami, Amlan Chakrabarti Abstract The judiciary, as one of democracy’s three pillars, is dealing with a rising amount of legal issues, needing careful use of judicial resources. This research presents a complex framework that leverages Data Science methodologies, notably Large Language Models (LLM) and Retrieval-Augmented Generation (RAG) techniques, to improve the efficiency of analyzing Calcutta High Court verdicts. Our framework focuses on two key aspects: first, the creation of a robust summarization mechanism that distills complex legal texts into concise and coherent summaries; and second, the development of an intelligent system for retrieving similar cases, which will assist legal professionals in research and decision making. By fine-tuning the Pegasus model using case head note summaries, we achieve significant improvements in the summarization of legal cases. Our two-step summarizing technique preserves crucial legal contexts, allowing for the production of a comprehensive vector database for RAG. The RAG-powered framework efficiently retrieves similar cases in response to user queries, offering thorough overviews and summaries. This technique not only improves legal research efficiency, but it also helps legal professionals and students easily acquire and grasp key legal information, benefiting the overall legal scenario. keywords Large Language Models (LLM), Retrieval-Augmented Generation (RAG), Text Summarization, Judicial Resource Management, Case Retrieval System 1 Introduction The legal domain is characterized by its vast and intricate nature, which includes a plethora of judgments, statutes, and legal documents. Each legal text can be lengthy and complex, making it challenging for legal professionals to swiftly incorporate and apply essential information. Natural Language Processing (NLP) approaches have advanced throughout time, revolutionizing how we process and analyze enormous amounts of information. These developments provide intriguing techniques for addressing the difficulties inherent in legal texts ( Nallapati et al. 2016 ) . Summarization is an important NLP task that aims to condense a lengthy document into a brief and cohesive summary while retaining its essential information. Summarization can be divided into two types: extractive and abstractive. Extractive summary selects and concatenates key lines from the original text, whereas abstractive summarization generates new sentences that encapsulate the fundamental concepts, frequently rephrasing the information in a more cohesive and concise manner ( Zhong et al. 2020 ) . Summarizing legal texts is particularly beneficial for several reasons. It can greatly decrease the time and effort necessary to comprehend long legal papers, speed up decision-making, and improve legal research by offering concise summaries of relevant cases ( Filtz et al. 2020 ) . Despite these advancements, the legal profession faces significant challenges in efficiently processing and understanding extensive legal documents. Legal professionals frequently spend significant time reading through lengthy judgments and statutes to extract relevant information, which slows decision-making and reduces the overall efficiency of the legal system. Large Language Models (LLMs) trained on large datasets of legal texts have demonstrated potential in this area. However, LLMs have several limitations: they may not be fine-tuned particularly for legal contexts, may not be up to speed with the most recent legal data, may cause hallucinations, and may struggle to provide exact solutions to specific legal queries. Furthermore, general-purpose search engines frequently provide unorganized and overwhelming results, necessitating considerable effort to sort through irrelevant information. The absence of specialized tools for summarizing legal texts and retrieving similar cases worsen these issues, resulting in inefficiencies in legal research and analysis. There is an urgent need for innovative solutions that may give concise summaries and accurate retrieval of relevant cases to help legal practitioners with their work. An LLM framework driven by Retrieval-Augmented Generation (RAG) can be used to overcome these constraints. This methodology leverages retrieval-based mechanisms along with the strengths of LLMs to guarantee contextually relevant and up-to-date replies. The accuracy and relevance of legal information retrieval are improved by RAG-powered frameworks, which gather relevant facts from a large database and produce logical answers ( Lewis et al. 2020 ) . The aim of this study is to make a substantial contribution to the field of legal research and analysis. Our framework gives detailed and organized summaries of court cases, in contrast to general-purpose search engines that typically provide unstructured and overwhelming results. With the use of case head note summaries, it fine-tunes the Pegasus model ( Zhang et al. 2020 ) and significantly improves in legal text summarization. Our two-step summary procedure facilitates the development of an extensive vector database for RAG ( Liu and Lapata 2019 ) by maintaining important legal contexts. Furthermore, our RAG-powered structure facilitates the effective retrieval of relevant cases in response to user queries, offering an overview of case names, dates, results, citations, related acts articles sections invoked, and judgment summaries. Additionally, we have created a comprehensive dataset of Calcutta High Court judgments by web scraping from indiankanoon.org . This dataset has been annotated using an LLM to overcome the time constraints associated with manual annotation, ensuring high-quality, consistent annotations and has been verified by legal experts. In summary, the principal contributions of this paper are: 1. Creating a dataset of Calcutta High Court judgments through web scraping and annotating it using an LLM, enhancing the quality and consistency of the dataset. 2. Fine-tuning the Pegasus model with Case Head Note summaries to improve legal case summarization. 3. Implementing a two-step summarization process to maintain the context of legal texts, crucial for building an accurate vector database for RAG. 4. Developing a RAG-powered framework for retrieving similar cases, providing detailed overviews and summaries tailored to specific legal queries. By integrating these advancements, our paper addresses the shortcomings of existing LLMs and search engines, offering a robust and efficient tool for legal research and decision-making. The remainder of the paper is structured as follows: Section 2 delves into related work, positioning our work within the existing literature. Section 3 outlines the methodology that we used for this study. Section 4 discusses our dataset and experimental setup in detail. Section 5 presents insights derived from the experimental results. Finally, Section 6 offers concluding remarks, along with the future scope of research in this domain. 2 Related Works Within this section, we provide a detailed overview of existing literature pertinent to our research topic. We seek to provide a contextual basis by reviewing earlier research, identifying essential themes, methodology, and findings that influence and add to the current study. In order to facilitate Named Entity Recognition (NER) tasks, a new corpus of annotated legal named entities in Indian court decisions is introduced in the study by Kalamkar, Prathamesh, et al., 2022 ( Kalamkar et al. 2022 ) . About 46k annotated legal named entities corresponding to 14 legal entity kinds are included in the corpus. The research by Mamakas, Dimitris, et al., 2022 ( Mamakas et al. 2022 ) investigates how to handle lengthy legal documents more effectively by modifying pre-trained transformers like Longformer ( Beltagy et al. 2020 ) and LegalBERT ( Chalkidis et al. 2020 ) . Using TF-IDF representations and eliminating duplicate sub-words during fine-tuning are two of the adjustments used to prevent going over the maximum input length limits. A framework called CEEN, based on

Read the complete text