Project Story Inspiration On July 1, 2024, India underwent a historic legal overhaul, replacing the century-old IPC with the Bharatiya Nyaya Sanhita (BNS). For the common citizen, this transition created a massive "information void." We saw people on platforms like Reddit and Twitter struggling to understand if their ongoing cases were still valid, which new sections applied to them, and how to access legal aid. We built Nyaya-Sahayak to be a bridge between complex legal codes and the everyday person, ensuring that justice isn't just for those who can afford expensive consultants.
What it does Nyaya-Sahayak is an AI-powered legal co-pilot that:
Simplifies Documents: Upload legal notices or FIRs; our system uses OCR and RAG to break them down into layman's terms.
Talks Your Language: Using Sarvam AI, it supports voice-to-voice interaction in 22+ Indian languages.
Maps the Transition: Instantly converts IPC sections to BNS counterparts (and vice versa) to ensure procedural accuracy.
Connects to Welfare: Matches user profiles against 4,600+ government schemes (MyScheme.gov.in) to find legal aid or financial support.
Grounds in Truth: Every answer is backed by the official BNS 2023 text and the Indian Constitution, preventing AI hallucinations.
How we built it The core engine is hosted on Databricks, leveraging its unified data and AI platform:
LLM: We used Llama 3.3 70B served via Databricks Model Serving for high-reasoning legal analysis.
RAG: Legal chunks and scheme data are indexed using Databricks Vector Search.
Voice & Translation: Integrated Sarvam AI (Saaras & Bulbul v3) for state-of-the-art Indic language processing.
Backend: A FastAPI app deployed as a Databricks App to handle OCR (PyMuPDF) and orchestration.
Frontend: A responsive Next.js 14 interface with real-time voice recording and markdown rendering.
Challenges we ran into The biggest challenge was evaluation. Legal advice cannot afford "hallucinations." We solved this by implementing the BhashaBench-Legal framework, running a 30-question benchmark across murder, property, and constitutional law. Using MLflow, we tracked our Hit Rate (achieving >80%) and latency to ensure the tool was both accurate and performant.
Accomplishments that we're proud of We successfully scaled our recommendation engine to handle over 4,600 government schemes, making it one of the most comprehensive welfare-matching tools built in a hackathon. We are also proud of the seamless multilingual voice integration, which allows a farmer in rural Maharashtra or a laborer in Tamil Nadu to access the law using just their voice.
What we learned We learned that the "Spirit of the Law" is just as important as the letter. Building this required us to understand not just the BNS (crimes) but also the BNSS (procedure) and BSA (evidence). We learned how to structure complex hierarchical legal data into vector embeddings that maintain context.
What's next for JARVIS We plan to build the "90-Day Tracker"—a feature that automatically pings police officers for case updates as mandated by the new BNSS laws. We also aim to add a BSA Evidence Vault to help citizens generate legally admissible "Section 63 Certificates" for digital evidence like WhatsApp chats.
Built With
- bhashabench-lega
- databricks-vector-search
- languages:-python
- mlflow-frameworks:-fastapi
- next.js-14
- pymupdf-(ocr)
- sarvam-ai-(stt/tts/translation)
- sql-ai/ml:-llama-3.3-70b
- tailwind-css-tools:-databricks-apps
- tesseract
- typescript
Log in or sign up for Devpost to join the conversation.