Engineering & Research

LawAssist Research Lab

Deep dives into the NLP, RAG, and LLM fine-tuning pipelines built to understand Indian jurisprudence. We build transparently, sharing our experiments and metrics.

RAG AlignmentIn Progress

Grounding LLMs in Indian Kanoon: Minimizing Precedent Hallucinations

General-purpose models frequently hallucinate case citations (e.g. creating fake SCC or AIR citations). We outline our dual-embedding validation protocol that grounds model reasoning in official Indian Kanoon documents, verifying every link prior to showing results.

Key Experiment MetricHallucination rate reduced to <0.8% in testing
Fine-TuningCompleted

Fine-Tuning Qwen 3B for Section & Act Parameter Extraction

We evaluated Llama 3.2 3B and Qwen 2.5 3B models on extracting statutory parameters from raw pleadings. By fine-tuning Qwen on a curated corpus of 12,000 Indian petitions, we optimized the model to flag Section 138 NI Act, Section 18 RERA, and Section 420 IPC issues with high precision.

Key Experiment Metric94.2% F1 score on Act-Section mapping
Data EngineeringCompleted

High Court PDF Parsing & Clean Text Extraction Pipelines

High Court petitions and orders frequently contain multi-column formats, bilingual scripts (English and Devnagari/Tamil/etc.), and scanning artifacts. We built a custom PyMuPDF and pdfplumber parsing pipeline that strips page headers and isolates operative facts.

Key Experiment MetricParsed 200+ page filings in under 1.8 seconds
Search ScienceIn Progress

Legal Re-ranking: Transitioning from Keyword to Semantic Relevance

Traditional databases index matching keywords, failing when advocates use synonymous terms (e.g. "delay in flat" vs "non-delivery of possession"). We discuss our LLM re-ranking model which parses Kanoon search output and ranks judgments by fact similarity.

Key Experiment Metric42% improvement in precedent relevance score
Model Infrastructure

Why we host local open-source models

Using external commercial LLM APIs exposes client case facts to foreign data loops. To ensure complete privacy and zero data leakage, we deploy self-hosted models (Qwen 3B, Llama 3.2) in secure, private containers. No external companies ever see your pleadings.

Read Our Security Protocols