Home /Research /A Rule-Aware Prompt Framework for Structured Numeric Reasoning in Cyber-Physical Systems
OTHER

A Rule-Aware Prompt Framework for Structured Numeric Reasoning in Cyber-Physical Systems

Yichen Liu, Hongyu Wu, Bo Liu

Year
2025
Access
Open access

Abstract

Smart grids rely on high-dimensional numeric telemetry and explicit operating rules to maintain reliable and secure operation. Recent large language models (LLMs) are increasingly considered as candidate decision-support components for power system operations, yet most deployments focus on textual logs, alerts, or operator messages and do not directly address rule-grounded reasoning over numeric grid measurements. This paper proposes a rule-aware prompt framework that systematically encodes power system domain context, numeric normalization, and decision rules into a modular prompt architecture for LLMs. The framework decomposes prompts into reusable modules, including role, domain context, numeric normalization, rule-aware reasoning, value block, and output schema, and exposes an interface for plugging in diverse grid operating rules. A key design element separates rule specification from the representation of normalized numeric deviations, enabling concise prompts aligned with power system criteria. To illustrate its behavior, we instantiate the framework on numeric anomaly detection in the IEEE 118-bus transmission network and evaluate several prompting and adaptation regimes. The results show that rule-aware, z-score-based value blocks and a hybrid LLM+DL architecture substantially improve both consistency with grid operating rules and anomaly detection performance while reducing token usage, providing a reusable bridge between grid telemetry and general-purpose LLMs.

Keywords

eess.SY

Related papers

Browse all OTHER papers