Final MajorProject Report
Final MajorProject Report
Submitted to
BY
Srijan Kundu Roll No: 22051202
Preetesh Kumar Singha Roll No: 22052653
Rajat Kumar Panda Roll No: 22052923
Sk Sadat Hossen Roll No: 22052679
Swapnil Goswami Roll No: 22052076
Rohan Chattopadhyay Roll No: 22051604
November 2025
CERTIFICATE
This certifies that the project report entitled ”AI-Powered Legal Assistance and Court Study
System”, submitted by students of the 2022–2026 Batch (Srijan Kundu - 22051202, Preetesh
Kumar Singha - 22052653, Rajat Kumar Panda - 22052923, Sk Sadat Hossen - 22052679, Swapnil
Goswami - 22052076, Rohan Chattopadhyay - 22051604), represents bona fide work carried out
under my supervision in partial fulfillment of requirements for the Bachelor of Technology degree
in Computer Science and Engineering at the School of Computer Engineering, KIIT Deemed to
be University.
Date of Evaluation:
Examiner’s Name:
Signature:
1
ACKNOWLEDGEMENT
We express sincere gratitude to our project guide, Mr. Rakesh Rai, whose expert mentorship
and consistent guidance proved invaluable in completing this research. His insights in artificial
intelligence, multimodal systems, and legal informatics inspired innovative approaches throughout
the development process.
We thank Prof. Biswajit Sahoo, Dean, School of Computer Engineering, KIIT, for providing
the necessary academic infrastructure and institutional support. Our appreciation extends to all
faculty members whose teachings enabled practical application of computer science fundamentals
in this legal AI system.
We acknowledge classmates and early testers who provided valuable feedback, significantly
enhancing system functionality and robustness. Finally, we thank our families for their unwavering
support, motivation, and patience throughout this project’s development.
2
ABSTRACT
The Indian legal system’s complexity creates significant barriers for citizens and students seeking to
understand judicial reasoning, interpret case laws, and access structured legal information. Modern
advancements in large language models (LLMs) offer transformative opportunities to democratize
legal knowledge through accessible, interactive platforms.
This project presents an AI-Powered Legal Assistance and Court Study System,
integrating legal verdict simulation, AI-driven conversations, voice-based multimodal guidance,
document analysis, and contextual referencing via the IndianKanoon API. The system comprises
three core components: (1) Court Trial Simulation Module using Google Gemini 2.5 Flash for
generating structured AI verdicts including argument summaries, factual findings, and final orders;
(2) Nyay Mitra – AI Legal Chat Companion, an intelligent conversational agent providing
legal query assistance, procedural clarifications, and awareness using statutory references; and
(3) AI Voice Assistant Module, a multimodal voice-driven system powered by Groq LLMs
(Llama-3, Gemma) supporting voice input, document uploads, and real-time legal insights with
transcript generation.
The platform implements secure authentication using scrypt, an administrative dashboard for
monitoring user activity, and comprehensive document processing pipelines utilizing pdfplumber,
PyPDF2, PyTesseract, FAISS vector search, sentence-transformers, and SpeechRecognition. This
research demonstrates how artificial intelligence can revolutionize legal education, improve citizen
access to legal knowledge, support exam preparation, facilitate legal research, and contribute to
India’s digital justice ecosystem.
3
Contents
List of Figures 6
List of Tables 6
1 Introduction 7
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Background and Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Scope and Significance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Report Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Literature Review 9
2.1 Digital Legal Systems Evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 AI in Legal Research and Reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Natural Language Processing for Legal Documents . . . . . . . . . . . . . . . . . . 9
2.4 Multimodal AI and Document Comprehension . . . . . . . . . . . . . . . . . . . . 9
2.5 Speech-Based Legal Assistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.6 OCR for Legal Document Digitization . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.7 Legal Search Engines and APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.8 Gap Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Technologies Used 11
3.1 Web Development Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 AI and NLP Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Document Processing and OCR Technologies . . . . . . . . . . . . . . . . . . . . . 11
3.4 Voice and Speech Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.5 Embedding, Indexing, and Semantic Search . . . . . . . . . . . . . . . . . . . . . . 11
3.6 Security and Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.7 Front-End Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4 System Architecture 13
4.1 High-Level Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 System Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.3 Backend Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4 AI Model Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.5 Document Processing Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.6 Storage and Retrieval Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.7 Security Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4
5 Implementation 16
5.1 User Authentication System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Court Trial Simulation Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Nyay Mitra Chatbot Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.4 Voice Assistant Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.5 Document Upload and OCR Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.6 Admin Portal Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
7 Screenshots 20
References 26
5
List of Figures
List of Tables
6
1 Introduction
1.1 Overview
The Indian legal system, comprising criminal, civil, constitutional, property, administrative,
corporate, and family law branches, represents one of the world’s most comprehensive judicial
frameworks. Despite this structural richness, legal information accessibility remains severely
limited for substantial population segments. Complex judicial language, lengthy case files, and
resource-intensive legal research create significant barriers for ordinary citizens. Concurrently,
artificial intelligence—particularly multimodal systems and natural language processing—has
witnessed remarkable advancement. Models including Google Gemini, Meta LLaMA, and Gemma
now process text, images, audio, PDFs, and structured information simultaneously, enabling
transformative applications in legal education and public awareness.
The AI-Powered Legal Assistance and Court Study System addresses this critical
gap by providing structured legal insights, AI-driven case verdict simulations, interactive legal
conversations, and voice-based multimodal guidance. This system bridges the divide between
complex legal knowledge and public accessibility through innovative technological integration.
7
1.4 Objectives
Primary Objectives: (1) Create an AI-powered platform for learning court case structures; (2)
Generate simulated judgments using advanced LLMs; (3) Provide conversational legal guidance
using real case law data; (4) Offer voice-based multimodal legal interaction.
Secondary Objectives: Improve legal literacy; assist visually impaired or illiterate users
through voice; simplify legal document interpretation; help students prepare for exams and moot
courts.
8
2 Literature Review
2.1 Digital Legal Systems Evolution
Digital legal systems emerged in the 1960s with database indexing, expanding to include document
retrieval, online case libraries, electronic filing (e-courts), automated docket management, digital
signature validation, and machine-readable databases. Global platforms—LexisNexis, Westlaw,
CourtListener, BAILII, CanLII, Harvard CaseLaw Access Project—pioneered online case law
access. In India, digital legal access grew through India Code Portal (Central legislations), Judis
(Supreme Court/High Court judgments), IndianKanoon (legal search engine), e-Courts Mission
Mode Project (court process digitization), and National Judicial Data Grid (NJDG) for pendency
statistics. However, these platforms provide raw legal text lacking simplified explanations,
conversational assistance, structured analysis, multimodal capability, and voice interaction.
9
conversations. Voice AI potential includes reading case files aloud, helping visually impaired
persons, enabling hands-free legal learning, and answering procedural queries. This project’s
Groq LLMs integration supports voice input (SpeechRecognition), voice output (gTTS), legal
multimodal Q&A, and conversation transcripts.
10
3 Technologies Used
This chapter presents comprehensive technology integration spanning web development, machine
learning, document processing, natural language processing, multimodal AI, and audio systems.
11
FAISS (Facebook AI Similarity Search): Enables fast vector retrieval, legal document
clustering, and semantic searches through large datasets.
12
4 System Architecture
The architecture integrates multimodal AI reasoning, document processing, conversational AI, and
dynamic web interfaces through seven major components: User Interface Layer, Backend Layer
(Flask), AI Model Layer, Data Processing Layer, Storage and Retrieval Layer, Admin Monitoring
Layer, and Security Layer.
13
4.6 Storage and Retrieval Architecture
Platform stores user credentials, feedback, logs, and admin data using lightweight SQLite database.
Embedding-based retrieval using FAISS enables legal topic searches, user query clustering, and
improved chatbot context.
14
User Input → Preprocessing → AI Processing
→ Response Generation → Output Rendering
15
5 Implementation
This chapter details component implementation including module design, algorithms, workflows,
and integration steps combining web development, AI API integration, multimodal document
processing, authentication systems, and audio-based interaction.
16
5.6 Admin Portal Implementation
Admin panel displays registered users, feedback ratings, most selected case categories, and usage
logs. Streamlit generates interactive visualizations.
17
6 Testing, Results and Discussion
Comprehensive testing ensured robustness, reliability, and usability across Court Trial Simulation,
Chatbot Functionality, Voice Assistant, OCR Engine, Authentication System, and Admin Portal
modules.
18
appreciated multimodal functionality and found the system significantly improved their under-
standing of legal concepts.
6.7 Discussion
The system successfully met all design objectives: accurate AI verdicts, reliable conversational
assistance, efficient multimodal support, and fast voice responses. The integration of IndianKanoon
API with LLM reasoning proved particularly effective in providing contextually grounded legal
information.
Identified Limitations: (1) AI generates simplified educational verdicts, not legally binding
judgments; (2) OCR accuracy decreases for severely degraded or handwritten documents; (3)
IndianKanoon API rate limits require request throttling; (4) System requires internet connectivity
for AI API access; (5) Voice recognition accuracy varies with accent and audio quality.
Strengths: (1) First comprehensive AI-based Indian legal education platform; (2) Effective
multimodal document processing; (3) Accessible voice interface for diverse user groups; (4) Real
legal database integration ensures factual accuracy; (5) Modular architecture allows easy feature
expansion.
Overall, the system provides a robust foundation for AI-driven legal learning tools, demon-
strating significant potential for democratizing legal education in India.
19
7 Screenshots
This chapter presents visual documentation of the system interface and functionality.
20
[Trial Simulation Input Page Screenshot]
21
[Nyay Mitra Chatbot Screenshot]
22
[Admin Dashboard Screenshot]
23
8 Conclusion and Future Scope
8.1 Conclusion
The AI-Powered Legal Assistance and Court Study System successfully demonstrates the transfor-
mative potential of artificial intelligence in legal education and public legal awareness. This research
project achieved comprehensive integration of AI-based trial simulation, conversational legal
chatbot, voice-based multimodal legal assistant, document and OCR analysis, user authentication,
and administrative monitoring capabilities.
The system addresses critical gaps in India’s legal education ecosystem by providing accessible,
interactive, and technologically advanced tools for understanding complex legal concepts. Through
integration of Google Gemini 2.5 Flash for verdict simulation, Groq LLMs for conversational
and voice interaction, and IndianKanoon API for legal database access, the platform delivers
contextually relevant, factually grounded legal insights.
Key achievements include: (1) Development of India’s first comprehensive AI-driven legal
education platform combining multiple interaction modalities; (2) Successful implementation of
structured verdict generation mimicking judicial reasoning processes; (3) Creation of accessible
voice-based legal assistance for visually impaired and low-literacy users; (4) Integration of real
Indian case law databases ensuring factual accuracy; (5) Demonstration of practical applications
for multimodal AI in specialized legal domains.
The system enhances legal education for law students, supports exam preparation and moot
court practice, improves public access to legal knowledge, assists in preliminary legal research,
and contributes to India’s digital justice ecosystem advancement. Testing results validate system
effectiveness with high user satisfaction ratings and robust performance metrics across all modules.
This research establishes a foundational framework for future legal-tech innovations, demon-
strating how interdisciplinary approaches combining artificial intelligence, natural language pro-
cessing, multimodal learning, and legal informatics can democratize access to complex knowledge
domains. The project represents a significant step toward bridging the digital divide in legal
education and empowering citizens with legal literacy tools.
24
institution learning management systems.
8.2.3 Domain Expansion
Specialized Legal Areas: Dedicated modules for intellectual property law, tax law, and cyber
law; integration with specialized legal databases (trademark, patent, tax tribunals); development
of domain-specific legal reasoning engines; compliance checking tools for regulatory frameworks.
Professional Tools: Contract analysis and review capabilities; legal brief generation
assistance; citation checking and validation; legal research report compilation; integration with
Supreme Court AI tools (SUVAS, SUPACE).
8.2.4 Accessibility Enhancements
Regional Language Support: Complete vernacular language interfaces for all Indian constitu-
tional languages; dialect recognition in voice assistant; culturally contextualized legal explanations;
multilingual document processing and translation.
Platform Expansion: Native mobile applications (Android/iOS) with offline capabilities;
progressive web application (PWA) implementation; integration with messaging platforms (What-
sApp, Telegram) for chatbot access; desktop application with enhanced processing capabilities.
8.2.5 Advanced Features
Machine Learning Enhancements: Case outcome prediction models trained on historical
Indian judicial data; argument strength assessment using machine learning; pattern recognition
in judicial decision-making; personalized learning path recommendations based on user interaction
patterns.
Integration Capabilities: API development for third-party integration; plugin systems for
legal research platforms; interoperability with legal practice management software; connection with
bar council databases and resources.
8.2.6 Research Applications
Legal Analytics: Judicial behavior analysis across different courts and judges; temporal trend
analysis in legal interpretations; comparative analysis of similar cases across jurisdictions; statistical
analysis of case pendency and resolution patterns.
Educational Research: Effectiveness studies of AI-assisted legal learning; comparative
analysis with traditional legal education methods; user engagement pattern analysis; learning
outcome assessment frameworks.
The proposed enhancements would significantly expand system capabilities while maintaining
the core principles of accessibility, accuracy, and educational focus. Future iterations could
incorporate emerging technologies including quantum computing for complex legal computations,
blockchain for tamper-proof legal record maintenance, and advanced biometric authentication for
secure legal consultations.
Implementation of these enhancements would require collaborative efforts involving legal pro-
fessionals, AI researchers, educational institutions, judicial authorities, and technology developers,
contributing to India’s vision of accessible, efficient, and technology-enabled justice delivery
systems.
25
References
1. Aletras, N., Tsarapatsanis, D., Preoţiuc-Pietro, D., & Lampos, V. (2016). Predicting judicial
decisions of the European Court of Human Rights: A natural language processing perspective.
PeerJ Computer Science, 2, e93.
2. Katz, D. M., Bommarito, M. J., & Blackman, J. (2017). A general approach for predicting the
behavior of the Supreme Court of the United States. PLOS ONE, 12(4), e0174698.
3. IndianKanoon. (2025). Indian Case Law and Legal Information Platform. Retrieved from
[Link]
4. Google. (2024). Gemini API Documentation: Multimodal AI Model. Google AI Developer
Documentation.
5. Groq. (2024). Groq LPU Inference Engine: Developer Documentation. Groq Inc.
6. Meta AI. (2024). Llama 3 and Llama 3.1: Open Foundation and Fine-Tuned Chat Models.
Meta AI Research.
7. Google DeepMind. (2024). Gemma: Open Models Based on Gemini Research and Technology.
Google Research.
8. Zhang, A. C., & El-Kishky, A. (2020). Legal-BERT: The Muppets straight out of Law School.
arXiv preprint arXiv:2010.02559.
9. Chalkidis, I., Fergadiotis, M., Malakasiotis, P., Aletras, N., & Androutsopoulos, I. (2020).
LEGAL-BERT: The Muppets straight out of Law School. In Findings of EMNLP 2020.
10. Smith, R. (2007). An Overview of the Tesseract OCR Engine. Proceedings of the Ninth
International Conference on Document Analysis and Recognition, 2, 629-633.
11. Python Software Foundation. (2024). Python Documentation: SpeechRecognition Library.
Retrieved from [Link]
12. Google. (2024). gTTS: Google Text-to-Speech Python Library Documentation. Retrieved from
[Link]
13. Bojanowski, J., et al. (2018). pdfplumber: Plumb a PDF for detailed information about each
text character, rectangle, and line. Retrieved from [Link]
14. Johnson, J., Douze, M., & Jégou, H. (2019). Billion-scale similarity search with GPUs. IEEE
Transactions on Big Data, 7(3), 535-547.
15. Reimers, N., & Gurevych, I. (2019). Sentence-BERT: Sentence Embeddings using Siamese
BERT-Networks. In Proceedings of EMNLP-IJCNLP 2019.
16. National Informatics Centre. (2024). e-Courts Mission Mode Project: Implementation Status.
Ministry of Law and Justice, Government of India.
17. Supreme Court of India. (2024). SUPACE and SUVAS: Supreme Court Portal for Assistance in
Court’s Efficiency and Supreme Court Vidhik Anuvaad Software. Supreme Court E-Committee.
18. Pallets Projects. (2024). Flask Web Framework Documentation. Retrieved from
[Link]
19. Streamlit Inc. (2024). Streamlit: The Fastest Way to Build and Share Data Apps. Retrieved
from [Link]
20. Percival, C., & Josefsson, S. (2016). The scrypt Password-Based Key Derivation Function. RFC
7914, Internet Engineering Task Force (IETF).
26
Appendix A: System Installation Guide
Prerequisites
• Python 3.8 or higher
• pip package manager
• Virtual environment (recommended)
• API Keys: Google Gemini API, Groq API, IndianKanoon API
Installation Steps
1. Clone repository: git clone <repository-url>
2. Create virtual environment: python -m venv venv
3. Activate virtual environment: source venv/bin/activate (Linux/Mac) or
venv\Scripts\activate (Windows)
4. Install dependencies: pip install -r [Link]
5. Configure environment variables in .env file
6. Initialize database: python init [Link]
7. Run application: python [Link]
8. Access system at [Link]
27
Appendix B: API Configuration
Environment Variables
Create .env file in project root with following variables:
GEMINI_API_KEY=your_gemini_api_key_here
GROQ_API_KEY=your_groq_api_key_here
INDIANKANOON_API_KEY=your_indiankanoon_key_here
SECRET_KEY=your_flask_secret_key_here
DATABASE_URL=sqlite:///legal_ai.db
28
Appendix C: Sample Code Snippets
Verdict Generation Function
def generate_verdict(case_data):
prompt = f"""
Generate structured legal verdict for:
Category: {case_data[’category’]}
Plaintiff Statement: {case_data[’plaintiff’]}
Defendant Statement: {case_data[’defendant’]}
Documents: {case_data[’documents’]}
29