A Tool for Safe and Accurate IoT Automation Rule Generation Using Large Language Models
The proliferation of Internet of Things (IoT) devices has led to an increasing reliance on trigger-action rules for home automation. However, creating these rules in structured formats remains challenging for users who prefer natural language expressions. We present Ruleengine, a tool leveraging Large Language Models (LLMs) to translate natural language descriptionsinto valid IoT automation rules with platform specific format. Our approach introduces three key innovations: (1) a structured prompt engineering framework combining explicit output structuring and semantic constraint definition, (2) a RAG- based architecture enhanced with semantic search and contextual re-ranking for improved rule generation, and (3) a context-aware safety scoring mechanism that evaluates rules across trigger conditions and action implications. Through empirical evaluation across multiple LLMs using real-world datasets, we demonstrate substantial improvements in both syntactic and semantic validity of generated rules, while successfully identifying safety violations in generated rules. We conduct a comprehensive study on performance analysis across different LLMs, prompt engineering strategies, embedding techniques, and RAG configurations, revealing interesting trade-offs between accuracy, latency, and computational efficiency in automated rule generation.
Authors
- Md Shihabul Islam (ORCID: https://orcid.org/0000-0001-8929-3003)
- Murat Kantarcıoğlu (ORCID: https://orcid.org/0000-0001-9795-9063)
Institutions
- E4D Technologies (United States) (US)
- Virginia Tech (US)
Publication Details
- Published
- 2025-05-15
- DOI
- https://doi.org/10.1109/spw67851.2025.00025
- Primary Topic
- Business Process Modeling and Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00