International Peer-Reviewed Journal•Open Access•ISSN 2456-8880
irejournals@gmail.com•+91-7433024337

Home / Current Issue / Paper 1718611

1718611 Vol 9 · Issue 12 Download Paper

LawMate : A Locally Deployable RAG System for Accessible Indian Legal Assistance Using TinyLlama and FAISS

Shreya Patil Pratik Nakashe Aditya Medhekar Sourabh Sadake Jyoti Bansode

Subject area: Science,Engineering and Technology  ·  Area of research: AI & ML

DOI: 10.64388/IREV9I12-1718611

Abstract

Access to Indian legal information remains limited for non-lawyers due to complex statutory language, fragmented resources, and high consultation costs. This paper presents LawMate, a lightweight Retrieval-Augmented Generation (RAG)–based legal assistant designed to provide citation-grounded responses for everyday legal queries. The system integrates TinyLlama (1.1B parameters) with FAISS-based se-mantic retrieval over official Indian legal documents, ensuring responses are generated strictly from retrieved context to reduce hallucination. A FastAPI backend and React-based frontend enable efficient local deployment on resource-constrained devices. Experimental evaluation demonstrates high retrieval relevance, low response latency, and practical usability for citizen-facing applications. The proposed architecture provides a scalable, low-resource solution for transparent and accessible legal assistance in the Indian context.

Keywords

Legal AI, Retrieval-Augmented Generation, TinyLlama, FAISS, Indian Law, Offline Chatbot, Semantic Search, FastAPI.

References

[1] N. Jain and G. Goel, “An Approach to Get Legal Assistance Using Artificial Intelligence,” in Proc. 8th Int. Conf. Reliability, Infocom Technologies and Optimization (ICRITO), Noida, India, Jun. 2020, pp. 768–771.

[2] A. Solanki, H. Main, D. Mehta, D. Kulkarni, and H. Dalvi, “Lawbot: An Enhanced Legal Information Retrieval System using RAG,” in Proc. IEEE Silchar Subsection Conference (SILCON), 2025.

[3] Nikita, E. Srivastav, A. Patel, A. Singh, R. Sharma, D. P. Rana, and R. G. Mehta, “LAWBOT: A Smart User Indian Legal Chatbot using Machine Learning Framework,” in Proc. IEEE Int. Conf. for Convergence in Technology (I2CT), Pune, India, Apr. 2024.

[4] A. Garlapati, H. Koutharapu, and N. Doddi, “Enhancing Public Access to Legal Knowledge in India: A Legal Chatbot Using Legal BERT, GPT-2, and Retrieval-Augmented Generation (RAG),” in Proc. IEEE Int. Conf. on Emerging Technologies and Applications (MPSec ICETA), 2025.

[5] S. Vakayil, A. J., D. S. Juliet, and S. Vakayil, “RAG-based LLM Chatbot using Llama-2,” in Proc. 7th Int. Conf. on Devices, Circuits and Systems (ICDCS), Coimbatore, India, Apr. 2024.

[6] NyayGuru, “NyayGuru: AI-powered legal assistant for India,” 2024. [Online]. Available: https://www.nyayguru.com

[7] IndiaGPT, “IndiaGPT: AI-powered legal assistant for multilingual legal guidance,” 2024. [Online]. Available: https://www.indiagpt.com

[8] LawbotPro, “LawbotPro: AI-driven legal automation and document generation,” 2024. [Online]. Available: https://www.lawbotpro.com

[9] D. Panchal et al., ”LawPal: A Retrieval Augmented Generation Based System for Enhanced Legal Accessibility in India,” arXiv:2502.16573, 2025.

[10] M. K. Singh et al., ”BharatLex: Custom AI Chatbot for Legal Query-Driven Using RAG and Optimized LLM Fusion,” Atlantis Press, 2025.

[11] S. K. Nigam et al., ”NyayaRAG: Realistic Legal Judgment Prediction with RAG under the Indian Common Law System,” arXiv:2508.00709, 2025.

[12] S. Ghosh et al., ”InLegalLLaMA: Indian Legal Knowledge Enhanced Large Language Model,” CEUR Workshop Proc., 2024.

[13] ” LegalBOT: A RAG and FAISS Hybrid Framework for Legal Case Intelligence,” IRJAEH, 2025.

[14] ” An Advanced AI-Powered Legal Advisor Chatbot for Rural India,” IJRPR, 2025.

[15] ” A Hybrid RAG-LLaMA Framework for Scalable and Accurate Inter-pretation of Legal Texts,” 2026.

[16] ” Accurate AI Assistance in Contract Law Using Retrieval-Augmented Generation,” IJSAI, 2025.

[17] ” RAG-Based Legal Document Assistant for Automated Legal Document Management and Advice,” IJSREM, 2025.

[18] P. Lewis et al., “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks,” in Advances in Neural Information Processing Systems (NeurIPS), 2020.

[19] S. Guu et al., “REALM: Retrieval-Augmented Language Model Pre-Training,” in Proc. ICML, 2020.

[20] J. Gao, C. Xiong, P. Bennett, and N. Craswell, “Neural Approaches to Conversational Information Retrieval,” Found. Trends Inf. Retr., vol. 16, no. 2–3, pp. 89–220, 2022.

[21] A. Johnson, M. Douze, and H. Je´gou, “Billion- scale similarity search with FAISS,” IEEE Trans. Big Data, vol. 7, no. 3, pp. 535–547, 2021.

[22] J. Devlin et al., “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” in Proc. NAACL-HLT, 2019.

[23] I. Beltagy, M. Peters, and A. Cohan, “Longformer: The Long -Document Transformer,” arXiv preprint arXiv:2004.05150, 2020.

[24] M. Zaheer et al., “Big Bird: Transformers for Longer Sequences,” in NeurIPS, 2020.

[25] H. Touvron et al., “LLaMA: Open and Efficient Foundation Language Models,” arXiv preprint arXiv:2302.13971, 2023.

[26] T. Brown et al., “Language Models are Few- Shot Learners,” in NeurIPS, 2020.

[27] A. Mallen et al., “When Not to Trust Language Models: Investigating Hallucinations in Retrieval-Augmented Systems,” arXiv, 2023.

[28] K. Kandpal et al., “Large Language Models Struggle to Learn Long-Tail Knowledge,” in ICML, 2022.

[29] N. Reimers and I. Gurevych, “Sentence-BERT: Sentence Embeddings using Siamese BERT- Networks,” in Proc. EMNLP, 2019.

[30] A. Chalkidis, I. Androutsopoulos, and N. Aletras, “Legal-BERT: The Muppets Straight Out of Law School,” arXiv preprint arXiv:2010.02559, 2020.

How to cite this paper

Shreya Patil, Pratik Nakashe, Aditya Medhekar, Sourabh Sadake, Jyoti Bansode "LawMate : A Locally Deployable RAG System for Accessible Indian Legal Assistance Using TinyLlama and FAISS" Iconic Research And Engineering Journals Volume 9 Issue 12 2026 Page 391-400 https://doi.org/10.64388/IREV9I12-1718611
Shreya Patil, Pratik Nakashe, Aditya Medhekar, Sourabh Sadake, Jyoti Bansode "LawMate : A Locally Deployable RAG System for Accessible Indian Legal Assistance Using TinyLlama and FAISS" Iconic Research And Engineering Journals, vol. 9, no. 12, Jun. 2026, doi: https://doi.org/10.64388/IREV9I12-1718611
Shreya Patil, Pratik Nakashe, Aditya Medhekar, Sourabh Sadake, Jyoti Bansode (2026). LawMate : A Locally Deployable RAG System for Accessible Indian Legal Assistance Using TinyLlama and FAISS. Iconic Research And Engineering Journals, 9(12). doi: https://doi.org/10.64388/IREV9I12-1718611
Shreya Patil, Pratik Nakashe, Aditya Medhekar, Sourabh Sadake, Jyoti Bansode "LawMate : A Locally Deployable RAG System for Accessible Indian Legal Assistance Using TinyLlama and FAISS" Iconic Research And Engineering Journals, vol. 9, no. 12, Jun. 2026. Crossref, https://doi.org/10.64388/IREV9I12-1718611
@article{1718611,
      author = {Shreya Patil, Pratik Nakashe, Aditya Medhekar, Sourabh Sadake, Jyoti Bansode},
      title = {LawMate : A Locally Deployable RAG System for Accessible Indian Legal Assistance Using TinyLlama and FAISS},
      journal = {Iconic Research And Engineering Journals},
      year = {2026},
      volume = {9},
      number = {12},
      pages = {391-400},
      issn = {2456-8880},
      url = {https://www.irejournals.com/formatedpaper/1718611.pdf},
      abstract = {Access to Indian legal information remains limited for non-lawyers due to complex statutory language, fragmented resources, and high consultation costs. This paper presents LawMate, a lightweight Retrieval-Augmented Generation (RAG)–based legal assistant designed to provide citation-grounded responses for everyday legal queries. The system integrates TinyLlama (1.1B parameters) with FAISS-based se-mantic retrieval over official Indian legal documents, ensuring responses are generated strictly from retrieved context to reduce hallucination. A FastAPI backend and React-based frontend enable efficient local deployment on resource-constrained devices. Experimental evaluation demonstrates high retrieval relevance, low response latency, and practical usability for citizen-facing applications. The proposed architecture provides a scalable, low-resource solution for transparent and accessible legal assistance in the Indian context.},
      keywords = {Legal AI, Retrieval-Augmented Generation, TinyLlama, FAISS, Indian Law, Offline Chatbot, Semantic Search, FastAPI.},
      month = {June},
      doi = {https://doi.org/10.64388/IREV9I12-1718611}
  }