An Ontology-Driven Graph RAG for Legal Norms: A Structural, Temporal, and Deterministic Approach
This paper presents SAT-Graph RAG, an ontology-driven framework that models legal norms with explicit hierarchical, temporal, and causal structures to enable deterministic, auditable, and temporally accurate retrieval-augmented generation for complex legal queries.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to find a specific rule in a massive, ancient library. But this isn't a normal library. It's a library where:
- The books change themselves: Every day, pages are ripped out, new ones are glued in, and sometimes entire chapters are rewritten.
- The books are nested: Inside a big book (the Constitution), there are chapters, inside chapters are articles, and inside articles are paragraphs.
- The books are time-traveling: You need to know what the rule said exactly on January 1st, 2010, not what it says today.
The Problem with Standard AI (The "Naive" Librarian)
Most current AI systems (called RAG) act like a librarian who only has a stack of photocopies of the current version of the books. If you ask, "What did the law say in 2010?", this librarian grabs the latest copy, scans it, and says, "Here is the text!"
The Result: They give you the wrong answer. They might tell you that "housing" is a right in 2010, even though that right wasn't added until 2015. They are "time-blind." They see the text, but they don't understand the history or the structure.
The Solution: SAT-Graph RAG (The "Master Architect")
This paper introduces a new system called SAT-Graph RAG. Instead of just scanning text, it builds a 3D, time-traveling map of the law.
Here is how it works, using simple analogies:
1. The "Lego" Structure (Separating the Idea from the Brick)
Imagine a Lego castle.
- The "Work" (The Idea): The idea of "Article 6" (Social Rights) is like the blueprint. It exists forever, even if the bricks change.
- The "Expression" (The Brick): The actual text is the Lego brick. In 1988, the brick was blue. In 2000, someone swapped it for a red brick. In 2010, they added a yellow piece.
Standard AI looks at the pile of bricks and gets confused. SAT-Graph keeps the blueprint separate. It knows that "Article 6" is the same blueprint, but it tracks every single version of the brick attached to it over time.
2. The "Efficient Copy-Paste" (Aggregation)
When a law changes, usually only one sentence changes, but the whole law is updated.
- The Old Way: Imagine a photocopier that re-copies the entire 1,000-page book every time you change one comma. This is wasteful and messy.
- The SAT-Graph Way: It's like a smart folder system. If you change one sentence in Chapter 3, the system creates a new version of Chapter 3, but for Chapters 1, 2, and 4, it just points to the old versions. It reuses the unchanged parts. This keeps the database small, fast, and perfectly organized.
3. The "Time-Traveler's Diary" (Causality)
This is the secret sauce. The system doesn't just store the text; it stores the events that changed it.
Think of it like a detective's case file.
- Event: "Constitutional Amendment #26 was signed on Feb 14, 2000."
- Action: "This amendment killed the old version of Article 6 and created a new version."
- Result: If you ask, "Who changed the law to include 'housing'?", the AI doesn't guess. It looks at the "Action" node in its map and says, "It was Amendment #26 in 2000." It can trace the exact chain of events like a family tree.
4. The "Smart Search" (Deterministic Retrieval)
When you ask a question, this system doesn't just "guess" the best answer based on word similarity. It follows a strict, logical plan:
- Identify the Blueprint: "You want Article 6."
- Set the Time Travel: "You want the version from 1999."
- Check the Map: "Okay, in 1999, the 'housing' brick hadn't been added yet. The 'food' brick wasn't there either."
- Retrieve the Truth: It pulls only the bricks that existed in 1999.
- Show the Receipt: It tells you exactly which version it used and why, so you can verify it.
Why Does This Matter?
In the real world, getting the law wrong can mean someone goes to jail, loses their home, or pays the wrong taxes.
- Old AI: "Here is the law!" (But it's the 2024 version, and you needed the 1999 version).
- SAT-Graph AI: "Here is the law as it stood in 1999. Here is the exact amendment that changed it later. Here is the proof."
The Bottom Line
This paper proposes building a digital, time-traveling legal map instead of just a text search engine. By treating laws as structured, evolving objects with a clear history of changes, it allows AI to answer complex legal questions with the precision of a human lawyer and the speed of a computer, without the risk of "hallucinating" the wrong version of history.
It turns the AI from a guessing machine into a verifiable, time-traveling librarian.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.