Abstract:
The Sri Lankan legal system faces a significant challenge in providing efficient access to court judgments, with existing platforms suffering from poor interfaces, inadequate search functionality, and frequent downtime. This creates substantial barriers for legal practitioners and students who require reliable access to judicial precedents—a cornerstone of Sri Lanka's hybrid legal system. Legal research, education, and practice are restricted without effective retrieval systems, reducing access to justice.
This research addresses these challenges by developing an automated legal document retrieval system that leverages Large Language Models to categorize and summarize court judgments from Sri Lanka's Supreme Court and Court of Appeal. The system architecture combines a serverless data pipeline with a web application featuring vector-based search capabilities, delivering an accessible interface for traditional filtering and natural language queries.
Results demonstrate that LLMs are highly effective at categorizing and summarizing legal documents, with these outputs significantly enhancing document indexing and retrieval. GPT-4o achieved exceptional performance with an F1 score of 0.947 for document categorization, substantially outperforming other tested models. The same model demonstrated strong summarization capabilities with ROUGE-1 and ROUGE-2 scores of 0.351 and 0.238, respectively, while maintaining a balanced compression ratio of 0.252 that preserves essential legal information. User testing confirmed that the system successfully addresses the core challenges identified by stakeholders, providing reliable access to legal documents even during official website outages.
This research represents a significant advancement in democratizing access to legal information in Sri Lanka. Beyond immediate benefits to legal practitioners and students, the system establishes a technical framework for responsibly applying artificial intelligence to enhance legal research capabilities in developing countries. By improving access to legal precedents, this work strengthens legal literacy and the rule of law—demonstrating how modern technology can address fundamental challenges in legal information systems.