Abstract
Rule-based reasoning over natural language input arises in domains where decisions must be auditable and justifiable: clinical protocols specify eligibility criteria in prose, evidence rules define admissibility through textual conditions, and scientific standards dictate methodological requirements. Applying rules to such inputs demands both interpretive flexibility and formal guarantees. Large language models (LLMs) provide flexibility but cannot ensure consistent rule application; symbolic systems provide guarantees but require structured input. This paper presents an integration pattern that combines these strengths: LLMs serve as ontology population engines, translating unstructured text into ABox assertions according to expert-authored TBox specifications, while SWRL-based reasoners apply rules with deterministic guarantees. The framework decomposes reasoning into entity identification, assertion extraction, and symbolic verification, with task definitions grounded in OWL 2 ontologies. Experiments across three domains (legal hearsay determination, scientific method-task application, clinical trial eligibility) and eleven language models validate the approach. Structured decomposition achieves statistically significant improvements over few-shot prompting in aggregate, with gains observed across all three domains. An ablation study confirms that symbolic verification provides substantial benefit beyond structured prompting alone. The populated ABox integrates with standard semantic web tooling for inspection and querying, positioning the framework for richer inference patterns that simpler formalisms cannot express.
Abstract (translated)
基于规则的推理在自然语言输入中出现于需要可审计和合理化的决策领域:临床协议通过散文形式规定资格标准,证据规则通过文本条件定义可接受性,科学标准则规定方法要求。将规则应用于此类输入既需要解释灵活性又需提供正式保证。大型语言模型(LLMs)提供了这种灵活性但不能确保一致的规则应用;而符号系统则能够提供这些保证,但需要结构化输入。本文提出了一种整合模式,结合了这两种系统的优点:通过专家编写的TBox规范,将非结构化的文本转化为ABox断言,大型语言模型充当本体论填充引擎,同时基于SWRL的推理器应用具有确定性保证的规则。框架将推理分解为实体识别、断言提取和符号验证三个部分,并根据OWL 2本体定义任务。 该方法在三个领域(法律传闻决定、科学方法-任务应用以及临床试验资格)中的十一种语言模型实验中得到了验证,结构化分解的整体效果显著优于少量提示的引导方式,在这三个领域均观察到了改进。消融研究确认了符号验证在单纯结构化提示之外提供了重大益处。填充后的ABox能够与标准语义网工具集成用于检查和查询,使该框架具备更丰富的推理模式表达能力,而这些简单的形式主义无法实现。 简而言之,这种结合大型语言模型的灵活性和基于规则系统的正式保证的方法,在多个实际应用领域内展示出了优越性,并且其结构化的处理方式还为后续进一步的应用开发提供了良好的基础。
URL
https://arxiv.org/abs/2601.01609