Nesreddine Djafar-Henni, Akram Khelaifia, Mohamed Djafar-Henni, Salah Guettala, Nassim Djedoui
{"title":"SAP2000 API Expert: a custom generative pre-trained transformer (GPT) for converting narrative structural engineering problems to SAP2000 API codes","authors":"Nesreddine Djafar-Henni, Akram Khelaifia, Mohamed Djafar-Henni, Salah Guettala, Nassim Djedoui","doi":"10.1007/s42107-025-01431-7","DOIUrl":null,"url":null,"abstract":"<div><p>The integration of artificial intelligence (AI) into structural engineering has revolutionized design, analysis, and construction processes by automating complex tasks and optimizing decision-making. Among AI-driven tools, ChatGPT has demonstrated significant potential in assisting engineers with structural modeling and analysis. This study introduces SAP2000 API Expert, a custom Generative Pre-Trained Transformer (GPT) based on ChatGPT, for converting narrative structural engineering problems to SAP2000 API Python codes. Unlike conventional methodologies that necessitate users to possess foundational programming or structural engineering competencies, the SAP2000 API Expert provides dual error resolution pathways: a self-debugging approach designed for users with a programming background, or a natural language interface that allows users to describe errors in conversational terms and receive appropriate solutions. Experimental examples, including two benchmarks, were selected to evaluate the GPT’s ability to translate narrative engineering descriptions into executable Python scripts. To validate the accuracy and reliability of the generated scripts, a systematic verification process was conducted by executing the AI-generated codes within SAP2000 and comparing the numerical results with reference solutions from validated technical documentation. The strong agreement between the GPT-generated outputs and benchmark results confirms its computational effectiveness. The innovation is further validated through comparative testing against standard ChatGPT, demonstrating the latter’s inability to generate executable SAP2000 API code, highlighting the significant practical advantages of the domain-specific approach of SAP2000 API Expert. The findings highlight the potential of AI-driven tools in streamlining computational workflows in structural engineering, making design and analysis processes more efficient and accessible. SAP2000 API Expert is accessible for free through this link: https://chatgpt.com/g/g-67b905bf3278819196f4f8b269dfe08c-sap2000-api-ex.</p></div>","PeriodicalId":8513,"journal":{"name":"Asian Journal of Civil Engineering","volume":"26 10","pages":"4383 - 4410"},"PeriodicalIF":0.0000,"publicationDate":"2025-07-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Asian Journal of Civil Engineering","FirstCategoryId":"1085","ListUrlMain":"https://link.springer.com/article/10.1007/s42107-025-01431-7","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"Engineering","Score":null,"Total":0}
引用次数: 0
Abstract
The integration of artificial intelligence (AI) into structural engineering has revolutionized design, analysis, and construction processes by automating complex tasks and optimizing decision-making. Among AI-driven tools, ChatGPT has demonstrated significant potential in assisting engineers with structural modeling and analysis. This study introduces SAP2000 API Expert, a custom Generative Pre-Trained Transformer (GPT) based on ChatGPT, for converting narrative structural engineering problems to SAP2000 API Python codes. Unlike conventional methodologies that necessitate users to possess foundational programming or structural engineering competencies, the SAP2000 API Expert provides dual error resolution pathways: a self-debugging approach designed for users with a programming background, or a natural language interface that allows users to describe errors in conversational terms and receive appropriate solutions. Experimental examples, including two benchmarks, were selected to evaluate the GPT’s ability to translate narrative engineering descriptions into executable Python scripts. To validate the accuracy and reliability of the generated scripts, a systematic verification process was conducted by executing the AI-generated codes within SAP2000 and comparing the numerical results with reference solutions from validated technical documentation. The strong agreement between the GPT-generated outputs and benchmark results confirms its computational effectiveness. The innovation is further validated through comparative testing against standard ChatGPT, demonstrating the latter’s inability to generate executable SAP2000 API code, highlighting the significant practical advantages of the domain-specific approach of SAP2000 API Expert. The findings highlight the potential of AI-driven tools in streamlining computational workflows in structural engineering, making design and analysis processes more efficient and accessible. SAP2000 API Expert is accessible for free through this link: https://chatgpt.com/g/g-67b905bf3278819196f4f8b269dfe08c-sap2000-api-ex.
将人工智能(AI)集成到结构工程中,通过自动化复杂任务和优化决策,彻底改变了设计、分析和施工过程。在人工智能驱动的工具中,ChatGPT在协助工程师进行结构建模和分析方面显示出了巨大的潜力。本研究介绍了SAP2000 API Expert,一个基于ChatGPT的自定义生成预训练转换器(GPT),用于将叙事结构工程问题转换为SAP2000 API Python代码。与要求用户具备基础编程或结构工程能力的传统方法不同,SAP2000 API Expert提供了双重错误解决途径:为具有编程背景的用户设计的自调试方法,或允许用户以会话方式描述错误并接收适当解决方案的自然语言界面。实验示例,包括两个基准,被选择来评估GPT将叙述性工程描述转换为可执行Python脚本的能力。为了验证生成的脚本的准确性和可靠性,通过在SAP2000中执行人工智能生成的代码并将数值结果与经过验证的技术文档中的参考解决方案进行比较,进行了系统的验证过程。gpt生成的输出和基准结果之间的强烈一致性证实了其计算效率。通过与标准ChatGPT的比较测试,进一步验证了该创新,证明后者无法生成可执行的SAP2000 API代码,突出了SAP2000 API Expert领域特定方法的重要实用优势。研究结果强调了人工智能驱动的工具在简化结构工程计算工作流程方面的潜力,使设计和分析过程更加高效和可访问。SAP2000 API Expert可通过以下链接免费访问:https://chatgpt.com/g/g-67b905bf3278819196f4f8b269dfe08c-sap2000-api-ex。
期刊介绍:
The Asian Journal of Civil Engineering (Building and Housing) welcomes articles and research contributions on topics such as:- Structural analysis and design - Earthquake and structural engineering - New building materials and concrete technology - Sustainable building and energy conservation - Housing and planning - Construction management - Optimal design of structuresPlease note that the journal will not accept papers in the area of hydraulic or geotechnical engineering, traffic/transportation or road making engineering, and on materials relevant to non-structural buildings, e.g. materials for road making and asphalt. Although the journal will publish authoritative papers on theoretical and experimental research works and advanced applications, it may also feature, when appropriate: a) tutorial survey type papers reviewing some fields of civil engineering; b) short communications and research notes; c) book reviews and conference announcements.