Design and Evaluating a Real-Time Legal Verdict Prediction System Using Transformer Models with Explainable AI

The rising amount of legal records is a major challenge facing legal practitioners, hence there is need to design smart tools to enable quick analysis of cases and sound judgments. The paper outlines the architecture, deployment and critical testing of a new real-time Application Programming Interface designed to forecast real-life legal decision-making verdicts (Accepted, Rejected) studying only brief case descriptions. To accomplish this goal of classification, the system is based on the use of a Legal-BERT model which is a powerful transformer architecture carefully pre-trained on a large set of domain-specific corpora. The second crucial aspect of this study will be the inclusion of an explainability module that will allow seeing how the model makes its choices using LIME (Local Interpretable Model-agnostic Explanations) in a novel way of explaining the working mechanism of the model by explicitly pointing to the important terms in the source material with the help of its inner workings. Fast API framework in the Python language was prudently implemented in the provision of the API hence its performance is robust and operational latency is minimal. Testing was defined with manually curated 29 English legal cases summarization, obtaining an overall accuracy of 85.31 percent, and both precision and recall is at 85.71 percent on class Accepted that means the F1-score is 85.71 percent. These findings verify the practicability of the methodology, though this performance on a small dataset is noted as a proof-of-concept rather than a generalizable benchmark.

Paper

Full text

PDF

Design and Evaluating a Real-Time Legal Verdict Prediction System Using Transformer Models with Explainable AI

Semantic Scholar · 2025

Abstract

The rising amount of legal records is a major challenge facing legal practitioners, hence there is need to design smart tools to enable quick analysis of cases and sound judgments. The paper outlines the architecture, deployment and critical testing of a new real-time Application Programming Interface designed to forecast real-life legal decision-making verdicts (Accepted, Rejected) studying only brief case descriptions. To accomplish this goal of classification, the system is based on the use of a Legal-BERT model which is a powerful transformer architecture carefully pre-trained on a large set of domain-specific corpora. The second crucial aspect of this study will be the inclusion of an explainability module that will allow seeing how the model makes its choices using LIME (Local Interpretable Model-agnostic Explanations) in a novel way of explaining the working mechanism of the model by explicitly pointing to the important terms in the source material with the help of its inner workings. Fast API framework in the Python language was prudently implemented in the provision of the API hence its performance is robust and operational latency is minimal. Testing was defined with manually curated 29 English legal cases summarization, obtaining an overall accuracy of 85.31 percent, and both precision and recall is at 85.71 percent on class Accepted that means the F1-score is 85.71 percent. These findings verify the practicability of the methodology, though this performance on a small dataset is noted as a proof-of-concept rather than a generalizable benchmark.

Similar papers

© 2026 NYSGPT2525 LLC