PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
May 4, 20260 citationsOpen Access

Legal Buddy: An AI-Powered Courtroom Simulation And Legal Analysis Platform Using Retrieval-Augmented Generation

View Full Paper
SVSatuluri Rajeev VarmaKTKamlesh Tiwari

Key Points

  • This study aims to enhance access to legal guidance by developing an AI-driven courtroom simulation platform.
  • Developed an AI platform called Legal Buddy utilizing a Retrieval-Augmented Generation framework.
  • Implemented a mock courtroom engine featuring dual AI roles of Opposing Counsel and Judge.
  • Conducted empirical evaluations on semantic retrieval and user usability testing.
  • Achieved a query classification accuracy of 90.5%.
  • Reduced AI output hallucination rates significantly compared to traditional LLMs.
  • Usability tests demonstrated 91% satisfaction with the platform's performance.

Abstract

Access to quality legal guidance remains out of reach for a large portion of the population, particularly in developing nations where the lawyer-to-citizen ratio is unfavorably low. This paper presents Legal Buddy, a comprehensive AI-powered legal analysis and adversarial courtroom simulation platform built to bridge that gap. The system is engineered around a Retrieval-Augmented Generation (RAG) pipeline that dynamically pro-cesses user-uploaded legal documents, embeds them semantically using Google's text-embedding-004 model, and grounds all AI-generated outputs in verified, document specific evidence rather than unconstrained model knowledge. A distinguishing feature is the stateful Adversarial Mock Courtroom Engine, which simulates live trial proceedings by instantiating dual AI roles — an Opposing Counsel and a scrutinising Judge — thereby com-pelling users to construct and defend legally coherent arguments under realistic judicial pressure. The backend is built on Python FastAPI with MongoDB for persistent vector storage, enabling full multi-tenant session isolation. All generative outputs from the integrated Google Gemini 1.5 Pro model are constrained through rigorous prompt conditioning to the IRAC (Issue, Rule, Applica-tion, Conclusion) analytical framework and Indian legal doctrine. Empirical evaluation confirms that the combination of seman-tic vector retrieval, heuristic domain classification, and IRAC conditioned generation substantially reduces hallucination rates compared to unconstrained LLM baselines. Query classification accuracy reaches 90.5accurate, and usability testing shows 91and extensible framework for deploying AI in legally sensitive, high-accountability environments while remaining accessible without institutional infrastructure. Index Terms — Retrieval-Augmented Generation, Large Language Models, Mock Courtroom Simula-tion, IRAC Framework, MongoDB Vector Storage, Indian Legal NLP, FastAPI, Cosine Similarity, LegalBERT, Named Entity Recognition.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Varma et al. (2026) studied this question.

synapsesocial.com/papers/69f837793ed186a739981914https://doi.org/10.5281/zenodo.19971371
Ask AI
Helpful
Bookmark
Share
View Full Paper