This work investigates how locally deployed large language models (LLMs) can power natural‑language automation for smart buildings while minimizing reliance on remote cloud services. Backend processing in this domain must satisfy three requirements: (1) select the correct output type for the user intent, (2) stay within the capabilities of the local model, and (3) produce structured data that conforms to the building‑automation API.
The proposed LocalIntent framework addresses these needs by first routing each request to either an ordinary command branch or a persistent‑rule branch. The ordinary branch yields direct commands, clarification prompts, or rejections. The persistent‑rule branch generates trigger‑action rules, which are then passed through a deterministic validator to ensure syntactic and semantic correctness.
Four locally executed models (Gemma and Qwen, ranging from 2 B to 9 B parameters) were evaluated on 101 non‑persistent requests and 54 persistent‑rule records. Four prompting strategies were compared:
- Monolithic prompting
- Generic two‑stage prompting
- LocalIntent prompting
- Validation‑guided repair
Key findings:
- For persistent rules, LocalIntent raised intent‑understanding accuracy 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, improvements were modest but consistent: intent understanding increased from 39.6 % to 53.2 %, and action/parameter correctness from 30.7 % to 42.8 %.
- Clarification and mode‑selection accuracy remained highly model‑dependent, with larger models generally performing better.
The results demonstrate that outcome‑specific routing combined with structured generation substantially enhances the practicality of local LLMs for smart‑building automation, especially for complex tasks that require persistent rule creation.
Review