PolicyKG: LLM Pipeline Translates Institutional Policies into SHACL Knowledge Graphs
A new study introduces PolicyKG, a sophisticated LLM pipeline aimed at converting institutional policies from everyday language into SHACL constraints that machines can understand. This tool helps bridge the gap between human-readable policies and the formal compliance frameworks they need. It processes policy PDFs, sorting each sentence into categories like obligations, permissions, or prohibitions, and then translates these into first-order deontic logic to create SHACL shapes. The pipeline functions in four stages using a LangGraph state machine and includes validators for each phase. A key component is the Corpus Adapter, a YAML registry that links LLM predicates to a specific ontology, making it easier to adapt to new areas without needing retraining. When tested on the Asian Institute of Technology's Policies and Procedures corpus (1,663 sentences, 443 rules), PolicyKG achieved an impressive 86.9% accuracy in classification, with a Cohen's kappa of .709. Independent evaluations by three annotators on a 50-item sample showed strong agreement (Fleiss' kappa = .844). You can find the paper on arXiv with the identifier 2608.09028. This development could significantly reduce the manual effort required for managing policy compliance across institutions.
Key facts
- PolicyKG is an LLM pipeline for translating institutional policies into SHACL knowledge graphs.
- It classifies sentences as obligations, permissions, or prohibitions.
- It uses first-order deontic logic and emits SHACL constraints.
- The pipeline runs on a LangGraph state machine with per-stage validators.
- The Corpus Adapter is a YAML vocabulary registry that grounds LLM predicates in a target ontology.
- On the Asian Institute of Technology corpus, it achieves 86.9% deontic classification accuracy.
- Cohen's kappa is .709 and Fleiss' kappa is .844 for annotator agreement.
- The paper is on arXiv with ID 2608.09028.
Entities
Institutions
- Asian Institute of Technology
- arXiv