PolicyLLM: Neuro-Symbolic Policy Extraction and Enforcement for Runtime AI Governance
Abstract
Large language models are increasingly deployed inside organizations bound by regulation, contracts, and internal policy, and governance regimes such as the EU AI Act now expect deployers to produce auditable evidence that outputs comply with those rules. Yet the dominant methods, fine-tuning, prompt engineering, and retrieval-augmented generation, are statistical, brittle under policy change, and leave no per-output record of which rules applied or whether they were met. We present PolicyLLM, a neuro-symbolic runtime governance layer that compiles natural-language policy into symbolically validated decision graphs (via the Z3 SMT solver) and enforces them over LLM outputs at inference time, writing every decision to a hash-chained audit log built for regulatory inspection. The design rests on a division of labor: compliance teams author the rules; PolicyLLM extracts, validates, enforces, and logs them. On a policy-compliance benchmark it attains the highest policy recall (0.72) and precision (0.77) among ten methods; on a separate hallucination benchmark it produces zero ungrounded claims (vs. 0.20–0.55 for neural and retrieval baselines), a benchmark-specific result rather than a deployment guarantee.