Skip to content
Preprint

PolicyKG: An Agentic LLM Pipeline for Translating Institutional Policies into SHACL Knowledge Graphs

Aug 2026 · 0 citations · 22 references
Computer Science

TL;DR

PolicyKG is an LLM pipeline that reads a policy PDF, classifies each sentence as an obligation, permission, or prohibition, lifts the label into first-order deontic logic, and emits SHACL constraints, and PolicyKG closes the loop.

Abstract

Institutional policies stay in natural language while the systems that check compliance demand machine-readable constraints. Bridging that gap is still done by hand. PolicyKG closes the loop. It is an LLM pipeline that reads a policy PDF, classifies each sentence as an obligation, permission, or prohibition, lifts the label into first-order deontic logic, and emits SHACL constraints. Four stages run on a LangGraph state machine with per-stage validators. The piece that matters most is the Corpus Adapter: a YAML vocabulary registry that grounds LLM predicates in a target ontology. Retargeting to a new domain means swapping the registry, not retraining a model. On the Asian Institute of Technology Policies and Procedures corpus (1,663 sentences, 443 rules), PolicyKG reaches 86.9% deontic classification accuracy (Cohen's kappa = .709). Three annotators independently re-label a 50-item sample and agree at Fleiss'kappa = .844. SHACL shape correctness on a 69-shape subset is F1 = .866. The FOL path handles 79.2% of rules; the rest go through a direct NL-to-SHACL fallback. We audited every one of the 443 rules for second- or higher-order constructs. An automated regex checklist flagged none, and a first-author pass on the 92 FOL-fallback cases confirmed the same. The exact upper 95% Clopper-Pearson bound on the true HOL rate is 0.67%. This is an audit finding for one corpus, not a proof of FOL sufficiency for institutional policy. Swapping the AIT registry for a GDPR registry raises exact property alignment from 1/15 to 11/15 (Fisher's exact p<.001; Cohen's h = 1.53). On the LexDeMod lease-contract benchmark (N = 200), Macro F1 drops to .370 because lease English uses"shall be entitled"for permission -- exactly the vocabulary mismatch registry swap is meant to fix. Repeated runs produce hash-identical SHACL outputs.

View source

Similar papers

Preprint Aug 2026

Towards Researcher Agents for Knowledge-Graph Question Answering

This work presents an agentic text-to-SPARQL system that goes one step beyond static tool-using agents: a researcher agent that, after each round of inference on a validation set, proposes and tests changes to its own prompts, rules, and tool-orchestration code.

Tommaso Soru, Abdulsobur Oyewale · 0 citations
#artificial intelligence Preprint Sep 2026

Natural Language Knowledge Graph Query Execution: Leveraging Controlled Semantics in the LLM Context Window

Large Language Model (LLM) applications often transfer domain concepts into the model's context informally, through prompt prose, schema dumps, and examples. We show that for database queries, data model concepts pass to LLMs more effectively through representations whose vocabulary terms carry declared, machine-readab...

B. Fitch · 0 citations
Review Open access Sep 2026

Legalyze: An Open‐Source Structure‐Aware Agentic RAG Platform for High‐Precision Legal Intelligence

The integration of Large Language Models into the legal domain is constrained by a reliability gap, where models can generate incorrect or unsupported information in specialized reasoning tasks. This issue is especially important in jurisdictions such as Pakistan, where legal texts have strong structural dependencies a...

Ali Hamza, Maaz Bin Rizwan, Maemoona Kayani et al. · 0 citations
Preprint Aug 2026

SodaMem: Evidence-Grounded Temporal Graph Memory for LLM Agents

SodaMem is presented, an evidence-grounded temporal graph memory that extracts typed FactEvents with mandatory provenance spans, persists mention time, occurrence time, and validity with SUPERSEDES/CONTRADICTS/UPDATES edges under hybrid lexical-dense indexing and answers via a planner-reader loop that gathers citable e...

Fengrong Wan, Chengcan Wu, Ning Lyu · 1 citation

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.