{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,17]],"date-time":"2026-04-17T07:58:07Z","timestamp":1776412687541,"version":"3.51.2"},"reference-count":57,"publisher":"Association for Computing Machinery (ACM)","issue":"1","funder":[{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"publisher","award":["62472089"],"award-info":[{"award-number":["62472089"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"publisher"}]},{"name":"Jiangsu Provincial Key Laboratory of Network and Information Security","award":["BM2003201"],"award-info":[{"award-number":["BM2003201"]}]},{"name":"Key Laboratory of Computer Network and Information Integration of Ministry of Education of China","award":["93K-9"],"award-info":[{"award-number":["93K-9"]}]},{"name":"Collaborative Innovation Center of Novel Software Technology and Industrialization","award":["NaN"],"award-info":[{"award-number":["NaN"]}]},{"name":"Big Data Computing Center of Southeast University","award":["NaN"],"award-info":[{"award-number":["NaN"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Interact. Mob. Wearable Ubiquitous Technol."],"published-print":{"date-parts":[[2026,3,16]]},"abstract":"<jats:p>\n                    Trigger-action programming (TAP) is a popular paradigm for smart home automation, enabling users to create rules in form of \u201cIF trigger, THEN action\u201d. While large language models (LLMs) offer a promising path for generating TAP rules from natural language, their vanilla application, such as relying solely on pre-trained knowledge and basic prompting, falters as platforms evolve to support\n                    <jats:italic toggle=\"yes\">enhanced TAP<\/jats:italic>\n                    rules. Such rules incorporate scripting for conditional logic, computations, and external API calls. Enhanced TAP rules demand users to express complex logic and environmental context, making the creation of such rules difficult without a strong programming background. This paper introduces HomeGenii, a retrieval-augmented generation (RAG) system that automates enhanced TAP creation. HomeGenii constructs a compact yet representative rulebase, retrieves semantically aligned rules using a cluster-then-search approach, and applies compression techniques to minimize token overhead. Evaluation shows HomeGenii improves enhanced TAP rule generation accuracy to 84%, a 70% increase over systems without RAG. Our work demonstrates a viable pathway for enabling non-expert users to leverage LLMs for expressive and complex home automation.\n                  <\/jats:p>","DOI":"10.1145\/3789673","type":"journal-article","created":{"date-parts":[[2026,3,16]],"date-time":"2026-03-16T17:51:14Z","timestamp":1773683474000},"page":"1-32","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Retrieval-augmented Generation of Enhanced Trigger-action Programming Rules in Smart Home"],"prefix":"10.1145","volume":"10","author":[{"ORCID":"https:\/\/orcid.org\/0009-0006-5619-087X","authenticated-orcid":false,"given":"Yuchen","family":"Zhao","sequence":"first","affiliation":[{"name":"School of Computer Science and Engineering, Southeast University, Nanjing, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0009-9088-392X","authenticated-orcid":false,"given":"Lifu","family":"Wang","sequence":"additional","affiliation":[{"name":"School of Computer Science and Engineering, Southeast University, Nanjing, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3156-9035","authenticated-orcid":false,"given":"Kai","family":"Dong","sequence":"additional","affiliation":[{"name":"School of Computer Science and Engineering, Southeast University, Nanjing, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2026,3,16]]},"reference":[{"key":"e_1_2_1_1_1","volume-title":"Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al.","author":"Achiam Josh","year":"2023","unstructured":"Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774 (2023)."},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2022.3179294"},{"key":"e_1_2_1_3_1","volume-title":"International Conference on Machine Learning (ICML). PMLR, 2206\u20132240","author":"Borgeaud Sebastian","year":"2022","unstructured":"Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai, Eliza Rutherford, Katie Millican, George Bm Van Den Driessche, Jean-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, et al. 2022. Improving language models by retrieving from trillions of tokens. In International Conference on Machine Learning (ICML). PMLR, 2206\u20132240."},{"key":"e_1_2_1_4_1","volume-title":"2018 USENIX Annual Technical Conference (USENIX ATC). 147\u2013158","author":"Celik Z Berkay","year":"2018","unstructured":"Z Berkay Celik, Patrick McDaniel, and Gang Tan. 2018. Soteria: automated IoT safety and security analysis. In 2018 USENIX Annual Technical Conference (USENIX ATC). 147\u2013158."},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/3715114"},{"key":"e_1_2_1_6_1","volume-title":"Proceedings of the 32nd USENIX Security Symposium (USENIX Security). 1559\u20131576","author":"Chi Haotian","year":"2023","unstructured":"Haotian Chi, Qiang Zeng, and Xiaojiang Du. 2023. Detecting and handling IoT interaction threats in multi-platform multi-control-channel smart homes. In Proceedings of the 32nd USENIX Security Symposium (USENIX Security). 1559\u20131576."},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2968219.2971443"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.5555\/1792734.1792766"},{"key":"e_1_2_1_9_1","volume-title":"Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805","author":"Devlin Jacob","year":"2018","unstructured":"Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018)."},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3637528.3671470"},{"key":"e_1_2_1_11_1","volume-title":"Codebert: A pre-trained model for programming and natural languages. arXiv preprint arXiv:2002.08155","author":"Feng Zhangyin","year":"2020","unstructured":"Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, et al. 2020. Codebert: A pre-trained model for programming and natural languages. arXiv preprint arXiv:2002.08155 (2020)."},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.emnlp-main.400"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/3678585"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.2307\/2982840"},{"key":"e_1_2_1_15_1","volume-title":"International Conference on Learning Representations.","author":"Grave Edouard","year":"2017","unstructured":"Edouard Grave, Armand Joulin, and Nicolas Usunier. 2017. Improving neural language models with a continuous cache. In International Conference on Learning Representations."},{"key":"e_1_2_1_16_1","volume-title":"International Conference on Machine Learning (ICML). PMLR, 3929\u20133938","author":"Guu Kelvin","year":"2020","unstructured":"Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. 2020. Retrieval augmented language model pre-training. In International Conference on Machine Learning (ICML). PMLR, 3929\u20133938."},{"key":"e_1_2_1_17_1","unstructured":"HomeAssistant. Accessed Oct. 2025. Home Assistant Website. [online] https:\/\/www.home-assistant.io."},{"key":"e_1_2_1_18_1","unstructured":"HomeAssistant. Accessed Oct. 2025. Python Scripts Integration. [online] https:\/\/www.home-assistant.io\/integrations\/python_script."},{"key":"e_1_2_1_19_1","unstructured":"IFTTT. Accessed Oct. 2025. Building with filter code. [online] https:\/\/help.ifttt.com\/hc\/en-us\/articles\/360052451954-Building-with-filter-code."},{"key":"e_1_2_1_20_1","unstructured":"IFTTT. Accessed Oct. 2025. How to add filter code. [online] https:\/\/help.ifttt.com\/hc\/en-us\/articles\/4406412223771-How-to-add-filter-code."},{"key":"e_1_2_1_21_1","unstructured":"IFTTT. Accessed Oct. 2025. IFTTT website. [online] https:\/\/ifttt.com."},{"key":"e_1_2_1_22_1","first-page":"1","article-title":"Atlas: Few-shot learning with retrieval augmented language models","volume":"24","author":"Izacard Gautier","year":"2023","unstructured":"Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. 2023. Atlas: Few-shot learning with retrieval augmented language models. Journal of Machine Learning Research (JMLR) 24, 251 (2023), 1\u201343.","journal-title":"Journal of Machine Learning Research (JMLR)"},{"key":"e_1_2_1_23_1","volume-title":"Likert scale: Explored and explained. British journal of applied science & technology 7, 4","author":"Joshi Ankur","year":"2015","unstructured":"Ankur Joshi, Saket Kale, Satish Chandel, and D Kumar Pal. 2015. Likert scale: Explored and explained. British journal of applied science & technology 7, 4 (2015), 396."},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.emnlp-main.550"},{"key":"e_1_2_1_25_1","volume-title":"International Conference on Learning Representations (ICLR).","author":"Khandelwal Urvashi","year":"2020","unstructured":"Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, and Mike Lewis. 2020. Generalization through memorization: nearest neighbor language models. In International Conference on Learning Representations (ICLR)."},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/3643505"},{"key":"e_1_2_1_27_1","first-page":"9459","article-title":"Retrieval-augmented generation for knowledge-intensive nlp tasks","volume":"33","author":"Lewis Patrick","year":"2020","unstructured":"Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich K\u00fcttler, Mike Lewis, Wen-tau Yih, Tim Rockt\u00e4schel, et al. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems (NeurIPS) 33 (2020), 9459\u20139474.","journal-title":"Advances in Neural Information Processing Systems (NeurIPS)"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v33i01.33014197"},{"key":"e_1_2_1_29_1","volume-title":"d.]. Pyminifier Tool. [online], https:\/\/github.com\/liftoff\/pyminifier. Accessed","year":"2025","unstructured":"liftoff. [n. d.]. Pyminifier Tool. [online], https:\/\/github.com\/liftoff\/pyminifier. Accessed Oct. 2025."},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICWS60048.2023.00015"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3729482"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/3596254"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1109\/SP40000.2020.00062"},{"key":"e_1_2_1_34_1","volume-title":"A theory of human motivation. Psychological review 50, 4","author":"Maslow Abraham Harold","year":"1943","unstructured":"Abraham Harold Maslow. 1943. A theory of human motivation. Psychological review 50, 4 (1943), 370."},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3604242"},{"key":"e_1_2_1_36_1","volume-title":"Sebastian Thrun, and Tom Mitchell.","author":"Nigam Kamal","year":"2000","unstructured":"Kamal Nigam, Andrew Kachites McCallum, Sebastian Thrun, and Tom Mitchell. 2000. Text classification from labeled and unlabeled documents using EM. Machine learning 39 (2000), 103\u2013134."},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1162\/tacl_a_00605"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1007\/s12652-021-03651-6"},{"key":"e_1_2_1_39_1","volume-title":"Codebleu: a method for automatic evaluation of code synthesis. arXiv preprint arXiv:2009.10297","author":"Ren Shuo","year":"2020","unstructured":"Shuo Ren, Daya Guo, Shuai Lu, Long Zhou, Shujie Liu, Duyu Tang, Neel Sundaresan, Ming Zhou, Ambrosio Blanco, and Shuai Ma. 2020. Codebleu: a method for automatic evaluation of code synthesis. arXiv preprint arXiv:2009.10297 (2020)."},{"key":"e_1_2_1_40_1","doi-asserted-by":"crossref","unstructured":"Stephen Robertson Hugo Zaragoza et al. 2009. The probabilistic relevance framework: BM25 and beyond. Foundations and Trends\u00ae in Information Retrieval 3 4 (2009) 333\u2013389.","DOI":"10.1561\/1500000019"},{"key":"e_1_2_1_41_1","unstructured":"Samsung. Accessed Oct. 2025. SmartThings. [online] https:\/\/www.samsung.com\/us\/smartthings."},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/3472749.3474773"},{"key":"e_1_2_1_43_1","volume-title":"REPLUG: Retrieval-augmented black-box language models. In North American","author":"Seo Minjoon","year":"2024","unstructured":"Minjoon Seo. 2024. REPLUG: Retrieval-augmented black-box language models. In North American Chapter of the Association for Computational Linguistics (NAACL). Association for Computational Linguistics."},{"key":"e_1_2_1_44_1","first-page":"1","article-title":"Learning from User-driven Events to Generate Automation Sequences","volume":"7","author":"Song Yunpeng","year":"2024","unstructured":"Yunpeng Song, Yiheng Bian, Xiaorui Wang, and Zhongmin Cai. 2024. Learning from User-driven Events to Generate Automation Sequences. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies (IMWUT) 7, 4 (2024), 1\u201322.","journal-title":"Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies (IMWUT)"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/2556288.2557420"},{"key":"e_1_2_1_46_1","volume-title":"Codet5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation. arXiv preprint arXiv:2109.00859","author":"Wang Yue","year":"2021","unstructured":"Yue Wang, Weishi Wang, Shafiq Joty, and Steven CH Hoi. 2021. Codet5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation. arXiv preprint arXiv:2109.00859 (2021)."},{"key":"e_1_2_1_47_1","first-page":"24824","article-title":"Chain-of-thought prompting elicits reasoning in large language models","volume":"35","author":"Wei Jason","year":"2022","unstructured":"Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems (NeurIPS) 35 (2022), 24824\u201324837.","journal-title":"Advances in Neural Information Processing Systems (NeurIPS)"},{"key":"e_1_2_1_48_1","unstructured":"Frank Wilcoxon SK Katti Roberta A Wilcox et al. 1963. Critical values and probability levels for the Wilcoxon rank sum test and the Wilcoxon signed rank test. Vol. 1. American Cyanamid Pearl River NY."},{"key":"e_1_2_1_49_1","volume-title":"Memorizing transformers. arXiv preprint arXiv:2203.08913","author":"Wu Yuhuai","year":"2022","unstructured":"Yuhuai Wu, Markus N Rabe, DeLesley Hutchins, and Christian Szegedy. 2022. Memorizing transformers. arXiv preprint arXiv:2203.08913 (2022)."},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/2623330.2623715"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1145\/3485730.3494115"},{"key":"e_1_2_1_52_1","volume-title":"Proceedings of the 30th IEEE\/ACM International Conference on Program Comprehension (ICPC). 99\u2013110","author":"Bani Yusuf Imam Nur","year":"2022","unstructured":"Imam Nur Bani Yusuf, Lingxiao Jiang, and David Lo. 2022. Accurate generation of trigger-action programs with domain-adapted sequence-to-sequence learning. In Proceedings of the 30th IEEE\/ACM International Conference on Program Comprehension (ICPC). 99\u2013110."},{"key":"e_1_2_1_53_1","unstructured":"Zapier. Accessed Oct. 2025. Code by Zapier Integrations. [online] https:\/\/zapier.com\/apps\/code\/integrations."},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00043"},{"key":"e_1_2_1_55_1","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3411838","article-title":"Trace2tap: Synthesizing trigger-action programs from traces of behavior","volume":"4","author":"Zhang Lefan","year":"2020","unstructured":"Lefan Zhang, Weijia He, Olivia Morkved, Valerie Zhao, Michael L Littman, Shan Lu, and Blase Ur. 2020. Trace2tap: Synthesizing trigger-action programs from traces of behavior. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies (IMWUT) 4, 3 (2020), 1\u201326.","journal-title":"Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies (IMWUT)"},{"key":"e_1_2_1_56_1","first-page":"1","article-title":"Helping users debug trigger-action programs","volume":"6","author":"Zhang Lefan","year":"2023","unstructured":"Lefan Zhang, Cyrus Zhou, Michael L Littman, Blase Ur, and Shan Lu. 2023. Helping users debug trigger-action programs. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies (IMWUT) 6, 4 (2023), 1\u201332.","journal-title":"Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies (IMWUT)"},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.emnlp-main.382"}],"container-title":["Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3789673","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,4,16]],"date-time":"2026-04-16T20:00:59Z","timestamp":1776369659000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3789673"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,3,16]]},"references-count":57,"journal-issue":{"issue":"1","published-print":{"date-parts":[[2026,3,16]]}},"alternative-id":["10.1145\/3789673"],"URL":"https:\/\/doi.org\/10.1145\/3789673","relation":{},"ISSN":["2474-9567"],"issn-type":[{"value":"2474-9567","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,3,16]]},"assertion":[{"value":"2026-03-16","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}