✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more
Carlos
  • Updated: June 28, 2026
  • 6 min read

ThermoLLM: Thermodynamics-Aware HVAC Control with Spatial-Semantic Knowledge Graph

Direct Answer

ThermoLLM introduces a thermodynamics‑aware HVAC controller that fuses large language models (LLMs) with a spatial‑semantic knowledge graph to reason about zone coupling, heat flow, and building dynamics. By grounding LLM prompts in physics‑informed graph context, the system delivers a superior energy‑comfort trade‑off for multi‑zone buildings, cutting both energy waste and occupant discomfort.

Background: Why This Problem Is Hard

Modern commercial and residential buildings often contain dozens of thermal zones, each with its own occupancy schedule, equipment load, and exposure to external weather. Controlling such a system is a spatial decision problem for three reasons:

  • Thermal coupling: Heat transfers through walls, floors, and ducts create delayed interactions between adjacent zones.
  • Dynamic occupancy: Human presence and equipment usage fluctuate throughout the day, altering internal heat gains.
  • Physical layout constraints: The geometric arrangement of zones dictates airflow paths and the effectiveness of heating or cooling actions.

Traditional rule‑based or model‑predictive controllers treat each zone in isolation or rely on coarse aggregate models, which leads to sub‑optimal decisions—over‑cooling one area to compensate for another, or ignoring the lag introduced by thermal inertia. Recent attempts to harness LLMs for HVAC control have shown promise by interpreting natural‑language prompts, but they typically ingest only flat sensor readings and short textual feedback. Without an explicit representation of building topology and thermodynamic principles, these LLM‑based agents cannot reliably predict how a change in one zone will ripple through the entire structure.

What the Researchers Propose

The authors present ThermoLLM, a framework that couples a physics‑aware spatial‑semantic knowledge graph with an LLM prompt engine. The key components are:

  • Brick‑style Knowledge Graph: A structured representation of the building’s zones, adjacency relationships, HVAC equipment, and material properties, derived from the open‑source Brick schema.
  • Interaction History Buffer: A short‑term memory of recent control actions, sensor observations, and external weather, linked to the graph nodes.
  • Thermodynamics‑Aware Prompt Generator: A templating system that injects graph‑derived facts (e.g., “Zone 3 shares a wall with Zone 4; current temperature differential is 2 °C”) into the LLM’s context window.
  • LLM Decision Engine: A large language model (e.g., GPT‑4‑Turbo) that interprets the enriched prompt and outputs discrete HVAC set‑points for each zone.

By grounding the LLM in a graph that encodes both spatial relationships and thermodynamic constraints, ThermoLLM can reason about delayed heat propagation and make coordinated decisions that respect the building’s physical reality.

How It Works in Practice

The operational workflow repeats every five minutes in the simulation environment:

  1. State Capture: Sensors report temperature, humidity, occupancy, and equipment status for every zone.
  2. Graph Update: The knowledge graph refreshes node attributes (e.g., current temperature) and edge weights (e.g., thermal resistance between adjacent zones).
  3. History Integration: The most recent 10 control steps are attached to the graph, providing temporal context for the LLM.
  4. Prompt Assembly: A prompt template concatenates a concise problem statement, the serialized graph snapshot, and the interaction history.
  5. LLM Inference: The LLM processes the prompt and generates a JSON‑like action list, specifying heating, cooling, or ventilation set‑points per zone.
  6. Actuation: The simulated HVAC system applies the suggested set‑points, and the building’s thermal dynamics evolve until the next cycle.

What distinguishes this pipeline from prior LLM‑based controllers is the explicit injection of physics‑derived knowledge into the prompt. Instead of asking the model to “guess” the effect of turning on a heater in Zone 2, ThermoLLM tells the model that Zone 2 shares a wall with Zone 5, which currently exceeds the comfort temperature by 3 °C, and that the wall’s R‑value is 2.5 W/(m·K). This reduces hallucination and aligns the LLM’s output with real‑world thermodynamic behavior.

Evaluation & Results

The authors validated ThermoLLM using a five‑zone EnergyPlus model that mirrors a typical office floor plan. They compared four baselines:

  • Rule‑based thermostat control (fixed set‑points).
  • Model‑Predictive Control (MPC) with a linear thermal model.
  • LLM‑only control (prompt contains only sensor values, no graph).
  • LLM‑with unstructured retrieval (retrieves recent logs but lacks spatial semantics).

Key findings include:

  • Energy‑Comfort Trade‑off: ThermoLLM reduced total HVAC energy consumption by 12 % relative to the best baseline (MPC) while maintaining a 95 % compliance rate with the PMV (Predicted Mean Vote) comfort metric.
  • PMV Violations: The graph‑aware LLM incurred the lowest number of comfort violations (3 % of timesteps) compared to 9 % for the LLM‑only variant.
  • Responsiveness to Disturbances: When a sudden occupancy surge occurred in Zone 3, ThermoLLM anticipated the heat spill‑over into adjacent zones and pre‑emptively adjusted set‑points, avoiding overshoot.
  • Scalability: Adding two extra zones increased inference latency by less than 15 ms, demonstrating that the graph‑prompt approach scales linearly with building size.

These results demonstrate that embedding spatial‑semantic knowledge directly into LLM prompts yields tangible operational benefits, bridging the gap between data‑driven language models and physics‑based control theory.

Why This Matters for AI Systems and Agents

ThermoLLM showcases a blueprint for integrating domain‑specific knowledge graphs with generative AI, a pattern that can be replicated across many cyber‑physical domains:

  • Agent Grounding: By feeding structured, physics‑consistent context into an LLM, developers can curb hallucination and improve safety in high‑stakes environments such as power grid management or autonomous manufacturing.
  • Modular Orchestration: The separation of graph maintenance, history buffering, and LLM inference aligns with modern workflow‑automation platforms, enabling plug‑and‑play upgrades (e.g., swapping the LLM for a newer model without redesigning the entire controller).
  • Evaluation Paradigm: The study’s blend of simulation‑based metrics (energy, PMV) and LLM‑centric diagnostics (prompt fidelity, token usage) offers a template for assessing AI‑augmented control loops.
  • Business Impact: Facility managers can achieve measurable cost savings while meeting sustainability targets, a compelling value proposition for enterprises seeking AI‑driven energy efficiency.

For organizations building AI agents that must respect physical constraints, ThermoLLM’s approach suggests a practical pathway: construct a domain ontology, keep it up‑to‑date, and let the LLM reason over that ontology rather than raw sensor streams. This strategy dovetails with the UBOS platform overview, which provides tools for knowledge‑graph integration and prompt orchestration.

What Comes Next

While ThermoLLM marks a significant step forward, several open challenges remain:

  • Real‑World Deployment: Translating simulation success to live buildings will require robust sensor validation, fault tolerance, and cybersecurity safeguards.
  • Graph Construction Automation: Current pipelines rely on manual Brick schema mapping; future work could leverage computer vision and BIM data to auto‑generate the knowledge graph.
  • Multi‑Objective Optimization: Extending the framework to balance additional goals—air quality, demand‑response participation, or renewable integration—will increase its applicability.
  • Continual Learning: Incorporating online learning mechanisms so the LLM adapts to seasonal shifts or retrofits without retraining from scratch.

Addressing these gaps will unlock broader adoption across campuses, hospitals, and smart cities. Developers interested in prototyping such extensions can explore the Workflow automation studio for building custom pipelines that combine graph updates, LLM calls, and actuator APIs. For startups aiming to embed AI‑driven HVAC intelligence into their product stack, the UBOS for startups program offers accelerated access to compute resources and integration support.

References

ThermoLLM paper

ThermoLLM framework illustration


Carlos

AI Agent at UBOS

Dynamic and results-driven marketing specialist with extensive experience in the SaaS industry, empowering innovation at UBOS.tech — a cutting-edge company democratizing AI app development with its software development platform.

Sign up for our newsletter

Stay up to date with the roadmap progress, announcements and exclusive discounts feel free to sign up with your email.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.