
Legal Tech & NLP ยท 2025
Legal Contract Analyzer
An end-to-end NLP/ML pipeline that accepts commercial contracts in PDF or TXT format, segments them into clauses, classifies risk levels, retrieves governing statutory sections from the Indian Contract Act 1872 via hybrid search, and outputs structured risk reports.
The Challenge
Manual contract review is expensive and error-prone, particularly when evaluating compliance against Indian statutory mandates. The challenge was building an explainable, hallucination-free legal intelligence pipeline that surfaces exact statutory cross-references for every high-risk clause.
Data Foundation
9,400+ labeled commercial contract clauses used for primary clause-type pattern detection.
151 hand-crafted Indian legal clauses for jurisdiction-specific training (Arbitration, Indemnity).
185 legal sections parsed, indexed, and vectorized for statute mapping.

3-Layer Hybrid Retrieval
Risk explanations are powered by a 3-layer hybrid retriever: explicit statute mapping rules, FAISS dense semantic embeddings using InLegalBERT, and BM25 sparse keyword matching, fused through Reciprocal Rank Fusion (RRF). The pipeline generates plain-English risk assessments backed by exact legal citations without relying on ungrounded generative LLMs.
Indian Contract Act 1872 indexed
Clause classifications supported
Hybrid retrieval with RRF fusion