IDEAS home Printed from https://ideas.repec.org/a/eee/energy/v318y2025ics0360544225004669.html
   My bibliography  Save this article

Automated data-driven building energy load prediction method based on generative pre-trained transformers (GPT)

Author

Listed:
  • Zhang, Chaobo
  • Zhang, Jian
  • Zhao, Yang
  • Lu, Jie

Abstract

Generative pre-trained transformers (GPT) have shown remarkable capabilities in automated code generation for data-driven building energy load prediction scenarios, leading to substantial savings in time and costs. However, it is quite difficult for inexperienced users to provide high-quality prompts to GPT for generating satisfactory codes. To address this challenge, a GPT-based automated data-driven building energy load forecasting method is proposed in this study. Prompting functions are designed to automatically generate prompts for model training and deployment. Bayesian optimization is utilized to optimize the prompting functions for improving the prediction accuracy of GPT-generated codes. External knowledge bases are developed to improve the code correctness of GPT by adding additional knowledge to prompts. Furthermore, a self-correction strategy is designed to enable GPT to automatically correct errors in GPT-generated codes. This method is employed to forecast the energy loads of two real buildings for performance evaluation. GPT-3.5 is utilized in the evaluation process. The codes generated by this method exhibit high prediction accuracy, achieving an average R2 of 0.95 for the two buildings. The code correctness of GPT-3.5 is increased by an average of 90.0 % by using the external knowledge bases. Moreover, the self-correction strategy effectively corrects some unpredictable mistakes made by GPT-3.5.

Suggested Citation

  • Zhang, Chaobo & Zhang, Jian & Zhao, Yang & Lu, Jie, 2025. "Automated data-driven building energy load prediction method based on generative pre-trained transformers (GPT)," Energy, Elsevier, vol. 318(C).
  • Handle: RePEc:eee:energy:v:318:y:2025:i:c:s0360544225004669
    DOI: 10.1016/j.energy.2025.134824
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0360544225004669
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.energy.2025.134824?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:eee:energy:v:318:y:2025:i:c:s0360544225004669. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Catherine Liu (email available below). General contact details of provider: http://www.journals.elsevier.com/energy .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.