-> What it does A multilingual legal research assistant for Indian citizens and businesses. Ask in Hindi, Tamil, Marathi (or 9 other Indian languages) — by text or voice — and get structured, citation-backed legal answers with compliance checklists, penalties, and source documents. Every answer is verified against retrieved sources before reaching the user.

-> How we built it Built entirely on Databricks — PDF ingestion → Delta table → Vector Search → Llama 3.3 70B. Added AI4Bharat IndicTrans2 for Indic↔English translation, BAAI/bge-reranker-base cross-encoder for precision reranking, an LLM-as-Judge hallucination guard, and a browser-native Web Speech API for voice input across 12 languages.

-> Challenges we ran into Databricks reranker endpoint unavailable — pivoted to local cross-encoder inference IndicTrans2 returning pandas objects instead of strings — required str() guards throughout Legal PDF chunking — built a custom heading-stack algorithm to preserve Section → Chapter → Article hierarchy Whisper pip conflicts on Databricks — switched to browser Web Speech API, which was actually faster -> Accomplishments that we're proud of Full multilingual RAG pipeline across 12 Indian languages, end-to-end Real cross-encoder reranking that demonstrably changes result ordering Two-layer hallucination guard — the answer is verified before the user ever sees it 2,325 structured chunks indexed from 22+ real Indian regulatory documents -> What we learned Retrieval quality beats prompt engineering. Unicode script detection beats language libraries for Indic scripts. LLM-as-Judge works surprisingly well when given a strict output format. And legal documents need domain-aware chunking — generic splitters destroy the structural relationships that make law meaningful.

-> What's next for Nyaya-Biz AI Expanding to GST, Labour Codes, and Companies Act. Integrating case law from High Courts. Building a WhatsApp interface so users can ask legal questions in the app they already use daily.

Built With

  • ai
  • ai4bharat
  • apis
  • bge
  • databases
  • delta-tables
  • face
  • faiss
  • hugging
  • indictrans2
  • indictranstoolkit
  • javascript
  • langchain
  • langdetect
  • languages
  • llama
  • model
  • models
  • openai
  • pandas
  • platform
  • platforms
  • pypdf
  • python
  • pytorch
  • re-ranker
  • serving
  • sql
  • streamlit
  • transformers
  • whisper
Share this project:

Updates