Abstract
Generative artificial intelligence, particularly through large languagemodels (LLMs), is poised to transform energy optimization and demand sidemanagement (DSM) within microgrids. This paper explores the integration of LLMsinto energy management, emphasizing their roles in automating the optimizationof DSM strategies with Internet of electric vehicles. We investigate challengesand solutions associated with DSM and explore the new opportunities presentedby leveraging LLMs. Then, we propose an innovative solution that enhances LLMswith retrieval-augmented generation for automatic problem formulation, codegeneration, and customizing optimization. We present a case study todemonstrate the effectiveness of our proposed solution in charging schedulingand optimization for electric vehicles, highlighting our solution's significantadvancements in energy efficiency and user adaptability. This work underscoresthe potential of LLMs for energy optimization and fosters a new era ofintelligent DSM solutions.