
500 million Indians cannot afford a lawyer. When a landlord cheats you, when your employer withholds wages, when a defective product harms you — most citizens have no idea what their legal rights are. Legal aid is expensive, inaccessible, and delivered in English that most people don't understand. NyayaMitra changes that. NyayaMitra is a Retrieval-Augmented Generation (RAG) powered legal aid agent built on Gemma 4 31B via Google AI Studio. It ingests three foundational Indian legal statutes — Transfer of Property Act 1882, Consumer Protection Act 2019, and Code on Wages 2019 — chunked into 566 segments and stored in ChromaDB. When a user asks a question, LangChain retrieves the most relevant legal sections and passes them to Gemma 4 31B, which generates grounded, cited answers — not hallucinations. The Gradio interface offers three features: (1) Document Analyzer — upload any contract or agreement and get plain-language clause analysis with risk flags; (2) Ask Your Rights — ask any legal question and receive answers citing actual Indian law sections; (3) Draft a Letter — describe your dispute and receive a formal legal notice ready to send. Gemma 4 31B was chosen specifically for its long-context window and instruction-following capability, which are essential for parsing dense legal text and generating structured legal responses. The entire pipeline runs in Google Colab with zero local setup required, making it accessible to developers and citizens alike. NyayaMitra targets both the Unicorn Track and the Gemma 4 Bonus Challenge. The project is open source under MIT license and built solo in under 48 hours.
13 Jul 2026