Graph Retrieval-Augmented Generation for Conflict Detection and Resolution in Smart Home Automation Rules

Graph Retrieval-Augmented Generation for Conflict Detection and Resolution in Smart Home Automation Rules. Masters thesis, King Fahd University of Petroleum and Minerals.

[img] PDF
KFUPM_MSThesis_g202303130_Leena_Marghalani.pdf
Restricted to Repository staff only until 22 June 2027.

Download (11MB)

Arabic Abstract

أصبحت المنازل الذكية المؤتمتة أكثر ترابطًا وتعقيدًا بشكل متزايد، مع اعتماد متنامٍ على أجهزة إنترنت الأشياء غير المتجانسة وقواعد الأتمتة التي يعرّفها المستخدم. وعلى الرغم من أن هذه الأنظمة تعزز الراحة والكفاءة، فإن سلوكياتها المتشابكة بإحكام تُدخل مخاطر دقيقة وغالبًا غير مرئية. وعلى عكس بيئات إنترنت الأشياء المؤسسية، يتم إعداد المنازل الذكية وصيانتها من قبل المستخدمين النهائيين، الذين غالبًا ما يفتقرون إلى الخبرة اللازمة لفهم كيفية تفاعل قواعد الأتمتة مع بعضها البعض. ونتيجة لذلك، قد تؤدي الروتينات التي تبدو منطقية إلى أوامر متناقضة، أو آثار جانبية غير آمنة، أو هدر في الطاقة، أو ثغرات في المراقبة. وغالبًا ما تركز الأساليب الحالية إما على اكتشاف تعارضات القواعد المنطقية أو التفاعلات الدلالية، لكنها عادةً ما تقدم دعمًا محدودًا للتفسير المبني على السياق ولحلول المعالجة العملية للمستخدمين العاديين. في هذا البحث، نقدم SHGRAG، وهو إطار عمل شبه ذاتي لاكتشاف تعارضات المنازل الذكية ومعالجتها. يدمج SHGRAG بين التوليد المعزز بالاسترجاع القائم على الرسوم البيانية (GraphRAG) ورسم بياني معرفي منظم يُنمذج الأجهزة والقواعد والمتغيرات الأخرى وتفاعلاتها. يتيح هذا التمثيل إجراء استدلال قائم على السياق يشمل كلًا من الاعتمادات المنطقية والتفاعلات الفيزيائية أو الدلالية. يدعم الإطار سير عمل شبه ذاتي، حيث يتولى النموذج اللغوي الكبير (LLM) مهام الاكتشاف والتفسير واقتراح الإصلاح، مع احتفاظ المستخدم بالتحكم النهائي. قمنا بتقييم SHGRAG على بيئة اختبار لمبنى ذكي، وأجرينا مقارنة مع نموذج أساسي يعتمد فقط على LLM. أظهرت النتائج تحسنًا في أداء الاكتشاف، وتفسيرات أكثر وضوحًا، واقتراحات إصلاح فعالة، مما يبرز قيمة دمج النماذج اللغوية الكبيرة مع الاستدلال القائم على الرسوم البيانية المنظمة لتحقيق أتمتة أكثر أمانًا في المنازل الذكية.

English Abstract

Automated smart homes are becoming increasingly interconnected and complex, with growing reliance on heterogeneous IoT devices and user-defined automation rules. While these systems improve convenience and efficiency, their tightly coupled behaviors introduce subtle and often invisible risks. Unlike enterprise IoT environments, smart homes are configured and maintained by end users, who often lack the expertise to understand how automation rules interact. As a result, seemingly reasonable routines can create contradictory commands, unsafe side effects, wasted energy, or surveillance blind spots. Existing approaches often detect either logical rule conflicts or semantic interactions, but they typically provide limited support for grounded explanation and actionable mitigation for everyday users. In this paper, we present SHGRAG, a semi-autonomous framework for smart home conflict detection and resolution. SHGRAG integrates Graph-based Retrieval-Augmented Generation (Graph-RAG) with a structured knowledge graph that models devices, rules and other variables with their interactions. This representation enables grounded reasoning over both logical dependencies and physical or semantic interactions. The framework supports a semi-autonomous workflow where the LLM handles detection, explanation, and repair recommendation, with the user retaining final control. We evaluate SHGRAG on a smart building testbed, and performed a comparison with an LLM-only baseline. Results show improved detection performance, more interpretable explanations, and effective repair suggestions, demonstrating the value of combining LLMs with structured graph reasoning for safer smart home automation.

Item Type: Thesis (Masters)
Subjects: Computer
Department: College of Computing and Mathematics > Information and Computer Science
Thesis Advisor:
Waleed Algobi,
Thesis Committee Members:
Muhamad Felemban, Malak Baslyman,
Depositing User: LEENA MARGHALANI
Date Deposited: 23 Jun 2026 11:03
Last Modified: 23 Jun 2026 11:03
URI: https://eprints.kfupm.edu.sa/id/eprint/144615