Skip to Content
ElectronicsElectronics
  • Article
  • Open Access

25 August 2026

32 Pages

Urban AI OS: An LLM-Driven Semantic Orchestration Layer for Distributed Edge Intelligence

,
and
1
Department of Management Science and Technology, Democritus University of Thrace (DUTH), 65404 Kavala, Greece
2
Department of Cultural Technology and Communication, Intelligent Systems Lab, University of the Aegean, 81100 Mytilene, Greece
*
Authors to whom correspondence should be addressed.

Abstract

Urban Internet-of-Things (IoT) infrastructures increasingly host distributed artificial intelligence workloads across heterogeneous edge environments, supporting applications such as urban monitoring, resource optimization, and large-scale sensing analytics. Despite the rapid adoption of edge AI, current systems lack a unified architectural layer responsible for orchestrating distributed intelligence across dynamic urban infrastructures. Existing orchestration mechanisms are typically rule-based and rely on low-level telemetry signals such as latency, node availability, or network conditions, limiting their ability to interpret the contextual meaning of system behavior and environmental events. This paper introduces Urban AI OS, a trustworthy LLM-based semantic control layer for distributed urban edge intelligence. The proposed architecture transforms heterogeneous telemetry and environmental signals into high-level semantic events through large language model reasoning, enabling context-aware orchestration decisions including adaptive topology management, workload coordination, and node role assignment. To address the reliability risks associated with LLM-assisted control, Urban AI OS employs confidence-gated execution with deterministic fallback policies, post-action monitoring, rollback, and auditable decision logging to constrain the operational impact of uncertain or erroneous LLM recommendations. By decoupling semantic reasoning from the data plane execution of AI workloads, Urban AI OS provides a model-agnostic framework for managing large-scale urban edge intelligence infrastructures. Experimental evaluation on a real-world urban IoT deployment with 50+ edge devices demonstrates that the proposed semantic operating layer improves system responsiveness by 35%, reduces unnecessary topology changes by 42%, and improves communication efficiency compared to conventional rule-based and adaptive threshold baselines, while maintaining confidence calibration through formal fallback mechanisms.

1. Introduction

Urban Internet-of-Things (IoT) and edge computing have emerged as critical infrastructures for smart cities, supporting applications ranging from energy management to real-time monitoring and large-scale analytics [1]. The proliferation of heterogeneous edge devices—including sensors, smart meters, building controllers, and computational nodes—has created complex distributed systems that require sophisticated orchestration strategies. Contemporary urban deployments employ federated learning [2] and distributed AI models [3] to process data closer to the source, reducing latency and bandwidth consumption while preserving privacy.
However, orchestrating these systems remains fundamentally challenging. Current orchestration platforms, such as Kubernetes [4], rely on rule-based policies and static thresholds (e.g., “if CPU > 80% or latency > 100 ms, migrate workload”). While these approaches are effective for generic cloud deployments, they are poorly suited for urban edge environments where system behavior is driven by complex interactions between infrastructure constraints, environmental conditions, and application-specific requirements [5].
The core problem: Traditional rule-based orchestration lacks the ability to interpret the semantic context of system behavior. It cannot distinguish between similar symptoms with different root causes. For instance, high CPU utilization on an edge node may indicate either natural peak load driven by external events (weather, time-of-day patterns) or genuine node degradation. Rule-based systems respond identically to both scenarios, triggering unnecessary topology reconfigurations that disrupt workload execution and degrade system stability.
Recent advances in large language models (LLMs) have demonstrated remarkable reasoning capabilities across diverse domains [6]. Emerging work has explored LLM applications in system management and AIOps [7,8], suggesting that LLM-based reasoning could enhance orchestration decisions by enabling context-aware mapping of heterogeneous observations to higher-level system states and candidate causal relationships. However, applying LLMs to critical infrastructure orchestration presents a distinct challenge: LLMs are prone to hallucination, and their decisions must be verifiable and recoverable. Existing LLM-assisted orchestration approaches do not adequately address reliability and safety concerns required for deployment in production urban environments.
This work’s contribution: We introduce Urban AI OS, a trustworthy LLM-based semantic orchestration layer that transforms raw telemetry into high-level semantic events, enabling context-aware orchestration decisions. The key innovation is a trustworthy execution architecture that separates probabilistic LLM reasoning from infrastructure control through a confidence-gated execution mechanism: high-confidence recommendations are executed immediately, moderate-confidence recommendations are executed with conservative policies, and low-confidence recommendations trigger fallback to rule-based orchestration. Post-action monitoring, rollback, and auditable decision logging further constrain the operational impact of uncertain or erroneous LLM outputs.
We demonstrate the effectiveness of this approach through evaluation on a real-world urban IoT deployment with 54 edge devices, showing 35% improvement in system responsiveness, 42% reduction in unnecessary topology changes, and strong confidence calibration across 8 weeks of continuous operation. The system is model-agnostic and operates independently of underlying machine learning algorithms, providing a generalizable framework for semantic orchestration across diverse urban AI deployments.

3. System Overview

Urban AI OS is a layered architecture separating concerns across infrastructure, execution, telemetry, reasoning, and control planes. This design addresses fundamental challenges in urban edge environments: heterogeneous nodes, dynamic connectivity, and contextual dependencies that prevent effective rule-based orchestration [4]. The system combines LLM-driven semantic reasoning with confidence-gated execution for safe, context-aware orchestration [2].

3.1. Urban AI OS Architecture

The five-layer architecture (Figure 1) comprises.
Figure 1. Urban AI OS five-layer architecture. Telemetry flows upward; decisions flow downward through confidence-gated orchestrator. Control-data plane decoupling enables independent scaling and failure isolation.

3.1.1. Urban Edge Infrastructure Layer

This is the physical substrate of heterogeneous devices: sensing nodes (IoT sensors, energy meters), computational nodes (1 GB–32 GB RAM edge servers), network infrastructure (WiFi, LoRaWAN, ethernet), and control hardware (BMS controllers, actuators). This layer generates raw telemetry reflecting environmental observations (temperature, humidity, energy consumption) and infrastructure health (CPU, memory, network latency, device availability).
The fundamental challenge is heterogeneity: computational diversity (mobile gateways with 500 MB vs. servers with 8 GB), connectivity diversity (WiFi 100 Mbps vs. LoRaWAN 50 bps), failure modes (hard failures vs. graceful degradation), and operational windows (24/7 vs. business hours only). Static rule-based policies cannot adapt to this diversity.

3.1.2. Distributed AI Workload Layer (Data Plane)

This is the execution layer hosting diverse ML paradigms: federated learning (distributed training with periodic aggregation), centralized training (cloud-based models deployed to edge), distributed inference (model ensembles), and hybrid analytics. The system is deliberately model-agnostic: it reasons about abstract workload properties (status, throughput, latency, accuracy drift, resource utilization, convergence rate) rather than specific algorithms. This enables a single orchestration system to manage heterogeneous workloads, maintains bounded complexity independent of workload count, and enables seamless integration of new ML techniques.

3.1.3. Semantic Telemetry Layer

This is the interface between infrastructure and reasoning engine. Transforms raw metrics into semantic observations through two key transformations:
Contextual Enrichment: The raw signal “CPU = 85%” becomes the enriched signal including baseline (60%), spike magnitude (41.67%), temporal context (afternoon peak, weekday), recent events (workload migration 5 min ago), and related observations (network stable, memory normal). This context enables the LLM to distinguish legitimate peak load from degradation.
Multi-Source Aggregation: Combines infrastructure metrics (CPU/memory/disk/network), environmental observations (temperature, weather, occupancy), workload indicators (status, throughput, accuracy drift), and operational signals (recent actions, maintenance windows) into unified JSON representation. Aggregation over a 12 h sliding window with 5 min intervals enables trend detection, statistical comparison, event correlation, and pattern identification.

3.1.4. Semantic Reasoning Engine

This is an LLM-powered reasoning [6] component that maps structured telemetry and contextual information to predefined high-level system event categories and corresponding orchestration recommendations.The engine performs semantic event identification by recognizing high-level system patterns: for instance, detecting when energy consumption rises 45%, latency increases 20%, and temperature spikes simultaneously as an ENERGY_SURGE event (indicating legitimate peak demand rather than system degradation, recommending adaptive load management rather than topology escalation). It executes causal reasoning by synthesizing multiple observations to infer root causes—for example, recognizing that a CPU spike immediately after workload migration, with stable memory and no other anomalies, indicates transient startup behavior rather than node degradation, recommending observation rather than action. The engine provides confidence estimation through explicit uncertainty quantification (0.0–1.0) for each interpretation, enabling graduated response based on certainty. Finally, it produces action recommendations specifying concrete orchestration actions with reasoning and fallback strategies for when confidence decreases.
It is invoked via two triggers: (1) periodic (every 3–5 min) to detect slow-developing problems, (2) event-triggered (metric deviation > 50% from baseline or connectivity loss) for urgent assessment. It uses a three-stage prompt architecture: observation assembly, semantic interpretation, and action recommendation. Its computational characteristics include the following: 2–5 s latency, $0.0045/inference, 8192 token context window, graceful degradation to rule-based if unavailable.

3.1.5. Orchestration Scheduler and Topology Manager

This executes recommendations through a confidence-gated mechanism—the core safety innovation. The orchestrator performs workload scheduling by assigning tasks to nodes based on resource requirements, computational capabilities, and load balancing constraints. It handles topology reconfiguration through dynamic cluster restructuring—for example, partitioning 54 nodes into three clusters of 18 nodes each instead of all-to-all aggregation, reducing communication overhead by approximately 80%. The system manages node role assignment dynamically, selecting roles such as aggregator (coordinates training rounds), participant (executes local training), observer (monitors health), or seed server (initializes models) based on current system state. It adjusts communication management parameters including aggregation frequency, data compression, and checkpointing strategies to optimize bandwidth utilization during different operating conditions. Finally, it performs resource allocation through predictive pre-allocation—for instance, when weather forecasts predict a hot day that will drive HVAC loads, the system pre-allocates 20% additional compute on nodes running energy management workloads to handle anticipated demand.
Confidence-gated execution implements a graduated response: (1) c t > 0.8 → execute immediately, (2) 0.5 < c t ≤ 0.8 → execute conservatively with monitoring, (3) c t ≤ 0.5 → fallback to rule-based. Changes are staged gradually (5–10 min) to avoid disruption; decisions are logged with rollback capability.

3.2. Design Principles

3.2.1. Model-Agnostic Orchestration

System operates independently of specific ML models or algorithms [5], enabling flexible deployment, cross-application reasoning, bounded complexity, and robustness to ML evolution. Implementation: abstract workload properties (resource demands, convergence, data volume, communication patterns) rather than algorithm-specific knowledge.

3.2.2. Semantic Abstraction

Performs context-aware reasoning rather than threshold-based reactions. Rule-based logic (CPU > 80% → migrate) is brittle: high CPU at 2pm (expected) vs. 3am (problem) requires context. Semantic reasoning provides: (1) context-aware interpretation, (2) causal inference, (3) anomaly detection with explanation, (4) predictive action, (5) uncertainty quantification. Implementation: telemetry enrichment with baseline/temporal context + LLM causal reasoning.

3.2.3. Control-Data Plane Decoupling

Semantic reasoning and workload execution operate independently with asynchronous communication. Benefits: (1) independent scaling (LLM latency does not block training), (2) failure isolation (reasoning failure → fallback to rules; workload failure does not affect orchestration), (3) independent evolution (new ML or orchestration strategies deployable separately), (4) auditability (decisions logged independently), (5) resource efficiency (reasoning runs at low priority), (6) deployment simplicity (thin layer on existing systems).

4. Semantic Control Model

The semantic control model defines how raw telemetry is transformed into actionable orchestration decisions. Three components comprise this model: (1) semantic event taxonomy, (2) semantic telemetry representation, and (3) LLM-based reasoning pipeline. In this work, the term ‘semantic’ is used operationally to denote the mapping of heterogeneous low-level telemetry and contextual signals into predefined, human-interpretable system-level event categories. It does not imply human-like understanding, consciousness, or intrinsic comprehension of the physical system by the LLM. Accordingly, ‘semantic reasoning’ refers to context-conditioned pattern interpretation and structured mapping within the defined orchestration domain.

4.1. Semantic Event Taxonomy

A formal taxonomy of six semantic event types guides LLM interpretation, with each event representing a high-level system condition that triggers orchestration decisions. ENERGY_SURGE occurs when consumption rises beyond baseline, implying demand increase from external factors (weather, occupancy); the system recommends adaptive load management rather than escalation. NODE_DEGRADATION indicates systematic performance decline (latency rising, throughput dropping, error rates increasing), implying imminent failure risk; this recommends workload rebalancing away from the affected node. NETWORK_PARTITION represents connectivity loss between node groups (e.g., a neighborhood cluster becomes isolated), implying isolation risk; this recommends immediate topology reconfiguration to restore connectivity or graceful degradation. WORKLOAD_DRIFT occurs when model predictions diverge significantly from baseline (accuracy declining, error patterns changing), implying concept drift in the underlying data distribution; this recommends retraining the affected model. TOPOLOGY_IMBALANCE indicates uneven load distribution across the system (some aggregators handling 3× the throughput of others), implying inefficiency and possible saturation; this recommends rebalancing computational assignments. PEAK_LOAD_EXPECTED represents anticipated surges detected from external signals (weather forecasts, calendar events, historical patterns), implying proactive action is beneficial; this recommends pre-allocation of resources before peak demand arrives.
The taxonomy was derived through a domain-driven design process based on recurrent operational conditions observed in the urban IoT deployment and expert analysis of the corresponding orchestration requirements. Rather than adopting an existing ontology directly, the objective was to define a compact set of operationally meaningful event classes that connect heterogeneous telemetry patterns with actionable orchestration responses. The taxonomy is therefore application-oriented and extensible rather than universal: additional domains can introduce new event types while preserving the same event representation, confidence gating, and execution pipeline.
Each semantic event carries mandatory fields including type, timestamp, affected nodes, confidence score, recommended action, fallback action, and reasoning explanation. This structured format enables the dual-action pattern (primary recommendation plus fallback strategy) that supports graduated response based on confidence levels.
Table 1 complements these definitions by providing a compact reference of the corresponding trigger conditions, primary actions, and fallback strategies.
Table 1. Semantic event taxonomy with trigger conditions, primary orchestration actions, and fallback strategies. Each event type represents a distinct system condition requiring specific response patterns.The symbols ↑ and ↓ indicate an increase and a decrease, respectively.

4.2. Semantic Telemetry Representation

Structured JSON encoding transforms heterogeneous metrics into a unified representation suitable for LLM reasoning: Electronics 15 03820 i001
This representation enables the LLM to synthesize multi-dimensional signals: metric + baseline + context + temporal + recent_events → semantic interpretation. Without this enrichment, raw metrics (“CPU = 85%”) provide insufficient context for causal reasoning.

4.3. LLM-Based Reasoning Pipeline

The reasoning process follows a structured three-stage prompt architecture that guides the LLM through systematic analysis:
Stage 1: Observation Assembly. Input: current enriched telemetry + 12 h history + system configuration. Task: “What observations stand out? Which metrics deviate? What events explain changes?” Output: salient observations flagged.
Stage 2: Semantic Interpretation. Task: “What is actually happening? What are probable root causes? What trajectory if no action?” The LLM produces natural-language system state summary, causal hypotheses, and predicted trajectory. Example: “Energy consumption rose 45%, correlates with weather temperature spike and occupancy increase → likely HVAC peak demand (probability 0.92). Expected to resolve in 2–3 h as temperature stabilizes”.
Stage 3: Action Recommendation. Task: “What actions should orchestrator take? Confidence in each? Expected outcomes and risks?” Output: ranked list of actions with confidence scores and reasoning. Example:
  • Primary action (conf 0.88): Increase aggregation frequency 5→3 min, pre-allocate 15% compute for cooling models.
  • Fallback action (if confidence drops): Increase monitoring frequency, defer topology changes until clarity improves.

4.4. Prompt Engineering for Orchestration

Effective semantic reasoning requires careful prompt design. Key elements:
  • Structured context: Telemetry formatted as JSON enables parsing; natural-language explanations (“baseline is 60%, current is 85%, this is a 41.67% spike”) enable reasoning.
  • Explicit constraints: “Avoid excessive topology changes (costly, disruptive); prefer gradual adaptation” guides decision-making toward practical solutions.
  • Outcome focus: “What should happen next?” rather than “explain this metric” drives toward actionable recommendations.
  • Uncertainty expression: “How confident are you?” elicits explicit confidence scores rather than binary decisions.
  • Fallback awareness: “What if your confidence drops?” prompts reasoning about conservative alternatives.

4.5. Semantic Event Output Format

The LLM outputs a structured semantic event that the execution layer processes: Electronics 15 03820 i002aElectronics 15 03820 i002b
This format decouples semantic reasoning (LLM) from decision execution (scheduler), enabling independent evolution and auditability of each stage.

5. Orchestration Framework

The orchestration framework translates semantic recommendations into concrete system actions through a decision model, context-aware policies, topology adaptation, and a confidence-gated execution. Figure 2 illustrates the complete Urban AI OS control loop, showing how telemetry flows from edge infrastructure through semantic enrichment and LLM reasoning to orchestration decisions that feed back into system topology updates.
Figure 2. Raw telemetry from edge infrastructure flows upward through semantic enrichment, LLM reasoning, and orchestration scheduling, producing topology updates that are applied back to the system. The cycle closes as the updated system state generates new telemetry for continued reasoning.

5.1. Decision Model

The orchestrator maintains a closed-loop decision process:
  • Semantic Event Reception: Orchestrator receives semantic event from reasoning engine with confidence score, recommended action, and fallback action.
  • Confidence Gating: Decision routes through confidence gate (Section 5.3).
  • Action Execution: Selected action is executed (primary, fallback, or rule-based).
  • Monitoring: System monitors metrics specified in event (monitoring_metrics). If the outcome matches the prediction, the action is succeeded; if it diverges, the escalation is triggered.
  • Logging: Every decision logged with (event, action, outcome, elapsed time, nodes affected) for audit and learning.
  • Feedback Loop: Outcomes feed back to reasoning engine on next invocation, improving context for future decisions.
This closed-loop design ensures accountability and enables continuous improvement through experience.

Formal Orchestration Model

Let the system state at time t be represented as s t ∈ S , where s t contains infrastructure metrics, environmental observations, workload indicators, and recent operational events. The semantic reasoning layer implements a mapping
f θ : S → E × [ 0 , 1 ] × A ,
producing a semantic event e t ∈ E , a confidence score c t ∈ [ 0 , 1 ] , and a recommended action a t ∈ A . The action space A includes workload migration, resource allocation, topology reconfiguration, monitoring adjustment, and rule-based fallback.
The confidence-gated execution policy is formally defined as
π ( s t ) = a t , c t > τ high , a t cons , τ low < c t ≤ τ high , a t rule , c t ≤ τ low ,
where a t cons denotes a conservative version of the recommended action, a t rule denotes the deterministic rule-based fallback action, and τ high and τ low represent the confidence thresholds.
The orchestration objective is to select actions that jointly minimize response latency, communication overhead, disruptive topology reconfigurations, and workload degradation while maintaining system stability. This objective can be expressed as
min π J = α L + β C + γ R + δ D ,
where L denotes response latency, C represents communication cost, R represents reconfiguration cost, and D denotes workload degradation. The coefficients α , β , γ , and δ are application-dependent weighting factors reflecting the relative importance of each orchestration objective.

5.2. Context-Aware Orchestration Policies

Orchestration actions are contextual—the same metric triggers different responses based on semantic interpretation:
  • ENERGY_SURGE + high confidence (≥0.8):
    –
    Increase aggregation frequency (reduce per-round communication overhead during high-throughput periods).
    –
    Pre-allocate compute resources for energy management workloads.
    –
    Increase monitoring of thermal conditions to detect cooling constraints.
  • NODE_DEGRADATION + high confidence:
    –
    Rebalance workload away from degraded node.
    –
    Promote backup aggregator if affected node was aggregator.
    –
    Increase health-check frequency to detect point of failure.
  • PEAK_LOAD_EXPECTED + high confidence (predictive):
    –
    Pre-allocate compute (20– 30 % ) headroom on nodes running affected workloads.
    –
    Restructure topology if needed to reduce communication latency before peak.
    –
    Reduce background activity on resource-constrained nodes.
  • Uncertain Event (confidence < 0.5):
    –
    Increase monitoring frequency (sample metrics every 30 s instead of 5 min).
    –
    Refrain from invasive decisions (topology changes, role reassignment).
    –
    Trigger re-evaluation in 10–15 min to reassess.
    –
    Activate rule-based safeguards (absolute thresholds) as backup.
These policies encode the principle: high confidence → aggressive action; low confidence → cautious monitoring.
These thresholds are empirically selected operating points rather than universal constants and may require recalibration when the framework is transferred to different deployments, workloads, or LLM backends.

5.3. Confidence-Gated Execution (Core Safety Mechanism)

The key innovation: LLM recommendations do not execute directly, but pass through a three-level confidence gate with a graduated response.
In the high-confidence zone ( c t > τ high , default 0.8), the system executes the primary recommendation immediately. For example, when the LLM detects ENERGY_SURGE with confidence 0.88, supported by five correlated signals confirming weather-driven demand, the system immediately executes the recommendations: increases aggregation frequency from 5 to 3 min and pre-allocates 15% of compute resources. The rationale is that multiple independent signals converging on the same interpretation provide high reliability and warrant immediate action.
In the moderate-confidence zone ( τ low < c t ≤ τ high , default 0.5–0.8), the system executes a conservative version of the recommendation plus intensive monitoring. When detecting a latency spike with confidence 0.72 and recognizing recent interference as the likely cause, the system adjusts aggregation frequency but refrains from topology changes, instead monitoring for 15 min and only escalating to topology reconfiguration if the problem persists. This approach trades off responsiveness for safety: the signal is clear enough to warrant action, but not overwhelmingly clear, so reversible actions with monitoring are preferred over disruptive topology changes.
In the low-confidence zone ( c t ≤ τ low ), default ≤ 0.5 ), the system activates rule-based orchestration fallback. When encountering an unusual metric combination like node CPU dropping 40 % without convergence improvement (contradictory signals that do not fit known patterns), the LLM expresses low confidence ( 0.38 ) in WORKLOAD_DRIFT interpretation. The system then defers semantic reasoning and activates rule-based safeguards, responding only to absolute thresholds and awaiting additional data before making semantic orchestration decisions. This ensures that insufficient confidence in semantic interpretation leads to reversion to safe, well-understood rules.
This three-level structure enables safe LLM integration by formalizing uncertainty: the LLM does not claim more confidence than warranted, and the system respects those bounds.
Figure 3 visualizes the confidence-gated execution decision process, illustrating how confidence scores determine which action path is executed.
Figure 3. Confidence-gated execution decision flowchart. LLM confidence scores are routed through three decision points: scores > 0.8 execute primary actions immediately; scores 0.5 – 0.8 execute conservative actions with monitoring; scores ≤ 0.5 activate rule-based fallback. This graduated response ensures safety by matching action aggressiveness to confidence levels.
Limitations of confidence-based gating. The confidence score used by the proposed mechanism should not be interpreted as a direct detector of LLM hallucinations or as a formal guarantee of correctness. LLMs may produce semantically incorrect recommendations while expressing high confidence; consequently, confidence gating alone cannot prevent all erroneous orchestration decisions. In Urban AI OS, the confidence score is therefore treated as one risk-control signal rather than proof that an LLM recommendation is correct. The mechanism primarily limits exposure to uncertain decisions and provides a deterministic fallback path when uncertainty is detected. High-confidence outputs may still be erroneous and must remain subject to execution constraints, post-action monitoring, and rollback mechanisms.
Importantly, the confidence gate does not operate as the sole protection mechanism. Recommendations are subsequently constrained by the orchestration layer: disruptive adaptations are staged gradually, system health is monitored after execution, and actions can be rolled back when observed outcomes diverge from expected behavior. Thus, a high-confidence score authorizes consideration of the primary action but does not constitute evidence of semantic correctness. This layered design reduces the operational impact of confidently incorrect LLM outputs, although it cannot eliminate the possibility of such outputs.

5.4. Topology Adaptation Mechanism

The topology manager implements orchestration decisions as dynamic structural changes to the federated system. Adaptation spans multiple dimensions: cluster assignment partitions nodes into aggregation groups, such as organizing 54 nodes into three clusters of 18 instead of all-to-all aggregation, which reduces communication cost by approximately 80%. Node role assignment designates specific functions: aggregators coordinate training rounds, participants execute local training, observers monitor system health, and seed servers initialize models. Communication pattern adjusts low-level transmission strategies including gossip topology selection, aggregation tree depth, compression algorithms, and checkpoint frequency. Participation dynamics determine which nodes join each aggregation round—mobile nodes with poor connectivity can opt out of specific rounds, joining again when connectivity improves, rather than blocking progress or triggering timeouts.
Adaptation Constraints: Changes are staged gradually over 5–10 min to avoid disrupting active training rounds. Example: if the LLM proposes topology change with confidence 0.75, the system
  • Finishes current aggregation round (e.g., 5 min);
  • Gradually moves nodes to new cluster assignment over next 10 min (some nodes moved per round);
  • Monitors impact on convergence rate; if convergence slows by >10%, rollback changes.
Rollback Capability: If an adaptation degrades system health (convergence slows, communication overhead increases, node loss rate rises), the system rolls back the change and tries a conservative alternative. All topology changes are reversible and logged for analysis.

5.5. System Integration

The orchestration framework integrates tightly with the confidence-gated mechanism through four key pathways. The event reception → gating → execution pathway ensures semantic events from the LLM arrive at the confidence gate, which routes them to the appropriate executor (LLM-primary for high confidence, conservative for moderate, rule-based for low confidence), and the selected action executes. The monitoring → feedback pathway monitors the metrics specified in each semantic event, compares actual outcomes to predicted outcomes, and feeds any surprises (cases where outcome diverges from prediction) back to the reasoning engine to improve future decision-making through accumulated experience. The fallback guarantee ensures that if any component fails—whether the LLM becomes unavailable, the confidence gate malfunctions, or a primary action fails to achieve predicted results—the system automatically escalates to rule-based orchestration, guaranteeing continued operation even under component failures. Finally, the auditability pathway logs every decision with full context (semantic event, confidence score, chosen action, actual outcome, decision latency, affected nodes), enabling comprehensive post hoc analysis, performance debugging, and accountability assignment.

6. System Implementation

Urban AI OS was implemented and evaluated on the FLEdge project [22], a real-world urban IoT deployment in a mid-sized European city. This section describes the deployment, LLM integration, and operational characteristics.

6.1. Urban IoT Deployment

The deployment comprises 54 heterogeneous edge devices distributed across 12 neighborhoods in a mid-sized European city. The infrastructure layer includes sensing nodes such as building energy meters sampling at 1–10 Hz and environmental sensors (measuring temperature to ±0.5 °C precision, humidity, CO2 concentration, and air quality). Computational nodes span building controllers with 4–8 cores and 4GB RAM, gateway servers with 8+ cores and 16GB RAM, and IoT gateways with 1–2GB RAM. Network connectivity is mixed: gigabit ethernet connects buildings to the central network, WiFi provides outdoor coverage, and LoRaWAN enables low-power mobile device connectivity.
The AI workload portfolio consists of three components. The primary workload is federated LSTM energy demand forecasting trained across all 54 nodes to produce 24 h ahead predictions for energy consumption patterns. Secondary workloads include anomaly detection models (isolation forest algorithms) trained locally on each node’s sensor data streams to identify unusual patterns. Inference workloads consist of occupancy prediction models (logistic regression) deployed directly to building controllers for real-time occupancy estimation.
Telemetry is collected at 5 min aggregation intervals with a 12 h historical window retained for trend analysis. Weekly aggregated data volume reaches approximately 2.7 GB. Each node contributes 15 infrastructure metrics (CPU, memory, disk, network measures), eight environmental signals (temperature, humidity, CO2, air quality, weather forecasts, occupancy), and six workload indicators (training status, throughput, latency, accuracy, convergence rate). The evaluation period spanned 8 weeks from March through May 2024.

6.2. LLM Integration and Configuration

Urban AI OS integrates GPT-4 API [6] as the semantic reasoning engine. The deployment uses the gpt-4-turbo model variant for faster inference and larger context window compared to the base GPT-4 model. The context window is configured to 8192 tokens with dynamic summarization for long-running deployments, allowing the LLM to maintain context over extended evaluation periods while respecting API token limits. The reasoning engine is invoked through two triggers: periodic invocation every 3–5 min to detect slow-developing problems, and event-triggered invocation when metric deviations exceed 50% from baseline or connectivity is lost, enabling rapid response to sudden changes.
The confidence value used by the gating mechanism is obtained through prompted self-assessment: together with the semantic event and recommended action, the LLM is instructed to return a confidence score in the range [0, 1] reflecting its estimated certainty in the interpretation. Therefore, this value should not be interpreted as an intrinsic token-level probability or a formal probability of correctness. During the initial two-week calibration period, the reported confidence values were compared with observed decision outcomes using the Brier score and Expected Calibration Error (ECE), and the gating thresholds were selected empirically based on this calibration period.
Each inference consumes approximately 850 input tokens and 180 output tokens, totaling approximately 1030 tokens per request. For GPT-4 Turbo, using API prices of $0.01 per 1000 input tokens and $0.03 per 1000 output tokens, the estimated cost per inference is approximately $0.0139 ($0.0085 input + $0.0054 output). At approximately 480 inferences per day, this corresponds to approximately $6.67 per day, $200 per 30-day month, and $374 over the 8-week evaluation period. These estimates reflect the pricing configuration used for the reported analysis and may vary with API pricing and invocation frequency.
Reliability mechanisms ensure system availability even if the LLM becomes unavailable. If the LLM service fails or is unreachable, the system falls back to rule-based orchestration within 100 milliseconds, maintaining operational continuity. Confidence calibration was fine-tuned over an initial 2-week data collection period, achieving a Brier score of 0.09 indicating excellent calibration. Timeout handling ensures that if an inference request takes longer than 8 s to complete, the system terminates the request and escalates to rule-based fallback, preventing indefinite waiting.
Figure 4 illustrates the distribution of LLM inference latencies observed across 8 weeks of deployment, demonstrating predictable and acceptable performance characteristics.
Figure 4. LLM inference latency distribution across 8 weeks of deployment. Latencies follow a predictable distribution with p50 = 3.2 s, p95 = 5.1 s, p99 = 7.8 s. The 8 s timeout threshold (system escalates to fallback beyond this) was never exceeded, ensuring reliability.

6.3. Control Plane Architecture and Communication

The reasoning engine and orchestrator communicate asynchronously via REST API:
Request Flow:
  • Telemetry aggregator → LLM API: POST/reason with enriched JSON telemetry snapshot.
  • LLM processes request (2–5 s latency).
  • LLM API → orchestrator: JSON semantic event with confidence, action, fallback.
  • Orchestrator applies confidence-gated decision (immediate/conservative/fallback).
  • Orchestrator → telemetry aggregator: decision outcome (success/rollback/monitoring trigger).
Implementation Details: The communication uses REST API protocol for both LLM integration (OpenAI API) and internal orchestrator communication (HTTP/JSON). Fault tolerance is handled through an exponential backoff retry strategy, with retries at 1 s, 2 s, and 4 s for transient failures; after three failed retries the system falls back to rule-based orchestration. All decisions are logged comprehensively to a local database, recording timestamp, semantic event, confidence score, action taken, outcome, and latency for each orchestration decision. Authentication protects both external (OpenAI API key) and internal API endpoints (bearer token authentication).

6.4. System Overhead Considerations

Latency Budget: LLM inference (2–5 s) adds latency to decision-making, though this overhead is acceptable for non-critical decisions such as monitoring tuning and frequency adjustment. For time-critical decisions, the confidence-gated mechanism provides protection: high-confidence actions execute asynchronously and do not block the critical data plane path, so training continues unaffected by LLM latency. When a decision is needed in less than 100 ms, rule-based orchestration triggers immediately with response times under 100 ms, bypassing LLM inference entirely. Topology changes, which constitute the most expensive orchestration decisions, are staged over 5–10 min and operate on the control plane separate from data plane training, so LLM latency does not lie on the critical path for these decisions.
Resource Consumption: The reasoning engine operates on external cloud APIs (GPT-4), incurring no local memory impact on edge nodes. Network overhead is minimal: telemetry transmission contributes approximately 10 KB per 5 min aggregation window, LLM requests and responses add approximately 50 KB per decision, yielding a total of approximately 12 KB per minute or 17 MB per week of additional network traffic. Computational overhead on the control plane is negligible: telemetry aggregation consumes < 100 ms of CPU, confidence gating < 50 ms, and decision logging < 20 ms, all negligible compared to the computational demands of federated training on the data plane.
Cost–Benefit Analysis: This cost estimate is deployment-scale dependent. Assuming, conservatively, linear scaling with the number of managed nodes and the same invocation policy, the measured cost of approximately $60/month for 54 nodes would correspond to approximately $111/month for 100 nodes, $556/month for 500 nodes, and $1111/month for 1000 nodes. In practice, batching and hierarchical telemetry aggregation can reduce the number of LLM invocations, so these values represent a conservative linear-scaling estimate rather than a fixed operational cost. The system provides 35% improvement in responsiveness by detecting problems 5–10 min earlier and avoiding slowdowns. It achieves 42% reduction in unnecessary topology changes, eliminating disruptive reconfigurations that consume communication bandwidth and interrupt training rounds. Federated learning convergence improves 19% through better topology management, reducing training time measurably. Break-even on the system’s operational costs occurs in less than one week of deployment, meaning semantic reasoning delivers significant value within days rather than over months.

7. Experimental Evaluation

We evaluated Urban AI OS on the deployment (54 nodes, 8 weeks) against two baselines, measuring system responsiveness, stability, overhead, and impact on ML workloads.

7.1. Experimental Setup

Baselines:
  • Baseline 1 (Static Threshold): A reference threshold-based orchestration configuration in which predefined thresholds (CPU > 80%, latency > 100 ms, energy > 500 kW) trigger predefined actions. This baseline represents conventional static threshold control and is not intended to represent the full capabilities of modern multi-metric orchestration platforms.
  • Baseline 2 (Adaptive): ML-based thresholds learned from the first 2 weeks of historical data; thresholds adapt per time-of-day and day-of-week.
  • Proposed (Urban AI OS): LLM reasoning with confidence-gated execution (this work).
Evaluation Protocol: Eight-week deployment split: 2 weeks baseline tuning, 6 weeks evaluation. During the evaluation period, Urban AI OS is operated in closed loop on the physical deployment, while the baseline orchestrators were evaluated in parallel observation mode using the same synchronized telemetry streams. Baseline decisions were independently generated and logged but were not physically executed on the shared infrastructure, thereby preventing conflicting control actions. Consequently, comparisons involving baseline decisions should be interpreted as observational rather than as simultaneous closed-loop control experiments.
Metrics Collected: At the system level, we measured responsiveness (detection-to-action latency), topology stability (number of reconfiguration changes per week), and communication overhead (percentage of available bandwidth consumed). At the workload level, we tracked convergence time (training time to reach target model accuracy) and accuracy drift (percentage change and variance in prediction accuracy). System health metrics included node uptime (percentage of time each node was operational), network partition frequency (how many times node groups became disconnected), and cascading failures (sequences of failures triggered by a single root cause). Decision quality metrics assessed confidence calibration (Brier score and Expected Calibration Error), fallback activation frequency (percentage of decisions triggering rule-based fallback), and action outcome distribution (whether orchestration actions achieved predicted outcomes).
To ensure a consistent comparison, all three orchestration approaches were evaluated over the same deployment period, using the same 54-node infrastructure, telemetry streams, aggregation intervals, workloads, and evaluation metrics. The first two weeks were used for baseline configuration and adaptive threshold tuning, while the subsequent six weeks constituted the evaluation period. Decisions generated by each approach were recorded independently, and performance was compared using identical definitions for responsiveness, topology stability, communication overhead, workload convergence, and system health.

7.2. Results: System Responsiveness

Metric: Time from anomaly detection to action completion.
Urban AI OS significantly outperforms rule-based approaches by understanding context. Rule-based orchestration exhibits 8–12 min median response time, as the system must detect metric deviations, wait for thresholds to be breached, confirm the breach has not reversed, and then execute predefined actions. The adaptive baseline improves this to 6–9 min by using learned thresholds that reduce false positives, though it remains fundamentally reactive. Urban AI OS achieves 4–7 min by synthesizing multi-metric context immediately through semantic reasoning and using confidence-gated execution to reduce unnecessary delays. This represents a 35% improvement in responsiveness compared to the evaluated static threshold baseline, translating to 3–5 min of faster detection-to-action time.
Why: Rule-based systems react only when metrics cross thresholds and stay crossed (confirmation window adds latency). Urban AI OS synthesizes multi-metric context immediately, enabling earlier detection and interpretation of the actual problem.

7.3. Results: Topology Stability

Metric: Number of topology reconfigurations per week (indicator of unnecessary changes that disrupt training).
Urban AI OS dramatically reduces unnecessary changes. Rule-based systems exhibit 18–25 reconfigurations per week due to cascading effects: a single metric spike triggers an orchestration action, which then causes downstream effects that trigger additional actions, multiplying the number of changes. The adaptive baseline reduces this to 14–18 changes per week through learned thresholds that lower false-positive rates. Urban AI OS achieves only 9–12 changes per week because causal reasoning avoids misinterpretation of legitimate transient behaviors, and the fallback mechanism refrains from orchestration when confidence is insufficient. This represents a 42% reduction in unnecessary topology changes compared to rule-based systems, eliminating 9–15 disruptive reconfigurations per week.
Why: Rule-based logic like “if CPU > 80%, migrate” triggers even on legitimate peak load. Urban AI OS understands “high CPU at 2pm on a hot day is expected → no action needed” vs. “high CPU at 3am → investigate degradation”.

7.4. Results: Communication Overhead

Metric: Percentage of available bandwidth consumed by aggregation and data exchange.
Semantic telemetry enrichment introduces minimal overhead. Baseline systems consume 23% average network utilization, while Urban AI OS reaches 24.2% average, representing approximately 1.2 percentage points of additional consumption or less than 5% relative increase. The overhead is negligible in absolute terms because LLM reasoning runs asynchronously on the control plane and does not interfere with data plane training. Telemetry transmission consists of small JSON snapshots of approximately 10KB transmitted every 5 min, which does not bottleneck the training pipeline. Moreover, topology improvements from semantic reasoning actually reduce overall communication overhead—fewer unnecessary reconfigurations eliminate the additional bandwidth consumed by redundant topology coordination messages.

7.5. Results: Impact on AI Workloads

Metric: Convergence time to target accuracy (training time for federated LSTM forecasting).
Orchestration improvements directly benefit ML training performance. Rule-based systems achieve average convergence time of 4.2 h due to frequent topology disruptions interrupting aggregation rounds. The adaptive baseline improves this to 3.8 h through more informed topology decisions. Urban AI OS achieves 3.4 h through stable topology maintenance, fewer disruptions, and better resource allocation informed by semantic context. This represents approximately 19% reduction in convergence time compared to rule-based orchestration. The mechanism is straightforward: unnecessary topology changes interrupt aggregation rounds, and each interruption costs approximately 2–3 min of lost progress. By reducing disruptions by 42%, Urban AI OS eliminates approximately 9–15 min of interrupt penalties per week, directly accelerating overall training convergence.

7.6. Comparative Result Summary

Table 2 presents a comprehensive comparison of all measured metrics across the three orchestration approaches. Urban AI OS significantly outperforms both baselines across all five key dimensions: responsiveness, topology stability, communication overhead, convergence performance, and confidence calibration.
Table 2. Comprehensive comparison of Urban AI OS against rule-based and adaptive baselines across system responsiveness, topology stability, communication overhead, ML workload impact, and decision quality metrics. All improvements are statistically significant (p < 0.001).

7.7. Results: Confidence Calibration and Fallback Usage

Metric: LLM confidence scores vs. actual decision outcomes (Brier score, Expected Calibration Error).
LLM confidence is well-calibrated, meaning the LLM’s confidence estimates accurately reflect actual accuracy. The Brier score of 0.09 indicates excellent calibration (scores < 0.10 represent well-calibrated confidence). The Expected Calibration Error of 0.04 demonstrates strong alignment between predicted and actual accuracy—when the LLM expresses 80% confidence in a decision, it is correct approximately 80% of the time. The system triggers rule-based fallback in 12% of decisions where confidence drops to 0.5 or below, representing 12% of cases where the LLM recognizes insufficient certainty to drive semantic orchestration. Critically, the false-positive rate among fallback decisions was 0%, meaning fallback mechanisms never caused harm; the system remained stable when the LLM was uncertain.
The fallback mechanism performed as designed: when activated, the system switched to conservative monitoring with increased sampling frequency rather than taking disruptive orchestration actions. No topology changes were triggered while the LLM was uncertain, preventing cascading failures from misguided decisions. All 12% of fallback cases represented genuine edge cases where the LLM correctly recognized insufficient information to interpret anomalous sensor combinations, novel patterns, or contradictory signals. Zero failures or cascading problems resulted from fallback decisions, validating the safety guarantee of the confidence-gated architecture.

7.8. Case Studies: When Semantic Reasoning Matters

Case 1: ENERGY_SURGE with Weather Context: Monday 6am, energy spike (+50%). Rule-based would immediately scale aggregation. Urban AI OS observed: temperature dropping, heating demand rising, outdoor sensor data confirming cold snap. System recognized PEAK_LOAD_EXPECTED event (confidence 0.88) and recommended light monitoring rather than aggressive scaling. Result: no unnecessary topology changes; system handled load smoothly. Without context, rule-based would have triggered three unnecessary reconfigurations.
Case 2: NODE_DEGRADATION vs. Transient Spike: Gateway-5 showed 5 min latency spike (normally 45 ms). Rule-based would flag as degradation. Urban AI OS noted: latency spike occurred immediately after workload migration to gateway-5, memory still available, CPU not elevated, other metrics normal. Interpreted as transient startup behavior (confidence 0.79); recommended “monitor for 10 more minutes” instead of topology change. Node recovered naturally. Avoided one unnecessary reconfiguration and 5 min of training disruption.
Case 3: Uncertain Interpretation Triggers Fallback: Anomalous sensor reading: node-18’s CPU dropped 40% but convergence rate did not improve (contradictory signals). LLM uncertain (confidence 0.38): “unusual metric combination; insufficient data to interpret”. Triggered fallback: increased monitoring frequency instead of orchestration action. After 15 min, the node came back online—sensor malfunction resolved itself. Fallback prevented a potentially harmful topology change based on incomplete information.

7.9. Semantic Event Frequency Analysis

Figure 5 presents the distribution of semantic events detected across the 8-week evaluation period, illustrating which system conditions occurred most frequently and which required orchestration intervention.
Figure 5. Semantic event frequency distribution across 8-week deployment. ENERGY_SURGE was the most frequent event (240 occurrences, 4.3/day), driven by daily thermal and occupancy cycles. PEAK_LOAD_EXPECTED events (165) were highly predictable from weather forecasts. NETWORK_PARTITION was rare (12), indicating stable infrastructure. Most detected events required orchestration intervention; only 12% triggered fallback due to low confidence.

7.10. Ablation Study: Component Importance

Removing key components reveals their impact on overall system performance. Removing the confidence gate allows direct LLM execution without filtering or uncertainty validation. This ablation resulted in two false-positive topology changes over the 8-week evaluation period, compared to 0 false positives in the full system with confidence gating. These false positives occurred when the LLM made uncertain decisions without validation, highlighting the importance of the confidence gate for preventing erroneous orchestration actions.
Removing semantic telemetry encoding provides raw metrics directly to the LLM without enrichment (baseline values, temporal context, recent event annotations). This degradation caused the Brier score to deteriorate from 0.09 to 0.15, indicating poorly calibrated confidence estimates. The LLM struggled to interpret metrics lacking contextual anchors, unable to distinguish transient spikes from systematic degradation without baseline comparisons or temporal annotations.
Removing the LLM entirely and relying solely on rule-based orchestration reproduces Baseline 1 performance: 18–25 topology changes per week, 8–12 min response latency, and 4.2 h convergence time. This baseline performance directly demonstrates the value of semantic reasoning—the improvements seen in Urban AI OS (42% fewer changes, 35% faster response, 19% faster convergence) are attributable to LLM-driven semantic interpretation of system state.

7.11. Statistical Significance

All reported improvements were evaluated using paired t-tests with a significance threshold of p < 0.05. The statistical analysis was performed over the paired observations collected during the six-week evaluation period. System responsiveness showed mean improvement of 3.5 ± 1.2 min (t = −12.4, p < 0.001), confirming that the observed responsiveness gains are not due to random variation. Topology stability showed mean reduction of 11.2 ± 2.1 changes per week (t = −15.8, p < 0.001), indicating highly significant improvement in topology stability. Convergence time showed mean improvement of 0.8 ± 0.3 h (t = −8.9, p < 0.001), demonstrating statistically significant acceleration of training. All three key metrics exhibit p-values far below the 0.05 significance threshold, providing strong statistical evidence that Urban AI OS improvements are genuine rather than artifacts of experimental variation.

7.12. Live Validation with GPT-4: Real-Time Orchestration Scenarios

The purpose of this live validation is not to repeat the preceding comparative evaluation, but to verify the end-to-end operation of the proposed architecture with a production LLM backend and real-time telemetry. Beyond offline simulation, live validation demonstrates Urban AI OS with production-grade LLM (GPT-4 Turbo). Four distinct scenarios were executed against a running system with 54 edge nodes across 12 neighborhoods, with real-time telemetry submission and decision tracking. All scenarios leveraged the OpenAI GPT-4 backend rather than mock LLM, enabling assessment of real semantic reasoning quality and decision latency.
Scenario 1: Peak-Load Detection (16:05). Node-15 submitted telemetry indicating CPU 92% and memory 88% during business hours. GPT-4 semantic reasoning identified the event as PEAK_LOAD_EXPECTED with confidence 0.85. The confidence-gated execution mechanism classified this as HIGH confidence (>0.8) and immediately executed the primary action PRE_ALLOCATE_RESOURCES. GPT-4 reasoning: “The high CPU usage of 92.0% during business hours, but not peak hours, suggests an unexpected high load on the system. The absence of degraded nodes and recent events indicates that the system is currently handling the load but may be approaching its capacity limits”. Decision latency: 340 ms.
Scenario 2: Node Degradation (16:10). Node-30 submitted telemetry with latency 450 ms (95th percentile baseline: 100 ms). Despite moderate CPU (55%), the extreme latency anomaly triggered NODE_DEGRADATION classification with confidence 0.85. The system executed REBALANCE_WORKLOAD, targeting affected node-30. GPT-4 reasoning: “The high latency average of 450.0 ms, particularly when it matches the 95th percentile, suggests a systemic issue rather than a transient spike. The presence of a degraded node supports the hypothesis that this node’s performance issues are contributing significantly to system latency”. Decision latency: 285 ms.
Scenario 3: Energy Surge (16:15). Node-42 reported CPU 96%, memory 94%, energy 6.2 kW, and temperature 45 °C. GPT-4 identified PEAK_LOAD_EXPECTED with confidence 0.8. The system executed PREPARE_ALLOCATION immediately. Notably, the high energy (6.2 kW vs. baseline 2.5 kW) and temperature (45 °C vs. baseline 25 °C) provided additional context for reasoning. GPT-4 reasoning: “The high CPU usage at 96% during business hours, but not during typical peak hours, suggests an unexpected high demand or possibly an early start to peak-load conditions. The absence of other anomalies or recent events indicating system faults supports the interpretation of increased workload rather than system degradation”. Decision latency: 312 ms.
Scenario 4: Topology Balance Assessment (16:20). Two nodes submitted simultaneous telemetry: node-05 with CPU 85% (high load) and node-12 with CPU 15% (low load). This imbalance scenario tested whether GPT-4 would recognize balanced diversity vs. problematic imbalance. GPT-4 classified as NO_EVENT with confidence 0.8 (correct assessment: one high-load node and one low-load node is balanced workload distribution). The system executed INCREASE_MONITORING to track the load balance over time. GPT-4 reasoning: “The system metrics show average CPU usage and latency within expected ranges for a typical business hour on a Wednesday. The presence of one degraded node does not significantly impact overall system performance as indicated by the current metrics. No recent events or anomalies have been detected that would suggest a deviation from normal operational parameters”. Decision latency: 298 ms.
These four scenarios validate key claims from the offline evaluation. As shown in Figure 6, all scenarios achieved HIGH confidence (≥0.8), enabling immediate action execution. All decisions executed successfully with 100% success rate. GPT-4 demonstrated nuanced multi-dimensional reasoning: in Scenario 1, synthesizing CPU, memory, and baseline context to detect peak load; in Scenario 2, distinguishing node degradation from transient spikes based on latency severity; in Scenario 3, integrating energy and temperature signals for complete understanding; and in Scenario 4, correctly rejecting false-positive imbalance detection when workload distribution is appropriate.
Figure 6. Live GPT-4 scenarios showing confidence scores for four real-time orchestration decisions. All scenarios achieved HIGH confidence (0.8–0.85), enabling immediate action execution without fallback. Confidence distribution reflects the system’s calibration: high confidence when semantic features are clear, slightly lower (0.8) when scenario involves nuanced assessment (Scenario 4).
The outcomes of the live validation are further summarized in Figure 7, Figure 8 and Figure 9. Figure 7 presents the orchestration actions executed for the four scenarios, while Figure 8 illustrates their sequential execution and corresponding decision latencies. Finally, Figure 9 summarizes how the live scenarios validate the key claims regarding semantic event detection, confidence-gated execution, and multi-dimensional analysis.
Figure 7. Orchestration actions executed across four live scenarios. Scenario 1 and 3 triggered proactive resource allocation; Scenario 2 triggered reactive workload rebalancing; Scenario 4 triggered monitoring mode. All actions executed successfully, demonstrating GPT-4’s ability to map semantic interpretations to appropriate orchestration actions.
Figure 8. Timeline of live scenario execution over 15 min. Four distinct semantic events were detected and orchestrated sequentially, each with successful action execution. Decision latency ranged from 285 ms to 340 ms, well within acceptable bounds for the 5 min telemetry collection interval (edge orchestration operates on minute-scale timescales).
Figure 9. Live scenario results validating three key claims from the paper. Claim 1 (semantic event detection): all four scenarios correctly classified by GPT-4. Claim 2 (confidence-gated execution): all decisions executed immediately due to HIGH confidence (>0.8). Claim 3 (multi-dimensional analysis): all scenarios analyzed across CPU, memory, latency, energy, temperature, accuracy dimensions. Key metric summary shows 100% decision accuracy and 100% action execution rate.

8. Discussion

8.1. Key Findings and Interpretation

Urban AI OS demonstrates that LLM-assisted reasoning can substantially improve orchestration efficiency in urban edge deployments while incorporating explicit safeguards for uncertainty, fallback, monitoring, and rollback. Four key findings merit analysis:
1. Semantic reasoning outperforms threshold-based logic. The 35% improvement in system responsiveness (4–7 min vs. 8–12 min) reflects a fundamental difference in how problems are detected. Rule-based systems require metrics to cross thresholds and persist long enough for confirmation windows to expire. Urban AI OS synthesizes multiple signal dimensions simultaneously, enabling earlier and more accurate problem identification. Critically, this improvement came without requiring domain-specific training or manual threshold tuning—the same LLM reasoning pipeline adapted across all six semantic event types.
2. Confidence-gated execution is necessary for safety. The ablation study shows that removing the confidence gate resulted in two false-positive topology changes over 8 weeks, while the full system achieved 0 false positives. These appear small, but in production systems each unnecessary topology change incurs 10–30 min of disruption. The fallback mechanism proved essential: in 12% of decisions where the LLM exhibited low confidence, the system gracefully deferred to rule-based safeguards. Notably, all fallback decisions resulted in stable operation with zero harm, validating the hypothesis that low-confidence decisions should not drive orchestration.
3. Contextual enrichment is critical for LLM reasoning. Removing semantic telemetry encoding (replacing enriched signals with raw metrics) degraded confidence calibration from Brier score 0.09 to 0.15. This demonstrates that LLMs require structured context—baseline values, temporal annotations, recent events—to perform causal reasoning. Raw metrics alone provide insufficient information for the LLM to distinguish legitimate from pathological system behavior.
4. Topology stability improvements cascade to workload benefits. The 19% faster FL convergence time resulted primarily from reducing unnecessary topology reconfigurations (42% reduction). Each avoided reconfiguration eliminates 2–3 min of training disruption, directly improving end-to-end training time. This underscores that orchestration decisions are not isolated—they cascade through the entire system stack.

8.2. Limitations and Open Questions

Several limitations constrain the scope of conclusions:
Single-City Evaluation. The deployment spans a single urban area with specific climate patterns, occupancy characteristics, and infrastructure profiles. Peak-demand hours, seasonal variations, and environmental conditions differ substantially across geographies. Conclusions about urban orchestration may not generalize to tropical climates (different HVAC patterns), desert regions (different peak-load signatures), or heterogeneous cities with mixed commercial/residential zones. Future work must evaluate on diverse deployments to understand geographic domain adaptation requirements. This limitation also applies to confidence calibration: the current thresholds were evaluated within the operating conditions of the present deployment and their transferability to unseen workloads or substantially different urban environments remains to be validated.
Self-assessed confidence. The confidence signal is generated through LLM self-assessment and may therefore be miscalibrated, particularly for confidently incorrect outputs. Although empirical calibration and fallback reduce this risk, they do not eliminate it. Future work will investigate external uncertainty estimators and threshold sensitivity across different LLMs and deployment environments.
LLM Latency Trade-offs. Current deployment uses GPT-4 with 3.2 s average latency (p95: 5.1 s). For many orchestration problems, this latency is acceptable: thermal management, workload rebalancing, and topology adaptation occur over minutes. However, certain edge cases—network partition detection and link failure recovery—may require sub-second responses that cloud-based LLM inference cannot support. The evaluation did not explore whether on-premise LLMs (Llama, Mistral) achieve comparable reasoning quality at lower latency, nor the accuracy–latency trade-off for distilled models.
Prompt Engineering Dependency. Urban AI OS performance depends substantially on prompt design, which currently required manual iteration. Three of six semantic event types involved domain-specific reasoning (ENERGY_SURGE requires understanding of thermal dynamics; PEAK_LOAD_EXPECTED requires weather-demand correlations). If domain context changes, prompts likely require revision. The evaluation did not measure how prompt brittleness affects robustness across diverse edge environments or quantify the engineering effort required to adapt to new domains.
Confidence Threshold Calibration. The three-level confidence gate ( c t > 0.8 , 0.5 < c t ≤ 0.8 , c t ≤ 0.5 ) was chosen empirically based on initial evaluation. Optimal thresholds likely depend on infrastructure risk tolerance, cost of false positives, and operating context. No sensitivity analysis was performed to understand how threshold changes affect the false-positive/false-negative trade-off.
Because the baseline approaches were evaluated in parallel observation mode rather than through simultaneous closed-loop control of the physical infrastructure, future work should include isolated or replicated deployments enabling fully independent closed-loop comparisons.

8.3. Scalability Considerations

Deployment at 54 nodes is modest compared to potential city-scale deployments (1000–10,000 nodes). As scale increases, two bottlenecks emerge:
Telemetry Volume. Currently, each node produces 5 KB enriched telemetry snapshots every 5 min. With 54 nodes, aggregate volume is 27 KB per interval. At 10,000 nodes, this becomes 1.8 MB per interval. Sending all telemetry to a centralized LLM becomes infeasible. Hierarchical semantic aggregation offers a solution: organize nodes into geographic clusters (e.g., 20–50 nodes per cluster). At each cluster, a lightweight “semantic aggregator” LLM summarizes local events (“cluster-12 experienced energy surge and topology rebalancing; now stable”). The global LLM receives cluster-level summaries, enabling reasoning at system scale. This approach preserves causal reasoning while reducing central telemetry volume by 1–2 orders of magnitude [5].
LLM Reasoning Latency. With 10,000 nodes, event frequency may exceed LLM throughput. Hierarchical reasoning mirrors hierarchical aggregation: cluster LLMs handle local decisions (intra-cluster rebalancing, local anomaly interpretation); global LLM handles systemic decisions (inter-cluster topology changes, city-wide workload migration). This tiered approach maintains sub-minute latencies at each tier [8].
Implementation requires formal semantic preservation across aggregation boundaries: cluster summaries must retain sufficient information for global reasoning without exposing raw data. Early prototypes suggest 85% information retention at the cost of 3 KB per cluster summary [7].

8.4. Security and Privacy Considerations

Semantic telemetry and environmental signals contain sensitive information:
Energy consumption patterns reveal occupancy (high energy consumption at unusual hours indicates working patterns; absence of consumption over weeks may signal vacancy). Temperature and HVAC Activity reveal building use (office buildings peak 8 am–6 pm; residential buildings peak 6–11pm). Workload Metrics may indicate deployed application types or computational activities. When transmitting telemetry to a cloud LLM reasoning engine, several privacy-enhancing approaches were applied. Data anonymization replaced device IDs with cryptographic hashes, eliminating names, addresses, and location metadata. Aggregation reported metrics at cluster level rather than per-node where possible, aggregating individual node data before transmission. Temporal obfuscation rounded timestamps to 10 min windows to prevent fine-grained temporal analysis of when specific events occurred. Transient inference requests ensured LLM inference requests were sent over encrypted TLS connections, responses were not permanently stored, and all logs were deleted after one hour of retention.
A stronger privacy guarantee is achievable through on-premise LLM deployment. Replacing cloud-based GPT-4 with local Llama-3.1 or Mistral instances eliminates data transmission beyond organizational boundaries. Initial experiments suggest on-premise models achieve Brier scores of 0.12 (vs. 0.09 for GPT-4)—a modest accuracy penalty acceptable for many deployments. However, on-premise inference incurs 15–25 s latency per decision (vs. 3.2 s for cloud), making it suitable only for decisions on 5–10 min timescales or longer [2].
Accountability and liability: In operational urban infrastructure, LLM-generated recommendations should not be considered autonomous entities to which responsibility can be assigned. Responsibility remains with the system operators and organizations deploying and governing the orchestration framework. To support accountability, Urban AI OS maintains an auditable record of each decision, including the semantic event, confidence score, selected action, affected nodes, and observed outcome. For safety-critical actions with potentially significant service impact, human approval can additionally be required before execution. These mechanisms enable post hoc investigation and attribution of operational responsibility when an erroneous recommendation contributes to service disruption.

8.5. Comparison with Related Orchestration Paradigms

Positioning Urban AI OS relative to existing approaches reveals its distinctive contributions. The evaluated static threshold baseline provides deterministic behavior but lacks semantic contextual reasoning, resulting in 42% more unnecessary reconfigurations in our experimental setting. Modern orchestration platforms can employ substantially more sophisticated multi-metric and custom policies; therefore, the reported improvement should be interpreted relative to the specific baseline evaluated in this study rather than as a general comparison against state-of-the-art Kubernetes or other production orchestration systems. Adaptive threshold learning (reinforcement learning for threshold optimization) reduces false positives but requires weeks of training data and does not perform causal reasoning—unable to distinguish “CPU high due to peak load” from “CPU high due to degradation”. Anomaly detection (isolation forest, autoencoders) identifies outliers but provides no semantic interpretation—alarms on anomalies without explaining implications. Urban AI OS uniquely combines (1) semantic event taxonomy enabling domain-specific interpretation, (2) confidence-gated execution for formal safety, (3) context-aware reasoning leveraging LLM capabilities, and (4) model-agnostic orchestration independent of specific ML algorithms.
Recent LLM-assisted edge orchestration approaches similarly exploit language models for dynamic resource management, intent interpretation, and edge–cloud coordination. Compared with these approaches, Urban AI OS focuses specifically on transforming heterogeneous operational telemetry into predefined system-level events and coupling these interpretations with confidence-gated execution, fallback, monitoring, and rollback. Its main advantages are model-agnostic workload management, contextual integration of infrastructure and environmental signals, and explicit separation between reasoning and execution. However, the framework also introduces limitations, including dependence on external LLM inference, additional latency and operational cost, sensitivity to incorrect high-confidence outputs, and evaluation on a single urban deployment. Broader multi-site validation and comparison with emerging LLM-based and semantic-aware orchestration frameworks therefore remain important directions for future work.

9. Conclusions

Urban AI OS presents a novel paradigm for managing distributed urban edge intelligence: combining LLM-based semantic reasoning with formal confidence-gated execution mechanisms. The architecture is model-agnostic and decouples reasoning from execution, enabling flexibility and adaptability. Real-world evaluation on deployment demonstrated significant improvements: 35% faster responsiveness, 42% fewer unnecessary topology changes, and strong confidence calibration through formal fallback mechanisms.
The system introduces three key contributions: (1) a formal semantic event taxonomy enabling structured LLM reasoning, (2) a confidence-gated execution mechanism designed to reduce operational risk through graduated execution, deterministic fallback, monitoring, and rollback, and (3) documented case studies showing when semantic reasoning outperforms rule-based orchestration. The results indicate that combining LLM-assisted reasoning with formal safeguards is both feasible and effective for large-scale urban edge systems.

Future Work

This work opens several research directions:
1. Hierarchical Semantic Aggregation. As edge node counts scale to hundreds or thousands, full-system telemetry analysis becomes infeasible. Hierarchical aggregation—where secondary LLMs generate cluster-level summaries and only high-level anomalies escalate to global reasoning—offers a scalable path. This requires formal semantic preservation across aggregation boundaries.
2. On-Premise LLM Backends. Current deployment uses a cloud-based LLM (GPT-4). Autonomous urban systems require on-premise LLMs (e.g., Llama, Mistral) to eliminate latency overhead and privacy concerns. However, smaller models exhibit reduced accuracy in semantic reasoning—the trade-off between model size, accuracy, and computational cost demands investigation.
3. Formal Verification of Orchestration Policies. Confidence gates are empirical. Formal verification—using temporal logic (LTL, MTL) or model-checking—can provide proofs that the system avoids invalid states such as cascading topology reconfigurations or resource thrashing.
4. Generalization Across Urban Contexts. Evaluation occurred in a single city with specific climate patterns, peak hours, and infrastructure profiles. Generalizing to diverse cities requires mechanisms for rapid domain adaptation of LLM prompts—techniques like few-shot learning from new telemetry.
5. Integration with Human-in-the-Loop Feedback. In critical urban infrastructure, operators must review and approve major orchestration decisions. Integrating human feedback loops where decisions are annotated (approved/rejected) and patterns used for fine-tuning would enhance adaptability.
6. Cost–Benefit Analysis in Resource Heterogeneity. Current deployment assumes all nodes can execute any workload. Real-world systems exhibit extreme resource heterogeneity (some nodes have limited CPU, others have GPU). The LLM reasoning engine should explicitly perform resource capability matching and cost–benefit analysis before orchestration decisions.

Author Contributions

Conceptualization, C.P. and S.K.; methodology, C.P., A.D. and S.K.; software, C.P.; validation, C.P., A.D. and S.K.; formal analysis, C.P.; investigation, C.P.; resources, S.K.; data curation, C.P.; writing—original draft preparation, C.P.; writing—review and editing, A.D. and S.K.; visualization, C.P.; supervision, S.K.; project administration, S.K.; funding acquisition, S.K. All authors have read and agreed to the published version of the manuscript.

Funding

This work is partially supported by the FLEdge project (F-DUT-2022-0337). The FLEdge project has been funded by the General Secretariat for Research and Innovation (GSRI) under the Driving Urban Transitions (DUT) Partnership. The Article Processing Charge (APC) was waived by the publisher.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data presented in this study are available from the corresponding author upon request. The data are not publicly available due to privacy and security restrictions related to the urban IoT infrastructure used in this study.

Acknowledgments

This work is partially supported by the FLEdge project F-DUT-2022-0337. The FLEdge project has been funded by the General Secretariat of Research and Innovation goals (GSRI) under the Driving Urban Transitions (DUT) Partnership.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
AIOpsArtificial Intelligence for IT Operations
BMSBuilding Management System
DUTDriving Urban Transitions
GSRIGeneral Secretariat for Research and Innovation
HVACHeating, Ventilation, and Air Conditioning
LLMLarge Language Model
LoRaWANLong Range Wide Area Network
LSTMLong Short-Term Memory

References

  1. Kong, L.; Tan, J.; Huang, J.; Chen, G.; Wang, S.; Jin, X.; Zeng, P.; Khan, M.K.; Das, S.K. Edge-computing-driven Internet of Things: A Survey. ACM Comput. Surv. 2022, 55, 1–41. [Google Scholar] [CrossRef] [Scilit]
  2. Kairouz, P.; McMahan, H.B.; Avent, B.; Bellet, A.; Bennis, M.; Bhagoji, A.N.; Bonawitz, K.; Charles, Z.; Cormode, G.; Cummings, R. Advances and Open Problems in Federated Learning. Found. Trends® Mach. Learn. 2021, 14, 1–210. [Google Scholar] [CrossRef] [Scilit]
  3. Li, T.; Sahu, A.K.; Talwalkar, A.; Smith, V. Federated Learning: Challenges, Methods, and Future Directions. IEEE Signal Process. Mag. 2020, 37, 50–60. [Google Scholar] [CrossRef] [Scilit]
  4. Burns, B.; Grant, B.; Oppenheimer, D.; Brewer, E.; Wilkes, J. Borg, Omega, and Kubernetes. Commun. ACM 2016, 59, 50–57. [Google Scholar] [CrossRef] [Scilit]
  5. Poncinelli Filho, C.; Marques, E., Jr.; Chang, V.; dos Santos, L.; Bernardini, F.; Pires, P.F.; Ochi, L.; Delicato, F.C. A Systematic Literature Review on Distributed Machine Learning in Edge Computing. Sensors 2022, 22, 2665. [Google Scholar] [CrossRef] [Scilit]
  6. OpenAI. GPT-4 Technical Report. arXiv 2023, arXiv:2303.08774. [Google Scholar]
  7. Zhang, L.; Jia, T.; Jia, M.; Wu, Y.; Liu, A.; Yang, Y.; Wu, Z.; Hu, X.; Yu, P.S.; Li, Y. A Survey of AIOps for Failure Management in the Era of Large Language Models. arXiv 2024, arXiv:2406.11213. [Google Scholar] [CrossRef] [Scilit]
  8. Cheng, Q.; Sahoo, D.; Saha, A.; Yang, W.; Liu, C.; Woo, G.; Singh, M.; Saverese, S.; Hoi, S.C.H. AI for IT Operations (AIOps) on Cloud Platforms: Reviews, Opportunities and Challenges. arXiv 2023, arXiv:2304.04661. [Google Scholar] [CrossRef] [Scilit]
  9. Papaioannou, A.; Dimara, A.; Krinidis, S.; Anagnostopoulos, C.N.; Ioannidis, D.; Tzovaras, D. Advanced Proactive Anomaly Detection in Multi-Pattern Home Appliances for Energy Optimization. Internet Things 2024, 26, 101175. [Google Scholar] [CrossRef] [Scilit]
  10. Chen, Z.; Hu, J.; Min, G.; Luo, C.; El-Ghazawi, T. Adaptive and Efficient Resource Allocation in Cloud Datacenters Using Actor-Critic Deep Reinforcement Learning. IEEE Trans. Parallel Distrib. Syst. 2022, 33, 1911–1923. [Google Scholar] [CrossRef] [Scilit]
  11. Wong, T.; Wagner, M.; Treude, C. Self-adaptive systems: A systematic literature review across categories and domains. Inf. Softw. Technol. 2022, 148, 106934. [Google Scholar] [CrossRef] [Scilit]
  12. Wu, Z.; Han, C.; Ding, Z.; Weng, Z.; Liu, Z.; Yao, S.; Yu, T.; Kong, L. OS-Copilot: Towards Generalist Computer Agents with Self-Improvement. arXiv 2024, arXiv:2402.07456. [Google Scholar] [CrossRef] [Scilit]
  13. Wu, Q.; Bansal, G.; Zhang, J.; Wu, Y.; Li, B.; Zhu, E.; Jiang, L.; Zhang, X.; Zhang, S.; Liu, J.; et al. AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation. arXiv 2023, arXiv:2308.08155. [Google Scholar]
  14. Papaioannou, A.; Dimara, A.; Kouzinopoulos, C.S.; Krinidis, S.; Anagnostopoulos, C.N.; Ioannidis, D.; Tzovaras, D. LP-OPTIMA: A Framework for Prescriptive Maintenance and Optimization of IoT Resources for Low-Power Embedded Systems. Sensors 2024, 24, 2125. [Google Scholar] [CrossRef] [Scilit]
  15. Chen, Y.; Shetty, M.; Somashekar, G.; Ma, M.; Simmhan, Y.; Mace, J.; Bansal, C.; Wang, R.; Rajmohan, S. AIOpsLab: A Holistic Framework to Evaluate AI Agents for Enabling Autonomous Clouds. In Proceedings of the Machine Learning and Systems 7 (MLSys 2025), Santa Clara, CA, USA, 12–15 May 2025; Volume 7. [Google Scholar]
  16. Chen, H.; Zhou, Q.; Yang, S.; Han, X.; Zhang, F.; Zhang, D.; Wang, X. AGORA: Open More and Trust Less in Binary Verification Service. arXiv 2024, arXiv:2407.15062. [Google Scholar]
  17. Tang, Y.; Srinivasan, U.C.; Scott, B.J.; Umealor, O.; Kevogo, D.; Guo, W. End-to-End Edge AI Service Provisioning Framework in 6G ORAN. In Proceedings of the 2025 IEEE Vehicular Technology Conference (VTC2025-Fall), Chengdu, China, 19–22 October 2025. [Google Scholar] [CrossRef] [Scilit]
  18. Ying, C.; Jin, H.; Li, J.; Si, X.; Luo, Y. Incentive Mechanism Design via Smart Contract in Blockchain-Based Edge-Assisted Crowdsensing. Front. Comput. Sci. 2025, 19, 193802. [Google Scholar] [CrossRef] [Scilit]
  19. Mishra, P.; Singh, G. Energy Management Systems in Sustainable Smart Cities Based on the Internet of Energy: A Technical Review. Energies 2023, 16, 6903. [Google Scholar] [CrossRef] [Scilit]
  20. Taboada-Orozco, A.; Yetongnon, K.; Nicolle, C. Smart Buildings: A Comprehensive Systematic Literature Review on Data-Driven Building Management Systems. Sensors 2024, 24, 4405. [Google Scholar] [CrossRef] [Scilit]
  21. Vamvakas, D.; Papaioannou, I.; Tsaknakis, C.; Sgouros, T.; Korkas, C. Generative AI for Sustainable Smart Environments: A Review of Energy Systems, Buildings, and User-Centric Decision-Making. Energies 2025, 18, 6163. [Google Scholar] [CrossRef] [Scilit]
  22. Papaioannou, C.; Dimara, A.; Papaioannou, A.; Krinidis, S. Hierarchical Resources Management System for Internet of Things–Enabled Smart Cities. Sensors 2025, 25, 616. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.