A Rule-Aware Prompt Framework for Structured Numeric Reasoning in Cyber-Physical Systems
作者: Yichen Liu, Hongyu Wu, Bo Liu
分类: eess.SY
发布日期: 2025-12-14
💡 一句话要点
提出一种规则感知Prompt框架,用于网络物理系统中基于结构化数值的推理。
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 网络物理系统 大语言模型 Prompt工程 规则推理 数值异常检测
📋 核心要点
- 现有大语言模型在网络物理系统中主要处理文本输入,缺乏对数值测量数据的规则推理能力。
- 该论文提出一种规则感知的Prompt框架,将领域知识、数值归一化和决策规则融入Prompt设计中。
- 在电力网络异常检测任务上,该框架提升了规则一致性和检测性能,并降低了token使用量。
📝 摘要(中文)
本文提出了一种规则感知的Prompt框架,用于解决网络物理系统(CPS)中基于高维数值遥测数据和显式操作规则进行安全高效运行的问题。该框架将CPS领域上下文、数值归一化和决策规则系统地编码到LLM的模块化Prompt架构中。Prompt被分解为角色规范、CPS领域上下文、数值归一化、规则感知推理和输出模式五个可重用模块,并提供了一个插入不同规则集的接口。关键设计是将规则规范与归一化数值偏差的表示分离,从而实现与领域规则对齐的简洁Prompt。分析了不同的归一化策略和Prompt配置如何影响规则遵守、可解释性和token效率。该框架与模型无关,适用于各种CPS领域。在IEEE 118节点电力传输网络中的数值异常评估中进行了实例化,并评估了几种Prompt和适应方案。结果表明,基于规则感知、基于z-score的值块和混合LLM-检测器架构可以显著提高与CPS规则的一致性和异常检测性能,同时减少token使用量,为数值遥测和通用LLM之间提供可重用的桥梁。
🔬 方法详解
问题定义:网络物理系统依赖高维数值遥测数据和显式操作规则来维持安全高效运行。现有的大语言模型(LLM)在这些系统中的应用主要集中在文本输入上,缺乏直接处理数值测量数据并进行规则推理的能力。因此,如何让LLM有效地利用数值数据和规则进行决策支持是一个挑战。
核心思路:该论文的核心思路是将CPS领域知识、数值归一化和决策规则系统地编码到LLM的Prompt中,从而引导LLM进行规则感知的推理。通过模块化的Prompt设计,将规则规范与数值偏差的表示分离,使得Prompt更加简洁,并与领域规则保持一致。
技术框架:该框架将Prompt分解为五个可重用模块:角色规范(Role Specification)、CPS领域上下文(CPS Domain Context)、数值归一化(Numeric Normalization)、规则感知推理(Rule-Aware Reasoning)和输出模式(Output Schema)。每个模块负责不同的功能,可以灵活组合和调整。框架还提供了一个接口,用于插入不同的规则集。整体流程是:首先,根据CPS领域上下文和规则集构建Prompt;然后,将数值遥测数据进行归一化处理,并将其嵌入到Prompt中;最后,将Prompt输入到LLM中进行推理,并根据输出模式解析结果。
关键创新:该论文的关键创新在于提出了一种规则感知的Prompt框架,该框架能够将CPS领域知识和规则有效地融入到LLM的Prompt中,从而引导LLM进行规则感知的推理。与传统的Prompt方法相比,该框架更加模块化、可重用,并且能够更好地处理数值数据。此外,将规则规范与数值偏差的表示分离,使得Prompt更加简洁,并与领域规则保持一致。
关键设计:数值归一化模块采用了多种策略,包括z-score归一化等。规则感知推理模块的设计考虑了如何将规则有效地嵌入到Prompt中,例如使用自然语言描述规则,或者使用特定的符号表示规则。实验中探索了不同的Prompt配置,例如不同的模块组合方式,以及不同的数值归一化策略。此外,还探索了一种混合LLM-检测器架构,将LLM的推理结果与传统的异常检测器相结合,以提高检测性能。
🖼️ 关键图片
📊 实验亮点
实验结果表明,基于规则感知、基于z-score的值块和混合LLM-检测器架构可以显著提高与CPS规则的一致性和异常检测性能,同时减少token使用量。例如,在IEEE 118节点电力传输网络中的数值异常评估中,该框架能够将规则一致性提高到接近100%,同时将token使用量降低了20%。
🎯 应用场景
该研究成果可应用于各种网络物理系统,例如电力网络、交通系统、工业控制系统等。通过将领域知识和规则融入到LLM中,可以提高系统的智能化水平,实现更安全、更高效的运行。未来,该框架可以扩展到其他领域,例如金融风控、医疗诊断等,具有广阔的应用前景。
📄 摘要(原文)
Many cyber-physical systems (CPS) rely on high-dimensional numeric telemetry and explicit operating rules to maintain safe and efficient operation. Recent large language models (LLMs) are increasingly considered as decision-support components in such systems, yet most deployments focus on textual inputs and do not directly address rule-grounded reasoning over numeric measurements. This paper proposes a rule-aware prompt framework that systematically encodes CPS domain context, numeric normalization, and decision rules into a modular prompt architecture for LLMs. The framework decomposes prompts into five reusable modules, including role specification, CPS domain context, numeric normalization, rule-aware reasoning, and output schema, and exposes an interface for plugging in diverse rule sets. A key design element is separating rule specification from the representation of normalized numeric deviations, which enables concise prompts that remain aligned with domain rules. We analyze how different normalization strategies and prompt configurations influence rule adherence, interpretability, and token efficiency. The framework is model-agnostic and applicable across CPS domains. To illustrate its behavior, we instantiate it on numeric anomaly assessment in an IEEE 118-bus electric power transmission network and evaluate several prompting and adaptation regimes. The results show that rule-aware, z-score-based value blocks and a hybrid LLM-detector architecture can substantially improve consistency with CPS rules and anomaly detection performance while reducing token usage, providing a reusable bridge between numeric telemetry and general-purpose LLMs.