Introduction
Service regulation—the systematic monitoring of activities to ensure compliance with safety, financial, or operational protocols—is a critical component of modern industry. However, current AI-driven regulatory systems are largely domain-specific, requiring bespoke models for every new field, from healthcare to power plant management. This "plug-and-play" paradigm is computationally expensive and fails to scale across diverse sectors. To address this, researchers from Zhejiang University have developed HORAE, a domain-agnostic specification language, and RuleGPT, a specialized model designed to automate the translation of natural language regulations into machine-executable logic.
The HORAE Framework
HORAE (named after the Greek goddesses of order) serves as a universal intermediate representation for regulatory rules. Unlike natural language, which is often ambiguous, HORAE decomposes rules into a structured two-layer hierarchy. The top layer manages logical operators (AND, OR, NOT) and rule modalities (e.g., mandatory, recommended, or forbidden). The bottom layer breaks down specific events into "object-action-attribute" patterns.
By structuring rules this way, the framework enables formal verification. Using SMT (Satisfiability Modulo Theories) solvers like Z3, the system can mathematically determine if a set of regulations contains internal contradictions, moving AI regulation from a "black box" approach to a verifiable "glass box" system.
RuleGPT: Automating Rule Encoding
To bridge the gap between human-readable text and the HORAE language, the researchers introduced RuleGPT. This 7B-parameter model (based on Qwen2.5-7B-Ins) was fine-tuned using Low-Rank Adaptation (LoRA) to perform rule encoding in three distinct phases:
- Basic Event Extraction: Identifying core actions within a sentence.
- Logical Relation Extraction: Determining the logical dependencies between those actions.
- Syntactic Pattern Matching: Mapping the extracted data to the formal HORAE grammar.
This phased approach allows a relatively small model to achieve high accuracy by focusing on specific logical components of the translation task.
The SRR-Eval Benchmark
The effectiveness of HORAE and RuleGPT was validated using SRR-Eval, a new comprehensive benchmark for service regulation. The dataset consists of 5,100 rules, including 500 rules drawn from 10 real-world domains such as food safety, tourism, and power plants. To enhance the model's linguistic variety, the researchers also included 40 "quasi-domains" featuring rules generated by large language models (LLMs) to simulate a wide range of regulatory scenarios.
Results and Performance
Empirical evaluations demonstrate that RuleGPT-7B significantly outperforms GPT-3.5 and performs on par with the state-of-the-art GPT-4o model across several key metrics.
In the "Basic Event Extraction" task, RuleGPT achieved the highest precision in 60% of the real-world benchmarks. Furthermore, as a 7B-parameter model, RuleGPT offers a more cost-effective and privacy-compliant alternative to proprietary APIs, making it suitable for enterprise-level deployment where data security is paramount.
Conclusion and Future Work
HORAE and RuleGPT represent a significant step toward automated, domain-agnostic service regulation. By providing a unified logical interface, the system eliminates the need for industry-specific models. Future research will focus on improving "event abstraction"—the ability to recognize when different terms refer to the same underlying concept—and integrating the "Violation Recognition" phase, where the system identifies non-compliance in real-time data feeds.
The researchers have open-sourced the SRR-Eval dataset and the RuleGPT model to foster further innovation in the field of automated compliance and safety monitoring.
Summary updated