Digital-twin platforms are increasingly adopted in energy infrastructure management for smart grids. Novel opportunities arise from emerging artificial intelligence technologies to increase user trust by enhancing predictive and prescriptive analytics capabilities and by improving user interaction paradigms. This paper presents a novel data-driven and knowledge-based energy digital-twin framework and architecture. Data integration and mining based on machine learning are integrated into a knowledge graph annotating asset status data, prediction outcomes, and background domain knowledge in order to support a retrieval-augmented generation approach, which enhances a conversational virtual assistant based on a large language model to provide user decision support in asset management and maintenance. Components of the proposed architecture have been mapped to commercial-off-the-shelf tools to implement a prototype framework, exploited in a case study on the management of a section of the high-voltage energy infrastructure in central Italy.
Smart buildings require intelligent and scalable solutions to monitor environmental conditions and manage increasingly complex data streams generated by distributed sensing infrastructures. In this context, the paper presents an edge-enabled Digital Twin framework for smart office environments, integrating real-time data acquisition, distributed intelligence, and machine learning-based analytics. The framework adopts a multi-layer architecture composed of a sensor layer, a cloud-edge intelligence layer, and an interaction layer, aligned with Digital Twin reference models. By enabling low-latency processing at the edge and supporting continuous model lifecycle management through Machine Learning Operations (MLOps) practices, the proposed approach overcomes key limitations of traditional cloud-centric solutions. Autoencoder-based models are deployed across the cloud-edge continuum to perform real-time anomaly detection on time-series sensor data. A prototype has been implemented in a real smart office environment, where heterogeneous environmental data are continuously collected and processed. Experimental results demonstrate effective end-to-end data flow, stable long-term operation, and reliable anomaly detection with low-latency response. The system enables real-time monitoring and data-driven analysis of environmental conditions, improving situational awareness and supporting operational decision-making. These findings confirm the effectiveness of integrating Digital Twin technologies with edge AI and MLOps principles for scalable and efficient smart building monitoring systems.