Journal DOI 10.68956/journal.legal-engineering-technology

Creative Commons source reading · Legal knowledge representation

Ontology-Driven Legal Rule Auditor for Secure, Trustworthy, and Governed RAG Systems

Aymen Akremi

Originally published in Computers · 2026-07-24

From the article

Selected source text. JournalOS removes markup and shortens excerpts where indicated. The full article provides the complete context.

Abstract

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’s 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 go

Editorial reading guide

  • Which legal requirement is represented, and which assumptions does that representation introduce?
  • How could a practitioner test the result against an ambiguous or exceptional case?