Skip to main content Skip to navigation

LegalAI -Your own legal assistant

LegalAI is an AI-powered legal assistant that analyzes case files, extracts clauses, summarizes judgments, and finds similar cases instantly using vector search and NLP.

  • LegalAI interface Upload PDF, auto-summary, Ask Anything features shown.

  • prototype showing legal clause extraction and case summary generation in localhost.

  • User asks a free-form legal question and get answer in form of legal basis.

  • T5-based summarizer generating concise legal summaries from multi-page court judgments.

  • FAISS vector search retrieving similar past cases using semantic embeddings for user queries.

What it does

LegalAI simplifies legal research by summarizing complex documents, extracting key clauses, and retrieving similar past cases — making law more accessible and efficient, especially for underrepresented groups.


Your inspiration

While building AI tools for social impact, I realized legal research is time-consuming and opaque. Many people, especially from marginalized backgrounds, can’t afford legal guidance. I wanted to use AI to bridge that gap by simplifying and accelerating legal understanding, inspired by real-world problems faced in India’s judicial system.


How it works

LegalAI uses a custom-trained summarization model (t5-base) to condense lengthy judgments. It extracts clauses using rule-based patterns and NLP, and retrieves similar past cases using FAISS + MiniLM sentence embeddings. Users upload a legal document (PDF), and the app returns summaries, case insights, and legal clauses. It’s built in Python using Hugging Face models, FAISS for semantic search, and Streamlit for a fast web interface.


Design process

I began by fine-tuning a T5 model on Indian legal texts, then built a clause extractor to highlight obligations and risks. I used FAISS with Sentence Transformers to retrieve similar cases based on semantic queries. After validating everything in Jupyter and Streamlit, I added PDF upload, clause parsing, and summaries. I improved accuracy using longer chunk matching and fine-tuned summaries for legal tone. The final version is modular, offline-capable, and end-user friendly.


How it is different

Unlike generic AI assistants, LegalAI is tailored for legal analysis. It uses AI models trained on legal data, supports offline semantic search via FAISS, and simplifies law for non-lawyers. Most legal tech is either expensive or manual — LegalAI is open-source, fast, and built to democratize access to justice.


Future plans

I aim to extend LegalAI with multilingual support (for Indian languages), integrate court APIs for real-time case tracking, and offer a chatbot layer for live query answering. I also plan to collaborate with NGOs or law schools to deploy it as a free legal help tool for the public.


Awards


End of main content. Return to top of main content.

Select your location