{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,30]],"date-time":"2026-07-30T12:14:31Z","timestamp":1785413671220,"version":"3.56.0"},"reference-count":30,"publisher":"MDPI AG","issue":"8","license":[{"start":{"date-parts":[[2026,7,24]],"date-time":"2026-07-24T00:00:00Z","timestamp":1784851200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100006701","name":"Umm Al-Qura University, Saudi Arabia","doi-asserted-by":"publisher","award":["26UQU4361220GSSR01"],"award-info":[{"award-number":["26UQU4361220GSSR01"]}],"id":[{"id":"10.13039\/501100006701","id-type":"DOI","asserted-by":"publisher"}]},{"award":["26UQU4361220GSSR01"],"award-info":[{"award-number":["26UQU4361220GSSR01"]}],"id":[{"id":"https:\/\/ror.org\/01xjqrm90","id-type":"ROR","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Computers"],"abstract":"<jats:p>Large Language Models (LLMs) have significant potential in regulated domains such as law, healthcare, and compliance, where users need help interpreting complex rules and documents. However, these domains also make the risks of Large Language Models especially serious: a system may hallucinate legal authority, rely on outdated rules, mix jurisdictions, or expose sensitive information. Retrieval-Augmented Generation (RAG) reduces these risks by grounding the model\u2019s answer in a curated document corpus, but standard RAG still does not guarantee that the retrieved sources are legally valid, up to date, applicable to the correct jurisdiction, or safe to use. In this paper, we present an ontology-governed approach to legal RAG. The central idea is to use a legal ontology not merely as background knowledge, but as an active control layer. Before retrieval, the ontology filters legal sources by jurisdiction, topic, lifecycle status, and temporal validity. After generation, validation rules check whether the answer is supported by approved evidence, cites valid legal sources, respects jurisdictional boundaries, and avoids unsafe or privacy-violating content. The system also records retrieval, validation, and response-generation steps in an audit trail to support later review. In this way, the proposed Legal Rule Auditor extends Graph RAG from a retrieval-enhancement technique into a governance architecture for legal question answering. Its goal is not simply to improve answer relevance, but to ensure that answers are legally grounded, trusted, current, jurisdictionally appropriate, and traceable.<\/jats:p>","DOI":"10.3390\/computers15080471","type":"journal-article","created":{"date-parts":[[2026,7,24]],"date-time":"2026-07-24T13:53:26Z","timestamp":1784901206000},"page":"471","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Ontology-Driven Legal Rule Auditor for Secure, Trustworthy, and Governed RAG Systems"],"prefix":"10.3390","volume":"15","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-1781-2908","authenticated-orcid":false,"given":"Aymen","family":"Akremi","sequence":"first","affiliation":[{"name":"College of Computing, Umm Al-Qura University (UQU), Makkah 21955, Saudi Arabia"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2026,7,24]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Zhang, L., Grabmair, M., Gray, M., and Ashley, K. (2026, January 3\u20135). Thinking longer, not always smarter: Evaluating llm capabilities in hierarchical legal reasoning. Proceedings of the Symposium on Computer Science and Law, Berkeley, CA, USA.","DOI":"10.1145\/3788646.3789522"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"170","DOI":"10.1007\/s44163-026-00902-3","article-title":"Challenges for generative AI in legal reasoning","volume":"7","author":"Linna","year":"2026","journal-title":"Discov. Artif. Intell."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Rouached, M., Akremi, A., Macherki, M., and Kraiem, N. (2024). Policy-based smart contracts management for IoT privacy preservation. Future Internet, 16.","DOI":"10.3390\/fi16120452"},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Sharma, K., Kumar, P., and Li, Y. (2025, January 4\u20139). Og-rag: Ontology-grounded retrieval-augmented generation for large language models. Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, Suzhou, China.","DOI":"10.18653\/v1\/2025.emnlp-main.1674"},{"key":"ref_5","unstructured":"Arshad, U., Corsar, D., and Nkisi-Orji, I. (2024, January 17). Integrating KGs and ontologies with RAG for personalised summarisation in regulatory compliance. Proceedings of the SICSA REALLM, Aberdeen, UK."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"82895","DOI":"10.52202\/079017-2636","article-title":"Agentdojo: A dynamic environment to evaluate prompt injection attacks and defenses for llm agents","volume":"37","author":"Debenedetti","year":"2024","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_7","unstructured":"Beurer-Kellner, L., Buesser, B., Cretu, A.M., Debenedetti, E., Dobos, D., Fabian, D., Fischer, M., Froelicher, D., Grosse, K., and Naeff, D. (2025). Design patterns for securing llm agents against prompt injections. arXiv."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"353","DOI":"10.1016\/j.icte.2025.12.001","article-title":"From prompt injections to protocol exploits: Threats in LLM-powered AI agents workflows","volume":"12","author":"Ferrag","year":"2025","journal-title":"ICT Express"},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Shi, J., Yuan, Z., Liu, Y., Huang, Y., Zhou, P., Sun, L., and Gong, N.Z. (2024, January 14\u201318). Optimization-based prompt injection attack to llm-as-a-judge. Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, Salt Lake City, UT, USA.","DOI":"10.1145\/3658644.3690291"},{"key":"ref_10","unstructured":"Chen, S., Zharmagambetov, A., Wagner, D., and Guo, C. (2025). Meta SecAlign: A Secure Foundation LLM Against Prompt Injection Attacks. arXiv."},{"key":"ref_11","unstructured":"Hong, H., Feng, S., Naderloui, N., Yan, S., Zhang, J., Liu, B., Arastehfard, A., Huang, H., and Hong, Y. (2025). SoK: Taxonomy and Evaluation of Prompt Security in Large Language Models. arXiv."},{"key":"ref_12","first-page":"702","article-title":"Software security static analysis false alerts handling approaches","volume":"12","author":"Akremi","year":"2021","journal-title":"Int. J. Adv. Comput. Sci. Appl."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"1","DOI":"10.4018\/IJSWIS.392507","article-title":"Enhancement Large Language Models Domain Through Ontology-Based Retrieval-Augmented Generation","volume":"21","author":"Clarizia","year":"2025","journal-title":"Int. J. Semant. Web Inf. Syst. (IJSWIS)"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Al Machot, F., Horsch, M.T., and Ullah, H. (2024). Building trustworthy AI: Transparent AI systems via language models, ontologies, and logical reasoning (TranspNet). Proceedings of the Designing the Conceptual Landscape for a XAIR Validation Infrastructure Workshop, Springer.","DOI":"10.1007\/978-3-031-89274-5_3"},{"key":"ref_15","unstructured":"Zhou, Y., Liu, Y., Li, X., Jin, J., Qian, H., Liu, Z., Li, C., Dou, Z., Ho, T.Y., and Yu, P.S. (2024). Trustworthiness in retrieval-augmented generation systems: A survey. arXiv."},{"key":"ref_16","unstructured":"de Martim, H. (2025). Deterministic Legal Retrieval: An Action API for Querying the SAT-Graph RAG. arXiv."},{"key":"ref_17","unstructured":"Alharthi, D., and Garcia, I.R.K. (2025). A Call to Action for a Secure-by-Design Generative AI Paradigm. arXiv."},{"key":"ref_18","unstructured":"Louren\u00e7o, B., Ad\u00e3o, P., Ferreira, J.F., Marques, M.M., and Vaz, C. (2025). Structuring Security: A Survey of Cybersecurity Ontologies, Semantic Log Processing, and LLMs Application. arXiv."},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Akremi, A. (2025). ForensicTwin: Incorporating Digital Forensics Requirements Within a Digital Twin. Computers, 14.","DOI":"10.3390\/computers14040115"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Akremi, A. (2022). A forensic-driven data model for automatic vehicles events analysis. PeerJ Comput. Sci., 8.","DOI":"10.7717\/peerj-cs.841"},{"key":"ref_21","unstructured":"de Oliveira, V.T., da Silva, D.O., de Almeida Souza, M., Lima, M.R., de Oliveira, S.S.T., and Rosa, T.C. (2026, January 13\u201316). Retrieval-Augmented Generation and Knowledge Graphs in Portuguese-Language Legal Documents. Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026), Salvador, Brazil."},{"key":"ref_22","unstructured":"Mukherjee, K., and Kantarcioglu, M. (2025). LLM-driven Provenance Forensics for Threat Investigation and Detection. arXiv."},{"key":"ref_23","unstructured":"Song, M., Sim, S.H., Bhardwaj, R., Chieu, H.L., Majumder, N., and Poria, S. (2025, January 24\u201328). Measuring and enhancing trustworthiness of LLMs in RAG through grounded attributions and learning to refuse. Proceedings of the International Conference on Learning Representations, Singapore."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Ford, C., Rane, O., and Leavy, S. (2026). Navigating Global AI Regulation: A Multi-Jurisdictional Retrieval-Augmented Generation System. arXiv.","DOI":"10.63317\/3mx5kxewetzz"},{"key":"ref_25","unstructured":"U.S. Department of Health and Human Services (2026, June 13). 45 CFR Part 164: Security and Privacy. Electronic Code of Federal Regulations, Title 45, Subtitle A, Subchapter C, 2026, Available online: https:\/\/www.ecfr.gov\/current\/title-45\/subtitle-A\/subchapter-C\/part-164."},{"key":"#cr-split#-ref_26.1","unstructured":"United States Congress (2026, June 13). Health Information Technology for Economic and Clinical Health Act, Section 13,402: Notification in the Case of Breach. American Recovery and Reinvestment Act of 2009, Pub. L. No. 111-5, 123 Stat. 115"},{"key":"#cr-split#-ref_26.2","unstructured":"Codified at 42 U.S.C. \u00a717,932, 2009, Available online: https:\/\/www.govinfo.gov\/link\/plaw\/111\/public\/5."},{"key":"#cr-split#-ref_27.1","unstructured":"European Parliament and Council of the European Union (2016). Regulation"},{"key":"#cr-split#-ref_27.2","unstructured":"(EU) 2016\/679 of the European Parliament and of the Council of 27 April 2016 on the Protection of Natural Persons with Regard to the Processing of Personal Data and on the Free Movement of Such Data. Off. J. Eur. Union, 119, 1-88. Available online: https:\/\/eur-lex.europa.eu\/eli\/reg\/2016\/679\/oj."},{"key":"ref_28","unstructured":"Akremi, A. (December, January 29). An adaptative and compliant forensics admissibility metrics generation methodology. Proceedings of the 23rd International Conference on Information Integration and Web Intelligence, Linz, Austria."}],"container-title":["Computers"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2073-431X\/15\/8\/471\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,24]],"date-time":"2026-07-24T14:00:30Z","timestamp":1784901630000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2073-431X\/15\/8\/471"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,7,24]]},"references-count":30,"journal-issue":{"issue":"8","published-online":{"date-parts":[[2026,8]]}},"alternative-id":["computers15080471"],"URL":"https:\/\/doi.org\/10.3390\/computers15080471","relation":{},"ISSN":["2073-431X"],"issn-type":[{"value":"2073-431X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,7,24]]}}}