Legal Contract Compliance Verifier Using Hybrid LLMs and Rule Based Systems
DOI:
https://doi.org/10.69968/ijisem.2026v5i2627-632Keywords:
Contract Compliance Checker, LLM (Large Language Models), Hybrid LLMs (Groq API & Ollama), Rule Based Systems, Legal NLP, Explainable AIAbstract
In the recent corporate businesses, legal contracts are the foundation of business, employment, and partnerships, yet their manual review is often slow, costly, error-prone, and dependent on legal expertise. However traditional methods include ML models with large labelled datasets often lacking contextual understanding of legal language, transparency and cannot easily adapt to different legal situations. To overcome these limitations, we proposed now, a Legal Contract Compliance Checker that combines hybrid Large Language Models (LLMs) with a rule-based legal validation framework. The proposed system uses online LLM inference through Groq API for high-performance analysis and offline inference using Ollama to ensure data privacy. Legal contracts uploaded by users are preprocessed, analyzed semantically using LLMs, and validated against a structured rule engine derived from government portals, academic publications, and educational legal resources. After analyzing, the system classifies contract clauses into Safe, Concerning, and High-Risk categories and generates explainable compliance reports which may be downloadable and used for later. This approach assists legal practitioners, organizations, and non-expert users by reducing manual effort, improving accuracy, transparency and enabling faster and more reliable compliance checking, making it suitable for real-world legal applications.
References
[1] Victor Carneiro-Diaz, Adrian Grille-Zallas, Daniel Lage-Etchart, “Automated legal analysis of rental contract clauses using large language models,” SoftwareX, Vol. 31, 102337, 2025.
[2] Farid Ariai, Gianluca Demartini, “Natural Language Processing for the Legal Domain: A Survey of Tasks, Datasets, Models, and Challenges,” ACM Computing Surveys, 2025.
[3] Mousumi Akter, Erion Çano, Erik Weber, Dennis Dobler, Ivan Habernal, “A Comprehensive Survey on Legal Summarization: Challenges and Future Directions,” 2025.
[4] Weicong Qin, Zhongxiang Sun, “Exploring the Nexus of Large Language Models and Legal Systems: A Short Survey,” 2024 .
[5] Junyun Cui, Xiaoyu Shen, Feiping Nie, Zheng Wang, Jinglong Wang, Yulong Chen, “A Survey on Legal Judgment Prediction: Datasets, Metrics, Models and Challenges,” 2022.
[6] Eboigbe, Edwin O., “AI in Legal Analytics: Balancing Efficiency, Accuracy, and Ethics in Contract and Predictive Analysis,” SSRN, 2024.
[7] Esoo Marcos, “AI-Powered Legal Research, Contract Analysis, and Decision-Making,” International Journal of Artificial Intelligence and Machine Learning in Engineering, Vol. 12, Issue 02, 2025.
[8] MH Kazemi et al., “Application of NLP-based models in automated detection of risky statements in contracts,” Expert Systems with Applications, 2025.
[9] Siino, M., Falco, M., Croce, D., & Rosso, P. , “Exploring LLMs Applications in Law: A Literature Review on Current Legal NLP Approaches”,IEEE Access, Journal Article,Volume:13,2025.
[10] Poornima A., K. V. Nagaraja., & Manju Venugopalan.,”Legal Contract Analysis and Risk Assessment Using Pre-Trained Legal-T5 and Law-GPT”, 3rd International Conference on Integrated Circuits and Communication Systems (ICICACS),Conference Paper, 2025.
[11] Srivastava, A., Chauhan, K., Daharwal, H., Mukati, N., & Kavimandan, P. S., “Text Summarizer Using NLP Natural Language Processing”. International Research Journal of Modernization in Engineering, Technology, and Science.Volume 6 Issue 1,2022.
[12] Deroy, A., Ghosh, K., & Ghosh, S. (2024)., “Applicability of Large Language Models and Generative Models for Legal Case Judgment Summarization”. Computer Science and Engineering, IIT Kharagpur & Computational and Data Sciences, IISER Kolkata.
[13] Chanuka Wijayakoon, Hai Dong, H.M.N. Dilum Bandara, Zahir Tari, and Anurag Soin, “Legal Compliance Evaluation of Smart Contracts Generated by Large Language Models,” IEEE International Conference on Blockchain and Cryptocurrency (ICBC), IEEE Xplore,2025.
[14] Punam Bagul, Rohan Surwe, Abhishek Singh, Ajit Sargar, Sudhanshu ambhre, "AI powered Legal Advisor Assistant", International Journal of Advance Research in Science, Volume 5, Issue 3, April 2025.
[15] Md Farhad Kabir, Sohana Afrin Mitu, Sharmin Sultana, Belal Hossain, Rakibul Islam, Khandakar Rabbi Ahmed. "LegalSummNet: A Transformer-Based Model for Effective Legal Case Summarization." International Journal of Advanced Computer Science and Applications, Volume 16, Issue 9, 2025.
[16] N. Zaher, R. Gandoul, M. Ghazouani, & N. Chafiq.“AI-Driven NLP for Automated Regulatory Compliance Verification: A Deep Learning-Based Approach.” International Journal on Technical and Physical Problems of Engineering (IJTPE), Volume 17, Issue 1, pp. 383–391,2025.
[17] A.Ekeh , & H. Abubakar. “Automating Legal Compliance and Contract Management: Advances in Data Analytics for Risk Assessment, Regulatory Adherence, and Negotiation Optimization.” Engineering and Technology Journal, Volume 10, Issue 01, pp. 3684–3703,2025.
[18] Nagy, B., Hegedűs, I., Sándor, N., Egedi, B., Mehmood, H., Saravanan, K., Lóki, G., & Kiss, Á., “Privacy-Preserving Federated Learning and Its Application to Natural Language Processing,” Knowledge-Based Systems, Journal Article, Vol. 268, 2023.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Author

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Re-users must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. This license allows for redistribution, commercial and non-commercial, as long as the original work is properly credited.





