arXiv:2610.23511cs.AIOct 2026

Manuscript Offprint

arXiv:2610.23511

LocalIntent: Outcome-Specific Structured Generation for Backend-Compatible Smart Building Automation with Local LLMs

Tianyang Liu, Jiayue Wang, Zhanhao Cheng, Changyang Wang, Shaoshu Zhu, Zhenghao Wu, Hadi Tabatabaee Malazi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Tianyang Liu 1^{1}, Jiayue Wang 1^{1}, Zhanhao Cheng 1^{1}, Changyang Wang 1^{1}, Shaoshu Zhu 2^{2}, Zhenghao Wu 2^{2}, and Hadi Tabatabaee Malazi 1,2^{1,2}

1^{1} Beijing Dublin International College, University College Dublin, Beijing, China

2^{2} School of Computer Science, University College Dublin, Dublin, Ireland

Hadi.TabatabaeeMalazi@ucd.ie

Abstract. Locally deployed large language models (LLMs) can reduce reliance on remote cloud services for natural language smart building automation, but backend-facing processing requires correct outcome selection, alignment with local capabilities, and valid structured outputs. We investigate whether a complete outcome-specific prompting design improves compact-model outputs beyond generic route-then-generate prompting. The proposed LocalIntent approach routes requests to ordinary or persistent-rule branches: the former produces commands, clarifications, or rejections, while the latter generates trigger-action rules, followed by deterministic validation. We evaluate four locally executed Gemma and Qwen models spanning 2B–9B parameters on 101 non-persistent and 54 persistent-rule records, comparing Monolithic prompting, generic two-stage prompting, LocalIntent, and validation-guided repair. Across the evaluated datasets, LocalIntent achieves higher intent understanding, device identification, and action/parameter correctness than generic two-stage prompting, while clarification/mode correctness remains model-dependent. The largest gains occur for rules, where LocalIntent improves intent understanding from 26.4% to 80.6%, device identification from 59.3% to 84.7%, rule-mode correctness from 49.1% to 98.6%, and action/parameter correctness from 5.6% to 44.9%. For non-persistent requests, pooled gains are smaller: intent understanding increases from 39.6% to 53.2%, and action/parameter correctness from 30.7% to 42.8%.

Keywords: Smart building automation · Local LLM inference · Edge intelligence · Intent understanding · Structured output generation · Automation rule generation

1 Introduction

Smart buildings coordinate lighting, ventilation, blinds, and sensor-driven services. Natural language interfaces can improve access, but requests require different backend outcomes: "turn on the meeting-room lights" is an immediate command, whereas "turn on the meeting-room lights whenever occupancy is detected" defines a persistent rule. Incomplete requests require clarification; unsupported requests require rejection.

Intent processing must select the requested behaviour and backend outcome, then generate a representation the platform can process. Automation-output correctness requires correct outcome selection, schema compliance, grounding in available devices

Tianyang Liu et al.

and sensors, supported actions and parameters, and semantic consistency. A well-formed output is insufficient if it invents capabilities, guesses missing information, or executes future-triggered behaviour immediately.

These requirements are particularly important for local LLMs, which must process requests near the managed environment while relying on local capability information and limited computational resources. On-device LLMs have supported Home Assistant intent detection and response generation [3] and privacy-oriented personalised assistance [7]. However, local processing does not ensure backend-ready output: compact models must still interpret temporal scope, select an outcome, resolve entities, and generate structured output within resource and response-time constraints.

Prior work examines LLM-based device control [10], IoT program synthesis [18,17], rule authoring [6], and structured generation [12,19]. Evaluations also expose failures on invalid, ambiguous, and multi-device requests [11]. These strands usually treat intent interpretation, program construction, rule authoring, or schema compliance separately. They provide limited evidence on the complete backend-facing transformation from a request to a command, stored rule, clarification, or rejection, followed by a representation valid for that outcome. Existing approaches rarely evaluate whether outcome selection itself should determine the generation constraints and validation criteria used for backend-facing automation. Our hypothesis is that the complete LocalIntent design achieves higher automation-output correctness than generic route-then-generate prompting, particularly for persistent rules.

We introduce LocalIntent, which routes requests to an ordinary or persistent-rule branch. The rule branch generates a predicate-bearing trigger and action. The ordinary branch produces a target-action-parameter command, clarification, or rejection under non-execution guardrails. A deterministic validator tests structure, registered entities, supported actions and parameters, and mechanically testable rule consistency. We compare LocalIntent with Monolithic prompting and TwoStageGeneric, a generic route-then-generate design. The methods differ in routing labels, prompts, schemas, context presentation, and fallbacks; thus, we compare complete designs without isolating individual mechanisms. We also assess validation-guided repair and local inference latency. LocalIntent's clearest differences occur on persistent rules; non-persistent differences are smaller and model-dependent, and repair adds little aggregate benefit.

This paper makes four contributions:

  1. We formulate local LLM-based smart building automation as structured generation with four outcomes: immediate commands, persistent rules, clarification, and rejection, each with distinct temporal semantics and validity conditions.

  2. We introduce LocalIntent with ordinary/rule routing, command and non-execution guardrails, persistent-rule mapping, and automatic local-capability validation.

  3. We construct two controlled evaluation datasets: 101 non-persistent requests covering commands, clarifications, and rejections, and 54 persistent-rule requests. We evaluate four local Gemma and Qwen models (2B–9B parameters).

  4. We release implementation and evaluation artefacts in a public repository 3^{3}.

3^{3} https://github.com/ucd-soc2/localIntent

References (23)