Inspiration
Access to justice in India is often limited by two major barriers: complex legal language and language diversity. Most citizens are unable to understand legal provisions like BNS 2023 or identify the correct FIR sections for their situation. We wanted to build a system where anyone, regardless of education or language, could simply speak their problem and receive clear, actionable legal guidance.
What it does
Nyaya-Sahayak is a voice-first AI legal assistant that allows users to describe incidents in their native language and receive simplified legal explanations and FIR guidance. It provides two core features:
BNS Explanation: Converts complex legal text into simple, easy-to-understand language FIR Category Helper: Maps real-world incidents to relevant BNS sections and provides step-by-step FIR filing guidance
The system supports multilingual voice input and voice output, making it accessible to non-English speakers.
How we built it
We designed an end-to-end AI pipeline:
Speech-to-Text + Translation (Sarvam AI) for multilingual input Sentence Transformers (MiniLM) to generate embeddings FAISS for similarity search over BNS sections LLaMA 3.1 (via Databricks) for reasoning and explanation generation Text-to-Speech for voice output
The backend is powered by Databricks, using Spark for ETL, Delta Lake for storage, and MLflow for model serving. The frontend is built using Streamlit for an interactive demo.
Challenges we ran into
Handling multilingual voice input with varying accents and noise Ensuring accurate retrieval of legal sections using FAISS Reducing hallucinations in LLM-generated legal advice Maintaining low latency for real-time voice interactions Aligning outputs to be legally correct yet simple
Accomplishments that we're proud of
Built a fully working voice-to-legal guidance pipeline Enabled end-to-end multilingual interaction (input + output) Achieved reliable mapping from user queries to relevant BNS sections Created a system that feels like a real-world usable product, not just a prototype
What we learned
Combining retrieval (FAISS) with generation (LLMs) significantly improves reliability Multilingual AI systems require careful handling of translation + context User experience (clarity, simplicity) matters more than model complexity Building AI for real-world impact requires balancing accuracy, usability, and scalability
What's next for Nyaya Sahayak
Integrate with government and police FIR systems Expand to more Indian languages and dialects Add legal document generation (FIR drafts, complaints) Improve accuracy with fine-tuned legal models Deploy as a mobile-first application for wider accessibility
Built With
- 3.1
- 8b
- cachespark
- deltalake
- faiss
- llama
- meta
- open-source
- sarvam
Log in or sign up for Devpost to join the conversation.