Table of Contents
Fetching ...

Deterministic Legal Agents: A Canonical Primitive API for Auditable Reasoning over Temporal Knowledge Graphs

Hudson de Martim

TL;DR

The paper addresses the lack of determinism and auditability in RAG-based legal AI by introducing a Canonical Primitive API built atop a temporal SAT-Graph. It defines a library of atomic, composable primitives for discovery, deterministic fetch, navigation, causality, and introspection, enabling planner-guided agents to produce auditable execution plans. By decoupling knowledge representation from reasoning, the approach delivers a verifiable audit log of the agent’s steps and results, improving trust in high-stakes domains. The work demonstrates use cases for deterministic point-in-time retrieval, causal pinpointing with version diffs, and thematic-hierarchical impact analysis, and discusses implications and future directions for extending auditable reasoning beyond law.

Abstract

For autonomous legal agents to operate safely in high-stakes domains, they require a foundation of absolute determinism and auditability-guarantees that standard Retrieval-Augmented Generation (RAG) frameworks cannot provide. When interacting with temporal knowledge graphs that model the complex evolution of legal norms, agents must navigate versioning, causality, and hierarchical structures with precision, a task for which black-box vector search is ill-suited. This paper introduces a new architectural pattern to solve this: a formal Primitive API designed as a secure execution layer for reasoning over such graphs. Instead of a monolithic query engine, our framework provides a library of canonical primitives-atomic, composable, and auditable primitives. This design empowers planner-guided agents to decompose complex legal questions into transparent execution plans, enabling critical tasks with full verifiability, including: (i) precise point-in-time version retrieval, (ii) robust causal lineage tracing, and (iii) context-aware hybrid search. Ultimately, this architecture transforms opaque retrieval into auditable reasoning, turning the agent's internal process from a black box into a verifiable log of deterministic primitives and providing a blueprint for building the next generation of trustworthy legal AI.

Deterministic Legal Agents: A Canonical Primitive API for Auditable Reasoning over Temporal Knowledge Graphs

TL;DR

The paper addresses the lack of determinism and auditability in RAG-based legal AI by introducing a Canonical Primitive API built atop a temporal SAT-Graph. It defines a library of atomic, composable primitives for discovery, deterministic fetch, navigation, causality, and introspection, enabling planner-guided agents to produce auditable execution plans. By decoupling knowledge representation from reasoning, the approach delivers a verifiable audit log of the agent’s steps and results, improving trust in high-stakes domains. The work demonstrates use cases for deterministic point-in-time retrieval, causal pinpointing with version diffs, and thematic-hierarchical impact analysis, and discusses implications and future directions for extending auditable reasoning beyond law.

Abstract

For autonomous legal agents to operate safely in high-stakes domains, they require a foundation of absolute determinism and auditability-guarantees that standard Retrieval-Augmented Generation (RAG) frameworks cannot provide. When interacting with temporal knowledge graphs that model the complex evolution of legal norms, agents must navigate versioning, causality, and hierarchical structures with precision, a task for which black-box vector search is ill-suited. This paper introduces a new architectural pattern to solve this: a formal Primitive API designed as a secure execution layer for reasoning over such graphs. Instead of a monolithic query engine, our framework provides a library of canonical primitives-atomic, composable, and auditable primitives. This design empowers planner-guided agents to decompose complex legal questions into transparent execution plans, enabling critical tasks with full verifiability, including: (i) precise point-in-time version retrieval, (ii) robust causal lineage tracing, and (iii) context-aware hybrid search. Ultimately, this architecture transforms opaque retrieval into auditable reasoning, turning the agent's internal process from a black box into a verifiable log of deterministic primitives and providing a blueprint for building the next generation of trustworthy legal AI.

Paper Structure

This paper contains 50 sections, 3 figures.

Figures (3)

  • Figure 1: From "flat-text" RAG to SAT Graph RAG
  • Figure 2: Diagram illustrating a reasoning agent decomposing a user prompt into tasks that are executed through primitives provided by the SAT-Graph API.
  • Figure 3: SAT-Graph Ontology